Trim post dash portion of name if unspecified
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1352 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
925e33e457
commit
d4ab02309a
|
@ -1013,6 +1013,7 @@ static int aqm_exec(struct ast_channel *chan, void *data)
|
||||||
struct localuser *u;
|
struct localuser *u;
|
||||||
char *queuename;
|
char *queuename;
|
||||||
char info[512];
|
char info[512];
|
||||||
|
char tmpchan[512]="";
|
||||||
char *interface=NULL;
|
char *interface=NULL;
|
||||||
struct ast_call_queue *q;
|
struct ast_call_queue *q;
|
||||||
struct member *save;
|
struct member *save;
|
||||||
|
@ -1034,8 +1035,13 @@ static int aqm_exec(struct ast_channel *chan, void *data)
|
||||||
*interface = '\0';
|
*interface = '\0';
|
||||||
interface++;
|
interface++;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
interface = chan->name ;
|
strncpy(tmpchan, chan->name, sizeof(tmpchan) - 1);
|
||||||
|
interface = strrchr(tmpchan, '-');
|
||||||
|
if (interface)
|
||||||
|
*interface = '\0';
|
||||||
|
interface = tmpchan;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ( q = queues) != NULL )
|
if( ( q = queues) != NULL )
|
||||||
|
|
Reference in New Issue