[sr-dev] git:master: srdb1: return error code when DB URL is too long

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 20 20:22:50 CEST 2011


Module: sip-router
Branch: master
Commit: ffa448dc09f9e086af9d5089e3d6fcec5104a283
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ffa448dc09f9e086af9d5089e3d6fcec5104a283

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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);




More information about the sr-dev mailing list