diff -Naur asterisk/channel.c asterisk-new/channel.c --- asterisk/channel.c 2005-04-11 00:34:10.000000000 +1000 +++ asterisk-new/channel.c 2005-04-21 23:24:39.000000000 +1000 @@ -1124,6 +1124,12 @@ #endif } return NULL; + } else { + /* If no fds signalled, then timeout. So set ms = 0 + since we may not have an exact timeout. + */ + if (res == 0) + *ms = 0; } if (havewhen)