Module: sip-router
Branch: master
Commit: ffa448dc09f9e086af9d5089e3d6fcec5104a283
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ffa448d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 20 20:21:55 2011 +0200
srdb1: return error code when DB URL is too long
---
lib/srdb1/db.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
index b50b156..b8abefa 100644
--- a/lib/srdb1/db.c
+++ b/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);