handle APR_EINTR response in queue push\trypop

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6021 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-10-22 23:29:29 +00:00
parent f7cfd7810e
commit 0ed7b160b1
1 changed files with 14 additions and 2 deletions

View File

@ -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)