Module: sip-router Branch: sr_3.0 Commit: 34d0cb8837669e6a4473dc5523320d29a697cce8 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=34d0cb8837669e6a4473dc5523320d29a697cce8
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: Fri Nov 6 13:45:16 2009 +0100 pv: reset local var for tobody trans - from SF svn, #5951 (cherry picked from commit d4a1d5146773eac1d82b8abb39747cc8ec427801) --- modules_k/pv/pv_trans.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules_k/pv/pv_trans.c b/modules_k/pv/pv_trans.c index 3401edd..d9120de 100644 --- a/modules_k/pv/pv_trans.c +++ b/modules_k/pv/pv_trans.c @@ -925,7 +925,7 @@ int tr_eval_tobody(struct sip_msg *msg, tr_param_t *tp, int subtype, { if(_tr_tobody_str.len==0) memset(&_tr_tobody, 0, sizeof(struct to_body)); - if(val->rs.len>_tr_tobody_str.len) + if(_tr_tobody_str.s==NULL || val->rs.len>_tr_tobody_str.len) { if(_tr_tobody_str.s) pkg_free(_tr_tobody_str.s); _tr_tobody_str.s = @@ -954,7 +954,7 @@ int tr_eval_tobody(struct sip_msg *msg, tr_param_t *tp, int subtype, { memset(&_tr_tobody, 0, sizeof(struct to_body)); pkg_free(_tr_tobody_str.s); - _tr_tobody_str.len = 0; + memset(&_tr_tobody_str, 0, sizeof(str)); return -1; } if (parse_uri(_tr_tobody.uri.s, _tr_tobody.uri.len, @@ -963,7 +963,7 @@ int tr_eval_tobody(struct sip_msg *msg, tr_param_t *tp, int subtype, free_to_params(&_tr_tobody); memset(&_tr_tobody, 0, sizeof(struct to_body)); pkg_free(_tr_tobody_str.s); - _tr_tobody_str.len = 0; + memset(&_tr_tobody_str, 0, sizeof(str)); return -1; } _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
