Here's a small patch that will add support for
PRACK and UPDATE parsing.
Some modules in k require this.
Regards,
Ovidiu Sas
$ git diff
diff --git a/parser/msg_parser.h b/parser/msg_parser.h
index 48790c9..d1c6324 100644
--- a/parser/msg_parser.h
+++ b/parser/msg_parser.h
@@ -79,7 +79,8 @@
enum request_method { METHOD_UNDEF=0, METHOD_INVITE=1,
METHOD_CANCEL=2, METHOD_ACK=4,
METHOD_BYE=8, METHOD_INFO=16, METHOD_REGISTER=32, METHOD_SUBSCRIBE=64,
METHOD_NOTIFY=128, METHOD_MESSAGE=256, METHOD_OPTIONS=512,
- METHOD_OTHER=1024 };
+ METHOD_PRACK=1024, METHOD_UPDATE=2048,
+ METHOD_OTHER=4096 };
#define FL_FORCE_RPORT (1 << 0) /* force rport */
#define FL_FORCE_ACTIVE (1 << 1) /* force active SDP */
diff --git a/parser/parse_fline.c b/parser/parse_fline.c
index e234835..81b235f 100644
--- a/parser/parse_fline.c
+++ b/parser/parse_fline.c
@@ -125,6 +125,8 @@ char* parse_first_line(char* buffer, unsigned int
len, struct msg_start * fl)
else IFISMETHOD( NOTIFY, 'N')
else IFISMETHOD( MESSAGE, 'M')
else IFISMETHOD( OPTIONS, 'O')
+ else IFISMETHOD( PRACK, 'P')
+ else IFISMETHOD( UPDATE, 'U')
/* 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/parser/parse_fline.h b/parser/parse_fline.h
index f8b3e06..aae71a4 100644
--- a/parser/parse_fline.h
+++ b/parser/parse_fline.h
@@ -60,6 +60,8 @@
#define NOTIFY_LEN 6
#define MESSAGE_LEN 7
#define OPTIONS_LEN 7
+#define PRACK_LEN 5
+#define UPDATE_LEN 6
struct msg_start {
int type; /* Type of the
Message - Request/Response */
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev