[svn-commits] russell: branch russell/iax2_frame_queue r89877 - in /team/russell/iax2_frame...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Nov 27 17:28:12 CST 2007
Author: russell
Date: Tue Nov 27 17:28:11 2007
New Revision: 89877
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89877
Log:
sync with trunk
Modified:
team/russell/iax2_frame_queue/ (props changed)
team/russell/iax2_frame_queue/apps/app_queue.c
team/russell/iax2_frame_queue/channels/chan_misdn.c
team/russell/iax2_frame_queue/main/pbx.c
Propchange: team/russell/iax2_frame_queue/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/russell/iax2_frame_queue/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Nov 27 17:28:11 2007
@@ -1,1 +1,1 @@
-/trunk:1-89831
+/trunk:1-89876
Modified: team/russell/iax2_frame_queue/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax2_frame_queue/apps/app_queue.c?view=diff&rev=89877&r1=89876&r2=89877
==============================================================================
--- team/russell/iax2_frame_queue/apps/app_queue.c (original)
+++ team/russell/iax2_frame_queue/apps/app_queue.c Tue Nov 27 17:28:11 2007
@@ -1112,7 +1112,7 @@
if (!strcasecmp(val, "vars")) {
q->eventwhencalled = QUEUE_EVENT_VARIABLES;
} else {
- q->eventwhencalled = ast_true(val);
+ q->eventwhencalled = ast_true(val) ? 1 : 0;
}
} else if (!strcasecmp(param, "reportholdtime")) {
q->reportholdtime = ast_true(val);
@@ -1868,8 +1868,8 @@
if (tmp[i + 1] == '\0')
break;
if (tmp[i] == '\n') {
- vars[j] = '\r';
- vars[++j] = '\n';
+ vars[j++] = '\r';
+ vars[j++] = '\n';
ast_copy_string(&(vars[j]), "Variable: ", len - j);
j += 9;
Modified: team/russell/iax2_frame_queue/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax2_frame_queue/channels/chan_misdn.c?view=diff&rev=89877&r1=89876&r2=89877
==============================================================================
--- team/russell/iax2_frame_queue/channels/chan_misdn.c (original)
+++ team/russell/iax2_frame_queue/channels/chan_misdn.c Tue Nov 27 17:28:11 2007
@@ -1665,31 +1665,9 @@
return CLI_SUCCESS;
}
-static char *complete_ch_helper(struct ast_cli_args *a, int rpos)
-{
- struct ast_channel *c;
- int which = 0;
- char *ret;
- if (a->pos != rpos)
- return NULL;
- for (c = ast_channel_walk_locked(NULL); c; c = ast_channel_walk_locked(c)) {
- if (!strncasecmp(a->word, c->name, strlen(a->word))) {
- if (++which > a->n)
- break;
- }
- ast_channel_unlock(c);
- }
- if (c) {
- ret = ast_strdup(c->name);
- ast_channel_unlock(c);
- } else
- ret = NULL;
- return ret;
-}
-
static char *complete_ch(struct ast_cli_args *a)
{
- return complete_ch_helper(a, 3);
+ return ast_complete_channels(a->line, a->word, a->pos, a->n, 3);
}
static char *complete_debug_port (struct ast_cli_args *a)
Modified: team/russell/iax2_frame_queue/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax2_frame_queue/main/pbx.c?view=diff&rev=89877&r1=89876&r2=89877
==============================================================================
--- team/russell/iax2_frame_queue/main/pbx.c (original)
+++ team/russell/iax2_frame_queue/main/pbx.c Tue Nov 27 17:28:11 2007
@@ -2609,7 +2609,8 @@
int matching_action = (action == E_MATCH || action == E_CANMATCH || action == E_MATCHMORE);
- ast_autoservice_start(c);
+ if (c)
+ ast_autoservice_start(c);
ast_rdlock_contexts();
if (found)
@@ -2621,12 +2622,14 @@
*found = 1;
if (matching_action) {
ast_unlock_contexts();
- ast_autoservice_stop(c);
+ if (c)
+ ast_autoservice_stop(c);
return -1; /* success, we found it */
} else if (action == E_FINDLABEL) { /* map the label to a priority */
res = e->priority;
ast_unlock_contexts();
- ast_autoservice_stop(c);
+ if (c)
+ ast_autoservice_stop(c);
return res; /* the priority we were looking for */
} else { /* spawn */
if (!e->cached_app)
@@ -2635,7 +2638,8 @@
ast_unlock_contexts();
if (!app) {
ast_log(LOG_WARNING, "No application '%s' for extension (%s, %s, %d)\n", e->app, context, exten, priority);
- ast_autoservice_stop(c);
+ if (c)
+ ast_autoservice_stop(c);
return -1;
}
if (c->context != context)
@@ -2671,20 +2675,23 @@
"AppData: %s\r\n"
"Uniqueid: %s\r\n",
c->name, c->context, c->exten, c->priority, app->name, passdata, c->uniqueid);
- ast_autoservice_stop(c);
+ if (c)
+ ast_autoservice_stop(c);
return pbx_exec(c, app, passdata); /* 0 on success, -1 on failure */
}
} else if (q.swo) { /* not found here, but in another switch */
ast_unlock_contexts();
if (matching_action) {
- ast_autoservice_stop(c);
+ if (c)
+ ast_autoservice_stop(c);
return -1;
} else {
if (!q.swo->exec) {
ast_log(LOG_WARNING, "No execution engine for switch %s\n", q.swo->name);
res = -1;
}
- ast_autoservice_stop(c);
+ if (c)
+ ast_autoservice_stop(c);
return q.swo->exec(c, q.foundcontext ? q.foundcontext : context, exten, priority, callerid, q.data);
}
} else { /* not found anywhere, see what happened */
@@ -2710,7 +2717,8 @@
ast_debug(1, "Shouldn't happen!\n");
}
- ast_autoservice_stop(c);
+ if (c)
+ ast_autoservice_stop(c);
return (matching_action) ? 0 : -1;
}
More information about the svn-commits
mailing list