Skinny: Stop harcoding APR_TIMEUP

See also FS-3425
This commit is contained in:
Mathieu Parent 2011-07-22 09:16:22 +02:00
parent 2f6f71d4a9
commit b3997353a1
3 changed files with 9 additions and 1 deletions

View File

@ -41,6 +41,9 @@
#define SWITCH_APR_H
SWITCH_BEGIN_EXTERN_C
SWITCH_DECLARE(int) switch_status_is_timeup(int status);
#ifdef WIN32
typedef DWORD switch_thread_id_t;
#else

View File

@ -142,7 +142,7 @@ switch_status_t skinny_read_packet(listener_t *listener, skinny_message_t **req)
if (!listener_is_ready(listener)) {
break;
}
if ((status != 70007 /* APR_TIMEUP */) && !SWITCH_STATUS_IS_BREAK(status) && (status != SWITCH_STATUS_SUCCESS)) {
if (switch_status_is_timeup(status) && !SWITCH_STATUS_IS_BREAK(status) && (status != SWITCH_STATUS_SUCCESS)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Socket break with status=%d.\n", status);
return SWITCH_STATUS_FALSE;
}

View File

@ -69,6 +69,11 @@
/* apr stubs */
SWITCH_DECLARE(int) switch_status_is_timeup(int status)
{
return APR_STATUS_IS_TIMEUP(status);
}
/* Memory Pools */
SWITCH_DECLARE(switch_thread_id_t) switch_thread_self(void)