[asterisk-commits] trunk r36752 - in /trunk: ./ asterisk.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jul 2 22:14:06 MST 2006
Author: russell
Date: Mon Jul 3 00:14:06 2006
New Revision: 36752
URL: http://svn.digium.com/view/asterisk?rev=36752&view=rev
Log:
Blocked revisions 36751 via svnmerge
........
r36751 | russell | 2006-07-03 01:12:03 -0400 (Mon, 03 Jul 2006) | 3 lines
fix a race condition that caused asterisk to log a *ton* of warnings on mac
osx about poll returning an error because the polled file descriptor was bad.
........
Modified:
trunk/ (props changed)
trunk/asterisk.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Modified: trunk/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/asterisk.c?rev=36752&r1=36751&r2=36752&view=diff
==============================================================================
--- trunk/asterisk.c (original)
+++ trunk/asterisk.c Mon Jul 3 00:14:06 2006
@@ -839,6 +839,7 @@
fds[0].fd = ast_socket;
fds[0].events = POLLIN;
s = poll(fds, 1, -1);
+ pthread_testcancel();
if (s < 0) {
if (errno != EINTR)
ast_log(LOG_WARNING, "poll returned error: %s\n", strerror(errno));
@@ -1152,10 +1153,10 @@
ast_log(LOG_DEBUG, "Asterisk ending (%d).\n", num);
manager_event(EVENT_FLAG_SYSTEM, "Shutdown", "Shutdown: %s\r\nRestart: %s\r\n", ast_active_channels() ? "Uncleanly" : "Cleanly", restart ? "True" : "False");
if (ast_socket > -1) {
+ pthread_cancel(lthread);
close(ast_socket);
ast_socket = -1;
unlink(ast_config_AST_SOCKET);
- pthread_cancel(lthread);
}
if (ast_consock > -1)
close(ast_consock);
More information about the asterisk-commits
mailing list