From: Arnaldo Pereira Date: Tue, 2 Nov 2010 15:40:27 +0000 (-0200) Subject: freetdm: added missing sleep to ftmod_r2, which is now running fine X-Git-Tag: v1.2-rc1~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a1efb288fe33d5915ddb8f467a8208880371172;p=thirdparty%2Ffreeswitch.git freetdm: added missing sleep to ftmod_r2, which is now running fine --- diff --git a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c index 1314adfd45..637188f757 100644 --- a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c +++ b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c @@ -1288,8 +1288,9 @@ static void *ftdm_r2_run(ftdm_thread_t *me, void *obj) } } - /* figure out what event to poll each channel for. POLLIN|POLLOUT for channels that has a call being - * setup, POLLPRI otherwise */ + /* figure out what event to poll each channel for. POLLPRI when the channel is down, + * POLLPRI|POLLIN|POLLOUT otherwise. + */ memset(poll_events, 0, sizeof(short)*span->chan_count); for (i = 0; i < span->chan_count; i++) { r2chan = R2CALL(span->channels[(i+1)])->r2chan; @@ -1365,9 +1366,8 @@ static void *ftdm_r2_run(ftdm_thread_t *me, void *obj) } } else if (status != FTDM_TIMEOUT) { ftdm_log(FTDM_LOG_ERROR, "ftdm_span_poll_event returned %d.\n", status); - } else { } - + ftdm_sleep(20); } for (i = 1; i <= span->chan_count; i++) {