aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-01 03:59:13 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-01 03:59:13 +0000
commit8a6b833f01823449560f055ec634401a1657ab29 (patch)
tree94e31b4bdee0671387e7a728dbffdba5dccf7bc8
parent48f7043c68ba2285555f6621abf4fff3da26c4fe (diff)
Fix reload with wildcard endpoint
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3559 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannels/chan_mgcp.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 50f873a95..d0d22ed4c 100755
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -3592,17 +3592,19 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
return NULL;
}
}
- /* Make out subs a circular linked list so we can always sping through the whole bunch */
- sub = e->sub;
- /* find the end of the list */
- while(sub->next){
- sub = sub->next;
- }
- /* set the last sub->next to the first sub */
- sub->next = e->sub;
-
- e->next = gw->endpoints;
- gw->endpoints = e;
+ if (!ep_reload) {
+ /* Make out subs a circular linked list so we can always sping through the whole bunch */
+ sub = e->sub;
+ /* find the end of the list */
+ while(sub->next){
+ sub = sub->next;
+ }
+ /* set the last sub->next to the first sub */
+ sub->next = e->sub;
+
+ e->next = gw->endpoints;
+ gw->endpoints = e;
+ }
}
} else if (!strcasecmp(v->name, "trunk") ||
!strcasecmp(v->name, "line")) {