[asterisk-commits] mmichelson: branch group/CCSS r227347 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 3 12:49:17 CST 2009


Author: mmichelson
Date: Tue Nov  3 12:49:13 2009
New Revision: 227347

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=227347
Log:
Add an extra check to ast_cc_is_recall.

The function did not take into account that it may be
called either for a caller or callee channel. It was
returning false for a caller channel up until this change.


Modified:
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=227347&r1=227346&r2=227347
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Tue Nov  3 12:49:13 2009
@@ -2665,6 +2665,17 @@
 		return 0;
 	}
 
+	if (!recall_data->nested) {
+		/* If the nested flag is not set, then this means that
+		 * the channel passed to this function is the caller making
+		 * the recall. This means that we shouldn't look through
+		 * the interface tree for the channel because it shouldn't be
+		 * there. However, this is a recall though, so return true.
+		 */
+		ast_channel_unlock(chan);
+		return 1;
+	}
+
 	interface_tree = cc_ref(recall_data->interface_tree, "Bump refcount for tree while we search for specific channel");
 	ast_channel_get_device_name(chan, device_name, sizeof(device_name));
 	ast_str_set(&extencontext, 0, "%s@%s", S_OR(chan->macroexten, chan->exten), S_OR(chan->macrocontext, chan->context));
@@ -2848,7 +2859,6 @@
 	ast_channel_lock(chan);
 	if (!(recall_datastore = ast_channel_datastore_find(chan, &recall_ds_info, NULL))) {
 		/* Silly! Why did you call this function if there's no recall DS? */
-		ast_log(LOG_NOTICE, "No recall ds\n");
 		ast_channel_unlock(chan);
 		return -1;
 	}
@@ -2864,11 +2874,9 @@
 		 * a legitimate time to declare the recall to be done. In fact,
 		 * that should have been done already.
 		 */
-		ast_log(LOG_NOTICE, "Either nested or ignore set...\n");
 		ast_channel_unlock(chan);
 		return -1;
 	}
-	ast_log(LOG_NOTICE, "Um, should be working, right?\n");
 	core_id = recall_data->core_id;
 	ast_channel_unlock(chan);
 	return cc_request_state_change(CC_COMPLETE, core_id, debug);




More information about the asterisk-commits mailing list