diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-13 03:06:24 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-13 03:06:24 +0000 |
commit | 7a17d3c4cc1dd814a73d396d20cc47f7107d0228 (patch) | |
tree | 1406754d75e8dca2ab706a21a887ea333fedddf4 /res/res_snmp.c | |
parent | 27151ac15f4756458a7c59399f9427a6acda7108 (diff) |
Merged revisions 50674 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r50674 | file | 2007-01-12 22:04:55 -0500 (Fri, 12 Jan 2007) | 2 lines
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/trunk@50675 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) |