[sr-dev] git:master:c32ba91f: msrp: fix missed break in parsing pv name

Daniel-Constantin Mierla miconda at gmail.com
Sat May 6 08:58:38 CEST 2017


Module: kamailio
Branch: master
Commit: c32ba91fbbe59e144ddcb40be33b3379bcf3d64d
URL: https://github.com/kamailio/kamailio/commit/c32ba91fbbe59e144ddcb40be33b3379bcf3d64d

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-05-06T08:58:25+02:00

msrp: fix missed break in parsing pv name

- closes GH #1122

---

Modified: src/modules/msrp/msrp_vars.c

---

Diff:  https://github.com/kamailio/kamailio/commit/c32ba91fbbe59e144ddcb40be33b3379bcf3d64d.diff
Patch: https://github.com/kamailio/kamailio/commit/c32ba91fbbe59e144ddcb40be33b3379bcf3d64d.patch

---

diff --git a/src/modules/msrp/msrp_vars.c b/src/modules/msrp/msrp_vars.c
index 3267bc5..fddabde 100644
--- a/src/modules/msrp/msrp_vars.c
+++ b/src/modules/msrp/msrp_vars.c
@@ -46,12 +46,12 @@ int pv_parse_msrp_name(pv_spec_t *sp, str *in)
 
 	switch(in->len)
 	{
-		case 3: 
+		case 3:
 			if(strncmp(in->s, "buf", 3)==0)
 				sp->pvp.pvn.u.isname.name.n = 1;
 			else goto error;
 		break;
-		case 4: 
+		case 4:
 			if(strncmp(in->s, "body", 4)==0)
 				sp->pvp.pvn.u.isname.name.n = 2;
 			else if(strncmp(in->s, "code", 4)==0)
@@ -66,6 +66,7 @@ int pv_parse_msrp_name(pv_spec_t *sp, str *in)
 			else if(strncmp(in->s, "conid", 5)==0)
 				sp->pvp.pvn.u.isname.name.n = 21;
 			else goto error;
+		break;
 		case 6:
 			if(strncmp(in->s, "method", 6)==0)
 				sp->pvp.pvn.u.isname.name.n = 6;
@@ -79,7 +80,7 @@ int pv_parse_msrp_name(pv_spec_t *sp, str *in)
 				sp->pvp.pvn.u.isname.name.n = 12;
 			else goto error;
 		break;
-		case 7: 
+		case 7:
 			if(strncmp(in->s, "bodylen", 7)==0)
 				sp->pvp.pvn.u.isname.name.n = 10;
 			else if(strncmp(in->s, "transid", 7)==0)
@@ -96,7 +97,7 @@ int pv_parse_msrp_name(pv_spec_t *sp, str *in)
 				sp->pvp.pvn.u.isname.name.n = 20;
 			else goto error;
 		break;
-		case 8: 
+		case 8:
 			if(strncmp(in->s, "firsthop", 8)==0)
 				sp->pvp.pvn.u.isname.name.n = 16;
 			else if(strncmp(in->s, "prevhops", 8)==0)




More information about the sr-dev mailing list