ensure that AGENTBYCALLERID is set for agents being reloaded from persistent storage

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming 2005-07-06 14:47:25 +00:00
parent 1bd88c387e
commit 6b72557890
1 changed files with 3 additions and 2 deletions

View File

@ -2122,9 +2122,10 @@ static void reload_agents(void)
agent_chan = strsep(&parse, ";");
agent_callerid = strsep(&parse, ";");
ast_copy_string(cur_agent->loginchan, agent_chan, sizeof(cur_agent->loginchan));
if (agent_callerid)
if (agent_callerid) {
ast_copy_string(cur_agent->logincallerid, agent_callerid, sizeof(cur_agent->logincallerid));
else
set_agentbycallerid(cur_agent);
} else
cur_agent->logincallerid[0] = '\0';
if (cur_agent->loginstart == 0)
time(&cur_agent->loginstart);