[Asterisk-cvs] asterisk/channels chan_h323.c,1.81,1.82

jeremy at lists.digium.com jeremy at lists.digium.com
Thu Oct 14 19:59:03 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv15667

Modified Files:
	chan_h323.c 
Log Message:
stop a seggy..it helps if you dont try to print out something we already know is NULL :)

Index: chan_h323.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_h323.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- chan_h323.c	14 Oct 2004 05:29:55 -0000	1.81
+++ chan_h323.c	14 Oct 2004 23:59:22 -0000	1.82
@@ -851,17 +851,19 @@
 		}
 	} else {
 		/* find by sin */
-		while (p) {
-			if ((!inaddrcmp(&p->addr, sin)) || 
-				(p->addr.sin_addr.s_addr == sin->sin_addr.s_addr)) {
-				ast_log(LOG_DEBUG, "Found peer %s/%s by addr\n", peer, ast_inet_ntoa(iabuf, sizeof(iabuf), p->addr.sin_addr));
-				break;
+		if (sin) {
+			while (p) {
+				if ((!inaddrcmp(&p->addr, sin)) || 
+					(p->addr.sin_addr.s_addr == sin->sin_addr.s_addr)) {
+					ast_log(LOG_DEBUG, "Found peer %s/%s by addr\n", peer, ast_inet_ntoa(iabuf, sizeof(iabuf), p->addr.sin_addr));
+					break;
+				}
+				p = p->next;
 			}
-			p = p->next;
-		}
+		}	
 	}
 	if (!p) {
-		ast_log(LOG_DEBUG, "Could not find peer %s/%s by addr\n", peer, ast_inet_ntoa(iabuf, sizeof(iabuf), p->addr.sin_addr));
+		ast_log(LOG_DEBUG, "Could not find peer %s by name or address\n", peer);
 	}
 	return p;
 }
@@ -1804,25 +1806,8 @@
 	delete_users();
 	delete_aliases();
 	prune_peers();
-
-#if 0
-	if (!ast_strlen_zero(gatekeeper)) {
-		h323_gk_urq();
-	}
-#endif
-
 	reload_config();
 
-#if 0
-	/* Possibly register with a GK */
-	if (gatekeeper_disable == 0) {
-		if (h323_set_gk(gatekeeper_discover, gatekeeper, secret)) {
-			ast_log(LOG_ERROR, "Gatekeeper registration failed.\n");
-			h323_end_process();
-			return -1;
-		}
-	}
-#endif
 	restart_monitor();
 	return 0;
 }




More information about the svn-commits mailing list