dect
/
asterisk
Archived
13
0
Fork 0

Fix login to allow logging off with @context

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1260 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2003-08-04 22:22:54 +00:00
parent 0502b2ae54
commit b38382ba94
1 changed files with 1 additions and 1 deletions

View File

@ -904,7 +904,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
/* Retrieve login chan */
res = ast_app_getdata(chan, "agent-newlocation", tmpchan, sizeof(tmpchan) - 1, 0);
if (!res) {
if (context && strlen(context))
if (context && strlen(context) && strlen(tmpchan))
snprintf(p->loginchan, sizeof(p->loginchan), "%s@%s", tmpchan, context);
else
strncpy(p->loginchan, tmpchan, sizeof(p->loginchan) - 1);