[asterisk-commits] file: trunk r74046 - in /trunk: ./ channels/chan_skinny.c pbx/pbx_dundi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 9 09:50:04 CDT 2007
Author: file
Date: Mon Jul 9 09:50:04 2007
New Revision: 74046
URL: http://svn.digium.com/view/asterisk?view=rev&rev=74046
Log:
Merged revisions 74045 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r74045 | file | 2007-07-09 11:49:05 -0300 (Mon, 09 Jul 2007) | 2 lines
Few minor thread synchronization tweaks. (issue #10124 reported by gzero)
........
Modified:
trunk/ (props changed)
trunk/channels/chan_skinny.c
trunk/pbx/pbx_dundi.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=74046&r1=74045&r2=74046
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon Jul 9 09:50:04 2007
@@ -5125,7 +5125,7 @@
delete_devices();
ast_mutex_lock(&monlock);
- if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) {
+ if ((monitor_thread != AST_PTHREADT_NULL) && (monitor_thread != AST_PTHREADT_STOP)) {
pthread_cancel(monitor_thread);
pthread_kill(monitor_thread, SIGURG);
pthread_join(monitor_thread, NULL);
Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=74046&r1=74045&r2=74046
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Mon Jul 9 09:50:04 2007
@@ -2123,6 +2123,9 @@
}
check_password();
}
+
+ netthreadid = AST_PTHREADT_NULL;
+
return NULL;
}
@@ -2157,6 +2160,8 @@
} else
sleep(1);
}
+
+ precachethreadid = AST_PTHREADT_NULL;
return NULL;
}
@@ -4711,10 +4716,14 @@
/* Stop all currently running threads */
dundi_shutdown = 1;
- pthread_kill(netthreadid, SIGURG);
- pthread_join(netthreadid, NULL);
- pthread_kill(precachethreadid, SIGURG);
- pthread_join(precachethreadid, NULL);
+ 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);
+ }
ast_cli_unregister_multiple(cli_dundi, sizeof(cli_dundi) / sizeof(struct ast_cli_entry));
ast_unregister_switch(&dundi_switch);
More information about the asterisk-commits
mailing list