Module: sip-router Branch: master Commit: 3cfaf089c1472f1397580a365360579c671c7796 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3cfaf089...
Author: Ovidiu Sas osas@voipembedded.com Committer: Ovidiu Sas osas@voipembedded.com Date: Fri Dec 14 13:55:39 2012 -0500
xhttp_pi: properly handle NULL values
---
modules/xhttp_pi/xhttp_pi_fnc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/xhttp_pi/xhttp_pi_fnc.c b/modules/xhttp_pi/xhttp_pi_fnc.c index ddf1ce8..9e50ef0 100644 --- a/modules/xhttp_pi/xhttp_pi_fnc.c +++ b/modules/xhttp_pi/xhttp_pi_fnc.c @@ -2727,11 +2727,11 @@ int ph_run_pi_cmd(pi_ctx_t* ctx) case DB1_STRING: case DB1_BLOB: if(values[j].val.str_val.s==NULL){ - LM_ERR("NULL\n"); - goto error; + val_str.s = NULL; val_str.len = 0; + } else { + val_str.s = values[j].val.str_val.s; + val_str.len = strlen(val_str.s); } - val_str.s = values[j].val.str_val.s; - val_str.len = strlen(val_str.s); LM_DBG("...got %.*s[%d]=>" "[%.*s][%.*s]\n", command->q_keys[j]->len,