Browse Source

misc/examples/ims/pcscf: Add ifdef guards for ipsec_*() calls

Tsvetomir Dimitrov 7 năm trước cách đây
mục cha
commit
bae838eb61

+ 2 - 0
misc/examples/ims/pcscf/route/mo.cfg

@@ -95,7 +95,9 @@ onreply_route[MO_reply] {
 		remove_hf("C-Params");	
 		remove_hf("C-Params");	
 		append_hf("Contact: $ct;$hdr(C-Params)\r\n");
 		append_hf("Contact: $ct;$hdr(C-Params)\r\n");
 	}
 	}
+#!ifdef WITH_IPSEC
 	ipsec_forward("location");
 	ipsec_forward("location");
+#!endif
 	# In case of 1xx and 2xx do NAT
 	# In case of 1xx and 2xx do NAT
 	if(status=~"[12][0-9][0-9]")
 	if(status=~"[12][0-9][0-9]")
 		route(NATMANAGE);
 		route(NATMANAGE);

+ 5 - 3
misc/examples/ims/pcscf/route/register.cfg

@@ -156,13 +156,15 @@ onreply_route[REGISTER_reply]
         	xlog("L_DBG", "REGISTER SUCCESS[$ci] took $var(stat_add)ms\n"); 
         	xlog("L_DBG", "REGISTER SUCCESS[$ci] took $var(stat_add)ms\n"); 
         	update_stat("register_success", "+1");
         	update_stat("register_success", "+1");
         	update_stat("register_time", "$var(stat_add)");
         	update_stat("register_time", "$var(stat_add)");
-		ipsec_forward("location");
+#!ifdef WITH_IPSEC
+            ipsec_forward("location");
    	}
    	}
 	else {  
 	else {  
 		if (t_check_status("401")) {
 		if (t_check_status("401")) {
 			ipsec_create("location");
 			ipsec_create("location");
-        	}
-    	}
+        }
+#!endif
+    }
 	exit;
 	exit;
 }
 }