[asterisk-commits] russell: branch 1.4 r67872 - /branches/1.4/res/res_snmp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jun 6 15:08:03 MST 2007


Author: russell
Date: Wed Jun  6 17:08:02 2007
New Revision: 67872

URL: http://svn.digium.com/view/asterisk?view=rev&rev=67872
Log:
Disable reload functionality in res_snmp.  It is not possible to initialize the
snmp library more than once without completely unloading the module and loading
it again.
(issue #9571, reported by hristo, additional helpful debug information from festr,
 patch from me)

Modified:
    branches/1.4/res/res_snmp.c

Modified: branches/1.4/res/res_snmp.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_snmp.c?view=diff&rev=67872&r1=67871&r2=67872
==============================================================================
--- branches/1.4/res/res_snmp.c (original)
+++ branches/1.4/res/res_snmp.c Wed Jun  6 17:08:02 2007
@@ -109,25 +109,7 @@
 	return ((thread != AST_PTHREADT_NULL) ? pthread_join(thread, NULL) : 0);
 }
 
-static int reload(void)
-{
-	ast_verbose(VERBOSE_PREFIX_1 "Reloading [Sub]Agent Module\n");
-
-	res_snmp_dont_stop = 0;
-	if (thread != AST_PTHREADT_NULL)
-		pthread_join(thread, NULL);
-	thread = AST_PTHREADT_NULL;
-	load_config();
-
-	res_snmp_dont_stop = 1;
-	if (res_snmp_enabled)
-		return ast_pthread_create_background(&thread, NULL, agent_thread, NULL);
-	else
-		return 0;
-}
-
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "SNMP [Sub]Agent for Asterisk",
 		.load = load_module,
 		.unload = unload_module,
-		.reload = reload,
 		);



More information about the asterisk-commits mailing list