Update of /usr/cvsroot/asterisk/channels
In directory localhost.localdomain:/tmp/cvs-serv7631/channels

Modified Files:
        chan_agent.c 
Log Message:
ensure that AGENTBYCALLERID is set for agents being reloaded from persistent 
storage


Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- chan_agent.c        6 Jul 2005 01:29:15 -0000       1.141
+++ chan_agent.c        6 Jul 2005 14:47:25 -0000       1.142
@@ -2122,9 +2122,10 @@
                        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);

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to