[svn-commits] russell: branch 1.6.2 r209837 - in /branches/1.6.2: ./ main/event.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Aug 1 05:45:46 CDT 2009


Author: russell
Date: Sat Aug  1 05:45:42 2009
New Revision: 209837

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=209837
Log:
Merged revisions 209835 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r209835 | russell | 2009-08-01 05:43:40 -0500 (Sat, 01 Aug 2009) | 6 lines
  
  Fix ast_event_queue_and_cache() to actually do the cache() part.
  
  (closes issue #15624)
  Reported by: ffossard
  Tested by: russell
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/event.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/event.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/main/event.c?view=diff&rev=209837&r1=209836&r2=209837
==============================================================================
--- branches/1.6.2/main/event.c (original)
+++ branches/1.6.2/main/event.c Sat Aug  1 05:45:42 2009
@@ -1068,7 +1068,7 @@
 
 /*! \brief Duplicate an event and add it to the cache
  * \note This assumes this index in to the cache is locked */
-static int attribute_unused ast_event_dup_and_cache(const struct ast_event *event)
+static int ast_event_dup_and_cache(const struct ast_event *event)
 {
 	struct ast_event *dup_event;
 	struct ast_event_ref *event_ref;
@@ -1097,6 +1097,7 @@
 	struct ast_event_ref tmp_event_ref = {
 		.event = event,
 	};
+	int res = -1;
 
 	if (!(container = ast_event_cache[ast_event_get_type(event)].container)) {
 		ast_log(LOG_WARNING, "cache requested for non-cached event type\n");
@@ -1107,8 +1108,10 @@
 	ao2_callback(container, OBJ_POINTER | OBJ_UNLINK | OBJ_MULTIPLE | OBJ_NODATA,
 			ast_event_cmp, &tmp_event_ref);
 
+	res = ast_event_dup_and_cache(event);
+
 queue_event:
-	return ast_event_queue(event);
+	return ast_event_queue(event) ? -1 : res;
 }
 
 static int handle_event(void *data)




More information about the svn-commits mailing list