提交 b3997353 authored 作者: Mathieu Parent's avatar Mathieu Parent

Skinny: Stop harcoding APR_TIMEUP

See also FS-3425
上级 2f6f71d4
......@@ -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
......
......@@ -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;
}
......
......@@ -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)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论