]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make the last context entry read in the dominant one. (issue #8918 reported by pj)
authorJoshua Colp <jcolp@digium.com>
Sat, 27 Jan 2007 00:03:23 +0000 (00:03 +0000)
committerJoshua Colp <jcolp@digium.com>
Sat, 27 Jan 2007 00:03:23 +0000 (00:03 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52360 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 48b30549ac0686f778f466c0f99fa3b9c21ec01a..06c941c839ea0565a5b12493a8b608398c5d1381 100644 (file)
@@ -8359,13 +8359,11 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, in
                                maskfound++;
                                inet_aton(v->value, &peer->mask);
                        } else if (!strcasecmp(v->name, "context")) {
-                               if (ast_strlen_zero(peer->context))
-                                       ast_copy_string(peer->context, v->value, sizeof(peer->context));
+                               ast_copy_string(peer->context, v->value, sizeof(peer->context));
                        } else if (!strcasecmp(v->name, "regexten")) {
                                ast_copy_string(peer->regexten, v->value, sizeof(peer->regexten));
                        } else if (!strcasecmp(v->name, "peercontext")) {
-                               if (ast_strlen_zero(peer->peercontext))
-                                       ast_copy_string(peer->peercontext, v->value, sizeof(peer->peercontext));
+                               ast_copy_string(peer->peercontext, v->value, sizeof(peer->peercontext));
                        } else if (!strcasecmp(v->name, "port")) {
                                if (ast_test_flag(peer, IAX_DYNAMIC))
                                        peer->defaddr.sin_port = htons(atoi(v->value));