Browse Source

Teach the parser recognize PRACK and UPDATE methods

Signed-off-by: Jan Janak <[email protected]>
Ovidiu Sas 16 years ago
parent
commit
74ca8909a3
3 changed files with 5 additions and 1 deletions
  1. 1 1
      parser/msg_parser.h
  2. 2 0
      parser/parse_fline.c
  3. 2 0
      parser/parse_fline.h

+ 1 - 1
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 */

+ 2 - 0
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;

+ 2 - 0
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 */