Module: sip-router
Branch: master
Commit: 74ca8909a3b2ffd7a26a3cb10b0422f2cccd17d7
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=74ca890…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Jan Janak <jan(a)iptel.org>
Date: Mon Mar 23 20:09:40 2009 +0100
Teach the parser recognize PRACK and UPDATE methods
Signed-off-by: Jan Janak <jan(a)iptel.org>
---
parser/msg_parser.h | 2 +-
parser/parse_fline.c | 2 ++
parser/parse_fline.h | 2 ++
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/parser/msg_parser.h b/parser/msg_parser.h
index 624c2ab..af85f21 100644
--- a/parser/msg_parser.h
+++ b/parser/msg_parser.h
@@ -79,7 +79,7 @@
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 */