[asterisk-commits] mmichelson: branch mmichelson/forward-loop r87063 - /team/mmichelson/forward-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 25 17:12:16 CDT 2007
Author: mmichelson
Date: Thu Oct 25 17:12:16 2007
New Revision: 87063
URL: http://svn.digium.com/view/asterisk?view=rev&rev=87063
Log:
Added check to app_queue to make sure it doesn't add local interfaces to the list of dialed interfaces
Modified:
team/mmichelson/forward-loop/apps/app_queue.c
Modified: team/mmichelson/forward-loop/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/forward-loop/apps/app_queue.c?view=diff&rev=87063&r1=87062&r2=87063
==============================================================================
--- team/mmichelson/forward-loop/apps/app_queue.c (original)
+++ team/mmichelson/forward-loop/apps/app_queue.c Thu Oct 25 17:12:16 2007
@@ -2557,7 +2557,10 @@
struct callattempt *tmp = ast_calloc(1, sizeof(*tmp));
struct ast_dialed_interface *di;
int dialed = 0;
+ char *tech = ast_strdupa(cur->interface);
AST_LIST_HEAD(, ast_dialed_interface) *dialed_interfaces;
+ tech = strsep(&tech,"/");
+ ast_log(LOG_DEBUG, "tech is %s\n", tech);
if (!tmp) {
ao2_ref(cur, -1);
ast_mutex_unlock(&qe->parent->lock);
@@ -2589,8 +2592,8 @@
break;
}
}
- if (!dialed) {
- if(!(di = ast_calloc(1, sizeof(*di)))) {
+ if (!dialed && strcasecmp(tech, "Local")) {
+ if(!(di = ast_calloc(1, sizeof(*di) + strlen(cur->interface)))) {
ao2_ref(cur, -1);
AST_LIST_UNLOCK(dialed_interfaces);
ast_mutex_unlock(&qe->parent->lock);
@@ -2598,8 +2601,8 @@
AST_LIST_UNLOCK(&queues);
free(tmp);
goto out;
- }
- ast_copy_string(di->interface, cur->interface, sizeof(di->interface));
+ }
+ strcpy(di->interface, cur->interface);
AST_LIST_INSERT_TAIL(dialed_interfaces, di, list);
} else {
AST_LIST_UNLOCK(dialed_interfaces);
More information about the asterisk-commits
mailing list