[asterisk-commits] pcadach: trunk r51221 - /trunk/channels/chan_h323.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 17 23:59:23 MST 2007


Author: pcadach
Date: Thu Jan 18 00:59:22 2007
New Revision: 51221

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51221
Log:
Update ast_append_ha() usage

Modified:
    trunk/channels/chan_h323.c

Modified: trunk/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_h323.c?view=diff&rev=51221&r1=51220&r2=51221
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Thu Jan 18 00:59:22 2007
@@ -1425,7 +1425,11 @@
 			}
 		} else if (!strcasecmp(v->name, "permit") ||
 					!strcasecmp(v->name, "deny")) {
-			user->ha = ast_append_ha(v->name, v->value, user->ha, NULL);
+			int ha_error = 0;
+
+			user->ha = ast_append_ha(v->name, v->value, user->ha, &ha_error);
+			if (ha_error)
+				ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
 		}
 	}
 	if (!user->options.dtmfmode)
@@ -1529,7 +1533,11 @@
 			peer->addr.sin_port = htons(atoi(v->value));
 		} else if (!strcasecmp(v->name, "permit") ||
 					!strcasecmp(v->name, "deny")) {
-			peer->ha = ast_append_ha(v->name, v->value, peer->ha);
+			int ha_error = 0;
+
+			peer->ha = ast_append_ha(v->name, v->value, peer->ha, &ha_error);
+			if (ha_error)
+				ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
 		} else if (!strcasecmp(v->name, "mailbox")) {
 			ast_copy_string(peer->mailbox, v->value, sizeof(peer->mailbox));
 		}



More information about the asterisk-commits mailing list