Explorar o código

srdb1: return error code when DB URL is too long

Daniel-Constantin Mierla %!s(int64=14) %!d(string=hai) anos
pai
achega
ffa448dc09
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/srdb1/db.c

+ 1 - 1
lib/srdb1/db.c

@@ -172,7 +172,7 @@ int db_bind_mod(const str* mod, db_func_t* mydbf)
 	if (mod->len > MAX_URL_LENGTH)
 	{
 		LM_ERR("SQL URL too long\n");
-		return 0;
+		return -1;
 	}
 	// add the prefix
 	name = pkg_malloc(mod->len + 4);