Explorar o código

ims_icscf: Replacing STR_PARAM with PARAM_STRING or PARAM_STR to give up of depracated defines

Alekzander Spiridonov %!s(int64=11) %!d(string=hai) anos
pai
achega
0e2c3d192f
Modificáronse 1 ficheiros con 6 adicións e 17 borrados
  1. 6 17
      modules/ims_icscf/mod.c

+ 6 - 17
modules/ims_icscf/mod.c

@@ -117,12 +117,12 @@ static param_export_t params[] = {
     {"route_lir_user_unknown", PARAM_STRING, &route_lir_user_unknown},
     {"route_uar_user_unknown", PARAM_STRING, &route_uar_user_unknown},
     {"scscf_entry_expiry", INT_PARAM, &scscf_entry_expiry},
-    {"db_url", 					STR_PARAM, &ims_icscf_db_url},
-    {"db_nds_table", 			STR_PARAM, &ims_icscf_db_nds_table},
-    {"db_scscf_table", 			STR_PARAM, &ims_icscf_db_scscf_table},
-    {"db_capabilities_table", 	STR_PARAM, &ims_icscf_db_capabilities_table},
-    {"cxdx_forced_peer", STR_PARAM, &cxdx_forced_peer_s},
-    {"cxdx_dest_realm", STR_PARAM, &cxdx_dest_realm_s},
+    {"db_url", 					PARAM_STRING, &ims_icscf_db_url},
+    {"db_nds_table", 			PARAM_STRING, &ims_icscf_db_nds_table},
+    {"db_scscf_table", 			PARAM_STRING, &ims_icscf_db_scscf_table},
+    {"db_capabilities_table", 	PARAM_STRING, &ims_icscf_db_capabilities_table},
+    {"cxdx_forced_peer", PARAM_STR, &cxdx_forced_peer},
+    {"cxdx_dest_realm", PARAM_STR, &cxdx_dest_realm},
     {0, 0, 0}
 };
 
@@ -150,14 +150,6 @@ struct module_exports exports = {
     0 /* per-child init function */
 };
 
-static int fix_parameters() {
-    cxdx_forced_peer.s = cxdx_forced_peer_s;
-    cxdx_forced_peer.len = strlen(cxdx_forced_peer_s);
-
-    cxdx_dest_realm.s = cxdx_dest_realm_s;
-    cxdx_dest_realm.len = strlen(cxdx_dest_realm_s);
-    return 1;
-}
 /**
  * init module function
  */
@@ -165,9 +157,6 @@ static int mod_init(void) {
 	cdp_avp = 0;
 	int route_no;
 
-	/* fix the parameters */
-	if (!fix_parameters()) goto error;
-
 #ifdef STATISTICS
 	if (register_module_stats( exports.name, mod_stats) != 0) {
 		LM_ERR("failed to register core statistics\n");