[sr-dev] git:master:e79257c4: core: update first line parser to recognize new method IDs

Charles Chance charles.chance at sipcentric.com
Thu Aug 2 17:27:08 CEST 2018


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

Author: Charles Chance <charles.chance at sipcentric.com>
Committer: Charles Chance <charles.chance at sipcentric.com>
Date: 2018-08-02T16:02:32+01:00

core: update first line parser to recognize new method IDs

- bring up to date with new methods added in 4fe95ab

---

Modified: src/core/parser/parse_fline.c
Modified: src/core/parser/parse_fline.h

---

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

---

diff --git a/src/core/parser/parse_fline.c b/src/core/parser/parse_fline.c
index 04758b2751..e6b93aca58 100644
--- a/src/core/parser/parse_fline.c
+++ b/src/core/parser/parse_fline.c
@@ -125,6 +125,11 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start* fl)
 	else IFISMETHOD( UPDATE, 'U')
 	else IFISMETHOD( REFER, 'R')
 	else IFISMETHOD( PUBLISH, 'P')
+	else IFISMETHOD( KDMQ, 'K')
+	else IFISMETHOD( GET, 'G')
+	else IFISMETHOD( POST, 'P')
+	else IFISMETHOD( PUT, 'P')
+	else IFISMETHOD( DELETE, 'D')
 	/* if you want to add another method XXX, include METHOD_XXX in
            H-file (this is the value which you will take later in
            processing and define XXX_LEN as length of method name;
diff --git a/src/core/parser/parse_fline.h b/src/core/parser/parse_fline.h
index b10c02bc83..2add9b0efb 100644
--- a/src/core/parser/parse_fline.h
+++ b/src/core/parser/parse_fline.h
@@ -67,6 +67,11 @@
 #define UPDATE_LEN 6
 #define REFER_LEN 5
 #define PUBLISH_LEN 7
+#define KDMQ_LEN 4
+#define GET_LEN 3
+#define POST_LEN 4
+#define PUT_LEN 3
+#define DELETE_LEN 6
 
 typedef struct msg_start {
 	short type;					/*!< Type of the message - request/response */




More information about the sr-dev mailing list