[Devel] SF.net SVN: openser: [2351] trunk/modules/presence/notify.c

Juha Heinanen jh at tutpro.com
Mon Jun 11 15:25:27 CEST 2007


Daniel-Constantin Mierla writes:

 > Log Message:
 > -----------
 > - quick fix for presence crash due to free notify bodies in different
 > - types of event (mwi -- reported by Juha Heinanen) -- needs more
 > - analysis

daniel,

thanks for the fix.  in the meanwhile, i was reading the sources and as
far as i can tell, memory for notify_body is allocated using pkg_malloc
both in case when aggregation is not needed and is needed.

-  in notify.c/get_p_notify_body():

	DBG("PRESENCE:get_p_notify_body: Event does not
		require aggregation\n");
	...
        notify_body= (str*)pkg_malloc(sizeof(str));
        ...
        return notify_body;

- presence_xml/notify_body.c/agregate_xmls():

	...
	body = (str*)pkg_malloc(sizeof(str));
        ...
	return body;

but let anca verify this.

-- juha



More information about the Devel mailing list