aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-05 19:14:51 +0000
committerpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-05 19:14:51 +0000
commit2363c5347650e23bad507f707fb4f5a8664b6e01 (patch)
treeb75bf19afd892fc86b540522beb2db6054695976
parenteb93b32966c7ecb4837b95d28efa15d461d8500c (diff)
Merged revisions 261314 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r261314 | pabelanger | 2010-05-05 14:43:03 -0400 (Wed, 05 May 2010) | 19 lines Merged revisions 261274 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r261274 | pabelanger | 2010-05-05 12:42:22 -0400 (Wed, 05 May 2010) | 12 lines 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/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@261317 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9a1583d69..b2977e65a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -22942,19 +22942,23 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
}
}
} 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)) {
unref_peer(peer, "unref_peer: from build_peer defaultip");
return NULL;
}
} else if (!strcasecmp(v->name, "permit") || !strcasecmp(v->name, "deny")) {
int ha_error = 0;
- peer->ha = ast_append_ha(v->name, v->value, peer->ha, &ha_error);
+ if (!ast_strlen_zero(v->value)) {
+ 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, "contactpermit") || !strcasecmp(v->name, "contactdeny")) {
int ha_error = 0;
- peer->contactha = ast_append_ha(v->name + 7, v->value, peer->contactha, &ha_error);
+ if (!ast_strlen_zero(v->value)) {
+ peer->contactha = ast_append_ha(v->name + 7, v->value, peer->contactha, &ha_error);
+ }
if (ha_error) {
ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
}