]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Skinny: Stop harcoding APR_TIMEUP
authorMathieu Parent <math.parent@gmail.com>
Fri, 22 Jul 2011 07:16:22 +0000 (09:16 +0200)
committerMathieu Parent <math.parent@gmail.com>
Fri, 22 Jul 2011 07:17:09 +0000 (09:17 +0200)
See also FS-3425

src/include/switch_apr.h
src/mod/endpoints/mod_skinny/skinny_protocol.c
src/switch_apr.c

index c7279b6a8cbfb0f252fabe90dd9db9b82c106f6f..f2af8bc24b6e67d5aeb0d236d93d16c273d1e06b 100644 (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
index da642c1cfabad2ba0c909f7296d45b305c97f5cd..16e8545304ddce041945aad9440abef10077443d 100644 (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;
                }
index b592fc7c3e414f06735673ec3bf009fdcd67efbb..be084fa61d0543e119b96d70d851727aca7a3878 100644 (file)
 
 /* 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)