[asterisk-commits] tilghman: branch 1.6.2 r189540 - in /branches/1.6.2: ./ main/stdtime/localtime.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 20 17:11:40 CDT 2009
Author: tilghman
Date: Mon Apr 20 17:11:36 2009
New Revision: 189540
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=189540
Log:
Merged revisions 189539 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r189539 | tilghman | 2009-04-20 17:10:25 -0500 (Mon, 20 Apr 2009) | 3 lines
Use nanosleep instead of poll.
This is not just because mmichelson suggested it, but also because Mac OS X puked on my poll().
........
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/main/stdtime/localtime.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/main/stdtime/localtime.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.2/main/stdtime/localtime.c?view=diff&rev=189540&r1=189539&r2=189540
==============================================================================
--- branches/1.6.2/main/stdtime/localtime.c (original)
+++ branches/1.6.2/main/stdtime/localtime.c Mon Apr 20 17:11:36 2009
@@ -239,6 +239,7 @@
} buf;
ssize_t res;
struct state *cur;
+ struct timespec ten_seconds = { 10, 0 };
inotify_fd = inotify_init();
@@ -261,7 +262,7 @@
} else if (res < 0) {
if (errno == EINTR || errno == EAGAIN) {
/* If read fails, then wait a bit, then continue */
- poll(NULL, 0, 10000);
+ nanosleep(&ten_seconds, NULL);
continue;
}
/* Sanity check -- this should never happen, either */
@@ -322,6 +323,7 @@
{
struct stat st, lst;
struct state *cur;
+ struct timespec sixty_seconds = { 60, 0 };
ast_mutex_lock(&initialization_lock);
ast_cond_signal(&initialization);
@@ -330,7 +332,7 @@
for (;/*ever*/;) {
char fullname[FILENAME_MAX + 1];
- poll(NULL, 0, 60000);
+ nanosleep(&sixty_seconds, NULL);
AST_LIST_LOCK(&zonelist);
AST_LIST_TRAVERSE_SAFE_BEGIN(&zonelist, cur, list) {
char *name = cur->name;
More information about the asterisk-commits
mailing list