Module: sip-router
Branch: sr_3.0
Commit: c1802e9ff5861cd52e5a692a6a2aa236a20ccfa7
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c1802e9…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
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);