Module: sip-router
Branch: master
Commit: 54f04ae93503f1d24763b6b6cb0ceec3045b26d9
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=54f04ae…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)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)
---
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 28b15e8..0831bd5 100644
--- a/modules_k/pv/pv_branch.c
+++ b/modules_k/pv/pv_branch.c
@@ -50,7 +50,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);