Ver Fonte

ldap: replace STR_PARAM with PARAM_STR

Alekzander Spiridonov há 11 anos atrás
pai
commit
9dc4aa338c
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      modules/ldap/ldap_mod.c

+ 2 - 2
modules/ldap/ldap_mod.c

@@ -128,7 +128,7 @@ static cmd_export_t cmds[] = {
 */
 */
 static param_export_t params[] = {
 static param_export_t params[] = {
 
 
-	{"config_file",          STR_PARAM, &ldap_config},
+	{"config_file",          PARAM_STR, &ldap_config},
 	{0, 0, 0}
 	{0, 0, 0}
 };
 };
 
 
@@ -199,7 +199,7 @@ static int mod_init(void)
 	/*
 	/*
 	* read config file
 	* read config file
 	*/
 	*/
-	if (strlen(ldap_config.s) == 0)
+	if (ldap_config.len <= 0)
 	{
 	{
 		LM_ERR("config_file is empty - this module param is mandatory\n");
 		LM_ERR("config_file is empty - this module param is mandatory\n");
 		return -2;
 		return -2;