[svn-commits] file: branch 13 r423580 - in /branches/13: ./ res/res_pjsip_notify.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Sep 19 14:51:14 CDT 2014


Author: file
Date: Fri Sep 19 14:51:12 2014
New Revision: 423580

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=423580
Log:
res_pjsip_notify: Fix crash on unload/load and don't say the module doesn't exist on reload.

When unloading the module did not unregister the CLI commands causing a crash upon
load when they were registered again.

When reloading the module the return value from the config options framework was not
checked to determine if an error occurred or not. This caused a message to be output
saying the module did not exist when reloading if no changes were present.

AST-1433 #close
AST-1434 #close
........

Merged revisions 423579 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    branches/13/   (props changed)
    branches/13/res/res_pjsip_notify.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/res/res_pjsip_notify.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip_notify.c?view=diff&rev=423580&r1=423579&r2=423580
==============================================================================
--- branches/13/res/res_pjsip_notify.c (original)
+++ branches/13/res/res_pjsip_notify.c Fri Sep 19 14:51:12 2014
@@ -1007,13 +1007,17 @@
 
 static int reload_module(void)
 {
-	return aco_process_config(&notify_cfg, 1) ?
-		AST_MODULE_LOAD_DECLINE : 0;
+	if (aco_process_config(&notify_cfg, 1) == ACO_PROCESS_ERROR) {
+		return AST_MODULE_LOAD_DECLINE;
+	}
+
+	return 0;
 }
 
 static int unload_module(void)
 {
 	ast_manager_unregister("PJSIPNotify");
+	ast_cli_unregister_multiple(cli_options, ARRAY_LEN(cli_options));
 	aco_info_destroy(&notify_cfg);
 
 	return 0;




More information about the svn-commits mailing list