Can't check incoming sip debug until after we receive the packet!
[asterisk/asterisk.git] / channels / chan_sip.c
index 81eff91..836fbac 100755 (executable)
@@ -7412,7 +7412,7 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
        int len;
        int nounlock;
        int recount = 0;
-       int debug=sip_debug_test_addr(&sin);
+       int debug;
 
        len = sizeof(sin);
        memset(&req, 0, sizeof(req));
@@ -7426,6 +7426,7 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
        }
        req.data[res] = '\0';
        req.len = res;
+       debug = sip_debug_test_addr(&sin);
        if (debug)
                ast_verbose("\n\nSip read: \n%s\n", req.data);
        if (pedanticsipchecking)