[sr-dev] git:master:687dad98: Merge pull request #1611 from kamailio/cchance/methods

GitHub noreply at github.com
Thu Aug 2 17:27:09 CEST 2018


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

Author: Charles Chance <charles.chance at sipcentric.com>
Committer: GitHub <noreply at github.com>
Date: 2018-08-02T16:27:03+01:00

Merge pull request #1611 from kamailio/cchance/methods

core: update first line parser to recognize new method IDs

---

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

---

Diff:  https://github.com/kamailio/kamailio/commit/687dad98cd7476f8bb17bb238efc58461cabdba5.diff
Patch: https://github.com/kamailio/kamailio/commit/687dad98cd7476f8bb17bb238efc58461cabdba5.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