[asterisk-commits] branch oej/issue5898 r8688 - in /team/oej/issue5898: channels/ include/asterisk/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 25 13:32:34 MST 2006


Author: oej
Date: Wed Jan 25 14:32:30 2006
New Revision: 8688

URL: http://svn.digium.com/view/asterisk?rev=8688&view=rev
Log:
Adding debug output and voila - The registry object is actually not deleted.
Something is wrong with the reference count

First running with one register= line in sip.conf, then removing that line
and reloading:
Seems like users are the same, which propably means memory leak.


an 25 20:35:28 DEBUG[26255]: chan_sip.c:13055 sip_do_reload: --------------- SIP reload started
Jan 25 20:35:28 DEBUG[26255]: chan_sip.c:13062 sip_do_reload: Not destroying object (refcount 1)
Jan 25 20:35:28 DEBUG[26255]: chan_sip.c:13064 sip_do_reload: --------------- Done destroying registry list
Jan 25 20:35:28 DEBUG[26255]: config.c:596 config_text_file_load: Parsing /etc/asterisk/sip.conf
Jan 25 20:35:28 DEBUG[26255]: chan_sip.c:12674 reload_config: Not destroying object (refcount 1)
Jan 25 20:35:28 DEBUG[26255]: chan_sip.c:12674 reload_config: Not destroying object (refcount 1)
Jan 25 20:35:28 DEBUG[26255]: chan_sip.c:12674 reload_config: Not destroying object (refcount 1)
Jan 25 20:35:28 DEBUG[26255]: config.c:596 config_text_file_load: Parsing /etc/asterisk/sip_notify.conf
Jan 25 20:35:28 DEBUG[26255]: chan_sip.c:13078 sip_do_reload: --------------- SIP reload done



Modified:
    team/oej/issue5898/channels/chan_sip.c
    team/oej/issue5898/include/asterisk/astobj.h

Modified: team/oej/issue5898/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/issue5898/channels/chan_sip.c?rev=8688&r1=8687&r2=8688&view=diff
==============================================================================
--- team/oej/issue5898/channels/chan_sip.c (original)
+++ team/oej/issue5898/channels/chan_sip.c Wed Jan 25 14:32:30 2006
@@ -1773,6 +1773,8 @@
 /*! \brief  sip_destroy_user: Remove user object from in-memory storage */
 static void sip_destroy_user(struct sip_user *user)
 {
+	if (option_debug > 2)
+		ast_log(LOG_DEBUG, "Destroying user object from memory: %s\n", user->name);
 	ast_free_ha(user->ha);
 	if (user->chanvars) {
 		ast_variables_destroy(user->chanvars);

Modified: team/oej/issue5898/include/asterisk/astobj.h
URL: http://svn.digium.com/view/asterisk/team/oej/issue5898/include/asterisk/astobj.h?rev=8688&r1=8687&r2=8688&view=diff
==============================================================================
--- team/oej/issue5898/include/asterisk/astobj.h (original)
+++ team/oej/issue5898/include/asterisk/astobj.h Wed Jan 25 14:32:30 2006
@@ -228,6 +228,9 @@
 		if (newcount == 0) { \
 			ast_mutex_destroy(&(object)->_lock); \
 			destructor((object)); \
+		} else { \
+			if (option_debug) \
+				ast_log(LOG_DEBUG, "Not destroying object (refcount %d)\n", newcount); \
 		} \
 		(object) = NULL; \
 	} while(0)



More information about the asterisk-commits mailing list