Module: sip-router
Branch: master
Commit: f61295a91bb92645ea46dea5f6101232afeb720d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f61295a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Aug 9 16:14:43 2012 +0200
usrloc(k): safety check for raw_query
- db get all contacts functions requires raw_query, but not all db
modules implement it
---
modules_k/usrloc/dlist.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules_k/usrloc/dlist.c b/modules_k/usrloc/dlist.c
index c6c4c8e..2f55ce7 100644
--- a/modules_k/usrloc/dlist.c
+++ b/modules_k/usrloc/dlist.c
@@ -114,6 +114,11 @@ static inline int get_all_db_ucontacts(void *buf, int len, unsigned
int flags,
void *cp;
int shortage, needed;
+ if(ul_dbf.raw_query==NULL) {
+ LM_WARN("DB raw query support is required, but not implemented\n");
+ return -1;
+ }
+
cp = buf;
shortage = 0;
/* Reserve space for terminating 0000 */