[asterisk-commits] simon.perreault: branch group/v6-new r274767 - /team/group/v6-new/main/http.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 8 10:37:47 CDT 2010


Author: simon.perreault
Date: Thu Jul  8 10:37:44 2010
New Revision: 274767

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=274767
Log:
Avoid warning

Modified:
    team/group/v6-new/main/http.c

Modified: team/group/v6-new/main/http.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/main/http.c?view=diff&rev=274767&r1=274766&r2=274767
==============================================================================
--- team/group/v6-new/main/http.c (original)
+++ team/group/v6-new/main/http.c Thu Jul  8 10:37:44 2010
@@ -998,9 +998,11 @@
 	}
 
 	/* default values */
+	tmp.sin_family = AF_INET;
 	tmp.sin_port = htons(8088);
 	ast_sockaddr_from_sin(&http_desc.local_address, &tmp);
 
+	tmp2.sin_family = AF_INET;
 	tmp2.sin_port = htons(8089);
 	ast_sockaddr_from_sin(&https_desc.local_address, &tmp2);
 
@@ -1075,10 +1077,9 @@
 		tmp2.sin_addr = tmp.sin_addr;
 		ast_sockaddr_from_sin(&https_desc.local_address, &tmp2);
 	}
-	if (enabled) {
-		tmp.sin_family = tmp2.sin_family = AF_INET;
-		ast_sockaddr_from_sin(&http_desc.local_address, &tmp);
-		ast_sockaddr_from_sin(&https_desc.local_address, &tmp2);
+	if (!enabled) {
+		http_desc.local_address.ss.ss_family = 0;
+		https_desc.local_address.ss.ss_family = 0;
 	}
 	if (strcmp(prefix, newprefix)) {
 		ast_copy_string(prefix, newprefix, sizeof(prefix));




More information about the asterisk-commits mailing list