2
0
Эх сурвалжийг харах

core: PUBLISH and REFER recognized by first line parser

- still duplicity of getting the method - parse_metod() and macro by
  parsing first line
Daniel-Constantin Mierla 16 жил өмнө
parent
commit
8b52126395

+ 2 - 0
parser/parse_fline.c

@@ -127,6 +127,8 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start * fl)
 	else IFISMETHOD( OPTIONS, 'O')
 	else IFISMETHOD( PRACK, 'P')
 	else IFISMETHOD( UPDATE, 'U')
+	else IFISMETHOD( REFER, 'R')
+	else IFISMETHOD( PUBLISH, 'P')
 	/* 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

@@ -62,6 +62,8 @@
 #define OPTIONS_LEN 7
 #define PRACK_LEN 5
 #define UPDATE_LEN 6
+#define REFER_LEN 5
+#define PUBLISH_LEN 7
 
 struct msg_start {
 	int type;					/* Type of the Message - Request/Response */