Module: kamailio Branch: master Commit: aeb85ae3d9097bfd6aaad92a1d5b0c682bf5162c URL: https://github.com/kamailio/kamailio/commit/aeb85ae3d9097bfd6aaad92a1d5b0c68...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-05-02T10:26:35+02:00
usrloc: don't quote string representation of time for fetching contacts query
- the db api adds quites around string values - it results in double quotation, rising db query error - reported by Giovanni Mele
---
Modified: modules/usrloc/dlist.c
---
Diff: https://github.com/kamailio/kamailio/commit/aeb85ae3d9097bfd6aaad92a1d5b0c68... Patch: https://github.com/kamailio/kamailio/commit/aeb85ae3d9097bfd6aaad92a1d5b0c68...
---
diff --git a/modules/usrloc/dlist.c b/modules/usrloc/dlist.c index 65ea97b..08bc834 100644 --- a/modules/usrloc/dlist.c +++ b/modules/usrloc/dlist.c @@ -124,7 +124,7 @@ static inline int get_all_db_ucontacts(void *buf, int len, unsigned int flags, /* get the current time in DB format */ now.len = 25; now.s = now_s; - if (db_time2str( time(0), now.s, &now.len)!=0) { + if (db_time2str_ex( time(0), now.s, &now.len, 0)!=0) { LM_ERR("failed to print now time\n"); return -1; }