[asterisk-commits] pabelanger: branch 1.4 r261274 - /branches/1.4/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 5 11:42:27 CDT 2010
Author: pabelanger
Date: Wed May 5 11:42:22 2010
New Revision: 261274
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=261274
Log:
Registration fix for SIP realtime.
Make sure realtime fields are not empty.
(closes issue #17266)
Reported by: Nick_Lewis
Patches:
chan_sip.c-realtime.patch uploaded by Nick Lewis (license 657)
Tested by: Nick_Lewis, sberney
Review: https://reviewboard.asterisk.org/r/643/
Modified:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=261274&r1=261273&r2=261274
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed May 5 11:42:22 2010
@@ -18076,14 +18076,18 @@
}
}
} else if (!strcasecmp(v->name, "defaultip")) {
- if (ast_get_ip(&peer->defaddr, v->value)) {
+ if (!ast_strlen_zero(v->value) && ast_get_ip(&peer->defaddr, v->value)) {
ASTOBJ_UNREF(peer, sip_destroy_peer);
return NULL;
}
} else if (!strcasecmp(v->name, "permit") || !strcasecmp(v->name, "deny")) {
- peer->ha = ast_append_ha(v->name, v->value, peer->ha);
+ if (!ast_strlen_zero(v->value)) {
+ peer->ha = ast_append_ha(v->name, v->value, peer->ha);
+ }
} else if (!strcasecmp(v->name, "contactpermit") || !strcasecmp(v->name, "contactdeny")) {
- peer->contactha = ast_append_ha(v->name + 7, v->value, peer->contactha);
+ if (!ast_strlen_zero(v->value)) {
+ peer->contactha = ast_append_ha(v->name + 7, v->value, peer->contactha);
+ }
} else if (!strcasecmp(v->name, "port")) {
peer->portinuri = 1;
if (!realtime && ast_test_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC))
More information about the asterisk-commits
mailing list