|
|
@ -3570,6 +3570,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
|
|
|
|
e->onhooktime = time(NULL);
|
|
|
|
e->onhooktime = time(NULL);
|
|
|
|
/* ASSUME we're onhook */
|
|
|
|
/* ASSUME we're onhook */
|
|
|
|
e->hookstate = MGCP_ONHOOK;
|
|
|
|
e->hookstate = MGCP_ONHOOK;
|
|
|
|
|
|
|
|
if (!ep_reload) {
|
|
|
|
/*snprintf(txident, sizeof(txident), "%08x", rand());*/
|
|
|
|
/*snprintf(txident, sizeof(txident), "%08x", rand());*/
|
|
|
|
for (i = 0; i < MAX_SUBS; i++) {
|
|
|
|
for (i = 0; i < MAX_SUBS; i++) {
|
|
|
|
sub = malloc(sizeof(struct mgcp_subchannel));
|
|
|
|
sub = malloc(sizeof(struct mgcp_subchannel));
|
|
|
@ -3592,7 +3593,6 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!ep_reload) {
|
|
|
|
|
|
|
|
/* Make out subs a circular linked list so we can always sping through the whole bunch */
|
|
|
|
/* Make out subs a circular linked list so we can always sping through the whole bunch */
|
|
|
|
sub = e->sub;
|
|
|
|
sub = e->sub;
|
|
|
|
/* find the end of the list */
|
|
|
|
/* find the end of the list */
|
|
|
|