sipdump: test initialization of faked msg structure
authorDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 25 Mar 2020 16:16:35 +0000 (17:16 +0100)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 25 Mar 2020 16:17:00 +0000 (17:17 +0100)
src/modules/sipdump/sipdump_mod.c

index d686dc8..ad867ff 100644 (file)
@@ -137,7 +137,10 @@ static int mod_init(void)
                if (sipdump_event_route_idx>=0 && event_rt.rlist[sipdump_event_route_idx]==0) {
                        sipdump_event_route_idx = -1; /* disable */
                }
-               faked_msg_init();
+               if(faked_msg_init() <0) {
+                       LM_ERR("cannot initialize faked msg structure\n");
+                       return -1;
+               }
        }
 
        if(sipdump_mode & SIPDUMP_MODE_WFILE) {