Module: kamailio Branch: master Commit: 78225d064a76a5d5a3dbd198a4ae38f6423dd272 URL: https://github.com/kamailio/kamailio/commit/78225d064a76a5d5a3dbd198a4ae38f6...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-11-19T09:10:46+01:00
htable: use local variable for name in log message instead of null htable pointer
---
Modified: src/modules/htable/ht_dmq.c
---
Diff: https://github.com/kamailio/kamailio/commit/78225d064a76a5d5a3dbd198a4ae38f6... Patch: https://github.com/kamailio/kamailio/commit/78225d064a76a5d5a3dbd198a4ae38f6...
---
diff --git a/src/modules/htable/ht_dmq.c b/src/modules/htable/ht_dmq.c index 33dd72e8d4..d5ff1af645 100644 --- a/src/modules/htable/ht_dmq.c +++ b/src/modules/htable/ht_dmq.c @@ -576,11 +576,15 @@ int ht_dmq_handle_sync(srjson_doc_t* jdoc) { }
ht = ht_get_table(&htname); - if(ht==NULL) - LM_WARN("unable to get table %.*s\n", ht->name.len, ht->name.s); + if(ht==NULL) { + LM_WARN("unable to get table %.*s\n", + htname.len, (htname.s)?htname.s:""); + }
- if (ht_set_cell_ex(ht, &cname, type, &val, 0, expire - now) < 0) - LM_WARN("unable to set cell %.*s in table %.*s\n", cname.len, cname.s, ht->name.len, ht->name.s); + if (ht_set_cell_ex(ht, &cname, type, &val, 0, expire - now) < 0) { + LM_WARN("unable to set cell %.*s in table %.*s\n", + cname.len, cname.s, ht->name.len, ht->name.s); + }
cell = cell->next; }