Selaa lähdekoodia

pua: replace STR_PARAM with PARAM_STR

Alekzander Spiridonov 11 vuotta sitten
vanhempi
commit
18194e2ec8
1 muutettua tiedostoa jossa 3 lisäystä ja 7 poistoa
  1. 3 7
      modules/pua/pua.c

+ 3 - 7
modules/pua/pua.c

@@ -123,12 +123,12 @@ static cmd_export_t cmds[]=
 
 static param_export_t params[]={
 	{"hash_size",                INT_PARAM, &HASH_SIZE},
-	{"db_url",                   STR_PARAM, &db_url.s},
-	{"db_table",                 STR_PARAM, &db_table.s},
+	{"db_url",                   PARAM_STR, &db_url},
+	{"db_table",                 PARAM_STR, &db_table},
 	{"min_expires",	             INT_PARAM, &min_expires},
 	{"default_expires",          INT_PARAM, &default_expires},
 	{"update_period",            INT_PARAM, &update_period},
-	{"outbound_proxy",           STR_PARAM, &outbound_proxy.s},
+	{"outbound_proxy",           PARAM_STR, &outbound_proxy},
 	{"dlginfo_increase_version", INT_PARAM, &dlginfo_increase_version},
 	{"reginfo_increase_version", INT_PARAM, &reginfo_increase_version},
 	{"check_remote_contact",     INT_PARAM, &check_remote_contact},
@@ -184,9 +184,7 @@ static int mod_init(void)
 		return -1;
 	}
 
-	db_url.len = db_url.s ? strlen(db_url.s) : 0;
 	LM_DBG("db_url=%s/%d/%p\n", ZSW(db_url.s), db_url.len, db_url.s);
-	db_table.len = db_table.s ? strlen(db_table.s) : 0;
 
 	/* binding to database module  */
 	if (db_bind_mod(&db_url, &pua_dbf))
@@ -286,8 +284,6 @@ static int mod_init(void)
 		pua_dbf.close(pua_db);
 	pua_db = NULL;
 
-	outbound_proxy.len = outbound_proxy.s ? strlen(outbound_proxy.s) : 0;
-
 	return 0;
 }