[asterisk-commits] rmudgett: branch 1.8 r321392 - /branches/1.8/main/srv.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 27 18:45:45 CDT 2011


Author: rmudgett
Date: Fri May 27 18:45:41 2011
New Revision: 321392

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321392
Log:
Don't run the risk of a DNS SRV lookup if already cleaned up.

Modified:
    branches/1.8/main/srv.c

Modified: branches/1.8/main/srv.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/srv.c?view=diff&rev=321392&r1=321391&r2=321392
==============================================================================
--- branches/1.8/main/srv.c (original)
+++ branches/1.8/main/srv.c Fri May 27 18:45:41 2011
@@ -249,7 +249,11 @@
 	const char *host;
 	unsigned short port;
 
-	while (!(ast_srv_lookup(context, NULL, &host, &port)));
+	if (*context) {
+		/* We have a context to clean up. */
+		while (!(ast_srv_lookup(context, NULL, &host, &port))) {
+		}
+	}
 }
 
 int ast_get_srv(struct ast_channel *chan, char *host, int hostlen, int *port, const char *service)




More information about the asterisk-commits mailing list