From: Anthony Minessale Date: Mon, 22 Oct 2007 23:29:29 +0000 (+0000) Subject: handle APR_EINTR response in queue push\trypop X-Git-Tag: v1.0-beta2~349 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ed7b160b17a53308220f7a3e2e01f58d4600ec7;p=thirdparty%2Ffreeswitch.git handle APR_EINTR response in queue push\trypop git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6021 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_apr.c b/src/switch_apr.c index c1b473ebc1..5546fd97a6 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -745,7 +745,13 @@ SWITCH_DECLARE(switch_status_t) switch_queue_pop(switch_queue_t * queue, void ** SWITCH_DECLARE(switch_status_t) switch_queue_push(switch_queue_t * queue, void *data) { - return apr_queue_push(queue, data); + apr_status_t s; + + do { + s = apr_queue_push(queue, data); + } while (s == APR_EINTR); + + return s; } SWITCH_DECLARE(switch_status_t) switch_queue_trypop(switch_queue_t * queue, void **data) @@ -755,7 +761,13 @@ SWITCH_DECLARE(switch_status_t) switch_queue_trypop(switch_queue_t * queue, void SWITCH_DECLARE(switch_status_t) switch_queue_trypush(switch_queue_t * queue, void *data) { - return apr_queue_trypush(queue, data); + apr_status_t s; + + do { + s = apr_queue_trypush(queue, data); + } while (s == APR_EINTR); + + return s; } SWITCH_DECLARE(int) switch_vasprintf(char **ret, const char *fmt, va_list ap)