[sr-dev] git:kamailio_3.0: Modules_k:pv No warning message for branch(count) if no branches
Marius Zbihlei
marius.zbihlei at 1and1.ro
Wed Aug 25 14:56:47 CEST 2010
Module: sip-router
Branch: kamailio_3.0
Commit: 5e6a0aa429a9e12a7dd07eee042c518bd6ddaecb
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5e6a0aa429a9e12a7dd07eee042c518bd6ddaecb
Author: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei at 1and1.ro>
Date: Wed Aug 25 14:08:35 2010 +0300
Modules_k:pv No warning message for branch(count) if no branches
Patch by Carsten Gross (carsten.gross at 1und1 dot de)
(cherry picked from commit 54f04ae93503f1d24763b6b6cb0ceec3045b26d9)
---
modules_k/pv/pv_branch.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules_k/pv/pv_branch.c b/modules_k/pv/pv_branch.c
index 163fc73..5c8b56d 100644
--- a/modules_k/pv/pv_branch.c
+++ b/modules_k/pv/pv_branch.c
@@ -47,7 +47,8 @@ int pv_get_branchx(struct sip_msg *msg, pv_param_t *param,
uri.s = get_branch(idx, &uri.len, &lq, &duri, &path, &fl, &fsocket);
- if(uri.s == 0)
+ /* branch(count) doesn't need a valid branch, everything else does */
+ if(uri.s == 0 && ( param->pvn.u.isname.name.n != 5/* count*/ ))
{
LM_ERR("error accessing branch [%d]\n", idx);
return pv_get_null(msg, param, res);
More information about the sr-dev
mailing list