[asterisk-commits] file: trunk r75584 - in /trunk: ./ pbx/pbx_dundi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 18 09:20:20 CDT 2007
Author: file
Date: Wed Jul 18 09:20:19 2007
New Revision: 75584
URL: http://svn.digium.com/view/asterisk?view=rev&rev=75584
Log:
Merged revisions 75583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r75583 | file | 2007-07-18 11:18:53 -0300 (Wed, 18 Jul 2007) | 5 lines
(closes issue #10224)
Reported by: irroot
Record the threadid of each running thread before shutting them down as the thread themselves may change the value.
........
Modified:
trunk/ (props changed)
trunk/pbx/pbx_dundi.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=75584&r1=75583&r2=75584
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Wed Jul 18 09:20:19 2007
@@ -4712,17 +4712,18 @@
static int unload_module(void)
{
+ pthread_t previous_netthreadid = netthreadid, previous_precachethreadid = precachethreadid;
ast_module_user_hangup_all();
/* Stop all currently running threads */
dundi_shutdown = 1;
- if (netthreadid != AST_PTHREADT_NULL) {
- pthread_kill(netthreadid, SIGURG);
- pthread_join(netthreadid, NULL);
- }
- if (precachethreadid != AST_PTHREADT_NULL) {
- pthread_kill(precachethreadid, SIGURG);
- pthread_join(precachethreadid, NULL);
+ if (previous_netthreadid != AST_PTHREADT_NULL) {
+ pthread_kill(previous_netthreadid, SIGURG);
+ pthread_join(previous_netthreadid, NULL);
+ }
+ if (previous_precachethreadid != AST_PTHREADT_NULL) {
+ pthread_kill(previous_precachethreadid, SIGURG);
+ pthread_join(previous_precachethreadid, NULL);
}
ast_cli_unregister_multiple(cli_dundi, sizeof(cli_dundi) / sizeof(struct ast_cli_entry));
More information about the asterisk-commits
mailing list