diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-13 03:04:55 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-13 03:04:55 +0000 |
commit | 896b80ee76e6b42915f6d7d099c46b3f741f67ad (patch) | |
tree | f39660ec43b8099421492f43f4e84479f30871cf /res/res_snmp.c | |
parent | 8255c760e21d1f61c0ddf16cf4dc31bbb8e31ac4 (diff) |
Only join the snmp thread on an unload if the thread is actually running. (issue #8810 reported by junky)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@50674 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_snmp.c')
-rw-r--r-- | res/res_snmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_snmp.c b/res/res_snmp.c index 2ccadc407..cbca08a41 100644 --- a/res/res_snmp.c +++ b/res/res_snmp.c @@ -106,7 +106,7 @@ static int unload_module(void) ast_verbose(VERBOSE_PREFIX_1 "Unloading [Sub]Agent Module\n"); res_snmp_dont_stop = 0; - return pthread_join(thread, NULL); + return ((thread != AST_PTHREADT_NULL) ? pthread_join(thread, NULL) : 0); } static int reload(void) |