ensure that AGENTBYCALLERID is set for agents being reloaded from persistent storage
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 6 Jul 2005 14:47:25 +0000 (14:47 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 6 Jul 2005 14:47:25 +0000 (14:47 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6039 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 4a0780b..464ef64 100755 (executable)
@@ -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);