[asterisk-commits] qwell: branch 1.4 r101482 - in /branches/1.4/channels: chan_iax2.c chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 31 13:52:49 CST 2008


Author: qwell
Date: Thu Jan 31 13:52:49 2008
New Revision: 101482

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101482
Log:
Solaris compat fixes for struct in_addr funkiness.

Issue #11885, patch by snuffy.

Modified:
    branches/1.4/channels/chan_iax2.c
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=101482&r1=101481&r2=101482
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Thu Jan 31 13:52:49 2008
@@ -2689,8 +2689,9 @@
 		if (var && sin) {
 			for (tmp = var; tmp; tmp = tmp->next) {
 				if (!strcasecmp(tmp->name, "host")) {
-					struct in_addr sin2 = { 0, };
+					struct in_addr sin2;
 					struct ast_dnsmgr_entry *dnsmgr = NULL;
+					memset(&sin2, 0, sizeof(sin2));
 					if ((ast_dnsmgr_lookup(tmp->value, &sin2, &dnsmgr) < 0) || (memcmp(&sin2, &sin->sin_addr, sizeof(sin2)) != 0)) {
 						/* No match */
 						ast_variables_destroy(var);
@@ -2803,8 +2804,9 @@
 		if (var) {
 			for (tmp = var; tmp; tmp = tmp->next) {
 				if (!strcasecmp(tmp->name, "host")) {
-					struct in_addr sin2 = { 0, };
+					struct in_addr sin2;
 					struct ast_dnsmgr_entry *dnsmgr = NULL;
+					memset(&sin2, 0, sizeof(sin2));
 					if ((ast_dnsmgr_lookup(tmp->value, &sin2, &dnsmgr) < 0) || (memcmp(&sin2, &sin->sin_addr, sizeof(sin2)) != 0)) {
 						/* No match */
 						ast_variables_destroy(var);

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=101482&r1=101481&r2=101482
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Thu Jan 31 13:52:49 2008
@@ -2521,8 +2521,9 @@
 			if (var) {
 				for (tmp = var; tmp; tmp = tmp->next) {
 					if (!strcasecmp(var->name, "host")) {
-						struct in_addr sin2 = { 0, };
+						struct in_addr sin2;
 						struct ast_dnsmgr_entry *dnsmgr = NULL;
+						memset(&sin2, 0, sizeof(sin2));
 						if ((ast_dnsmgr_lookup(tmp->value, &sin2, &dnsmgr) < 0) || (memcmp(&sin2, &sin->sin_addr, sizeof(sin2)) != 0)) {
 							/* No match */
 							ast_variables_destroy(var);




More information about the asterisk-commits mailing list