Module: sip-router
Branch: master
Commit: a82617e71dd4c5f5f928c16b054c605980a74ebe
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a82617e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Aug 30 10:33:34 2010 +0200
pv(k): don't use CL for body PV
- size of body is computed from size of sip message
---
modules_k/pv/pv_core.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/modules_k/pv/pv_core.c b/modules_k/pv/pv_core.c
index b69df2a..9328e52 100644
--- a/modules_k/pv/pv_core.c
+++ b/modules_k/pv/pv_core.c
@@ -945,23 +945,18 @@ int pv_get_msg_body(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
{
str s;
- if(msg==NULL)
+ if(msg==NULL)
return -1;
-
+
s.s = get_body( msg );
- if (s.s == NULL)
+ if(s.s == NULL)
{
LM_DBG("no message body\n");
return pv_get_null(msg, param, res);
- }
+ }
+ s.len = msg->buf + msg->len - s.s;
- if (!msg->content_length)
- {
- LM_ERR("no Content-Length header found\n");
- return pv_get_null(msg, param, res);
- }
- s.len = get_content_length(msg);
return pv_get_strval(msg, param, res, &s);
}