[asterisk-commits] jpeeler: branch jpeeler/bug13494 r171695 - in /team/jpeeler/bug13494: ./ chan...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 27 16:16:13 CST 2009


Author: jpeeler
Date: Tue Jan 27 16:16:13 2009
New Revision: 171695

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=171695
Log:
svnmerge merge

Modified:
    team/jpeeler/bug13494/   (props changed)
    team/jpeeler/bug13494/channels/chan_agent.c

Propchange: team/jpeeler/bug13494/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jan 27 16:16:13 2009
@@ -1,1 +1,1 @@
-/branches/1.4:1-171640
+/branches/1.4:1-171694

Modified: team/jpeeler/bug13494/channels/chan_agent.c
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/bug13494/channels/chan_agent.c?view=diff&rev=171695&r1=171694&r2=171695
==============================================================================
--- team/jpeeler/bug13494/channels/chan_agent.c (original)
+++ team/jpeeler/bug13494/channels/chan_agent.c Tue Jan 27 16:16:13 2009
@@ -199,7 +199,10 @@
 	ast_cond_t app_complete_cond;
 	volatile int app_sleep_cond;   /**< Sleep condition for the login app */
 	struct ast_channel *owner;     /**< Agent */
-	char loginchan[80];            /**< channel they logged in from */
+	/**! channel they logged in from. This may also be used to tell if an agent
+	 * is a callback agent or not. If this field is not zero-length, then this is
+	 * a callback agent */
+	char loginchan[80];
 	char logincallerid[80];        /**< Caller ID they had when they logged in */
 	struct ast_channel *chan;      /**< Channel we use */
 	AST_LIST_ENTRY(agent_pvt) list;	/**< Next Agent in the linked list. */
@@ -307,7 +310,7 @@
 
 	AST_LIST_TRAVERSE(&agents, p, list) {
 		ast_mutex_lock(&p->lock);
-		if (p->chan) {
+		if (p->chan && !ast_strlen_zero(p->loginchan)) {
 			ast_copy_string(basename, p->chan->name, sizeof(basename));
 			if ((tmp = strrchr(basename, '-'))) {
 				*tmp = '\0';




More information about the asterisk-commits mailing list