[sr-dev] git:master: modules/msrp: From-Path: not updated correctly in msrp_relay()

Peter Dunkley peter.dunkley at crocodile-rcs.com
Wed Oct 10 17:17:14 CEST 2012


Module: sip-router
Branch: master
Commit: d9c2638bd27c50a7cba4a96ee7b5592d05f39c90
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d9c2638bd27c50a7cba4a96ee7b5592d05f39c90

Author: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Date:   Wed Oct 10 16:15:32 2012 +0100

modules/msrp: From-Path: not updated correctly in msrp_relay()

- When the last To-Path-URI is pre-pended to the From-Path: header the first
  two characters of "From-Path: " are skipped, leaving "om-Path: ".  11
  characters should actually be skipped.

---

 modules/msrp/msrp_netio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/msrp/msrp_netio.c b/modules/msrp/msrp_netio.c
index e636df3..3c12355 100644
--- a/modules/msrp/msrp_netio.c
+++ b/modules/msrp/msrp_netio.c
@@ -108,8 +108,8 @@ int msrp_relay(msrp_frame_t *mf)
 	memcpy(p, tpath->body.s, l + 1 - tpath->body.s);
 	p += l + 1 - tpath->body.s;
 
-	memcpy(p, fpath->name.s + 2, mf->buf.s + mf->buf.len - fpath->name.s - 2);
-	p += mf->buf.s + mf->buf.len - fpath->name.s - 2;
+	memcpy(p, fpath->name.s + 11, mf->buf.s + mf->buf.len - fpath->name.s - 11);
+	p += mf->buf.s + mf->buf.len - fpath->name.s - 11;
 
 
 	env = msrp_get_env();




More information about the sr-dev mailing list