[asterisk-commits] mmichelson: branch group/CCSS r236844 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 30 09:37:37 CST 2009
Author: mmichelson
Date: Wed Dec 30 09:37:34 2009
New Revision: 236844
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236844
Log:
Fix a terrible awful horrible bug that I am ashamed of.
I was returning the wrong type of structure in ast_cc_agent_callback,
thus causing any function that made use of it very likely to segfault.
EVIL!
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=236844&r1=236843&r2=236844
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Wed Dec 30 09:37:34 2009
@@ -264,7 +264,11 @@
struct ast_cc_agent *ast_cc_agent_callback(int flags, ao2_callback_fn *function, void *args, const char * const type)
{
struct cc_callback_helper helper = {.function = function, .args = args, .type = type};
- return ao2_callback(cc_core_instances, flags, cc_agent_callback_helper, &helper);
+ struct cc_core_instance *core_instance;
+ if ((core_instance = ao2_callback(cc_core_instances, flags, cc_agent_callback_helper, &helper))) {
+ return core_instance->agent;
+ }
+ return NULL;
}
enum match_flags {
More information about the asterisk-commits
mailing list