소스 검색

- Maxim's INFO support patch (I forgot to apply it the first time)

Andrei Pelinescu-Onciul 20 년 전
부모
커밋
0f0f44c4d4
5개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      modules/tm/t_fifo.c
  2. 1 1
      parser/msg_parser.h
  3. 1 0
      parser/parse_fline.c
  4. 1 0
      parser/parse_fline.h
  5. 1 0
      stats.h

+ 1 - 0
modules/tm/t_fifo.c

@@ -805,6 +805,7 @@ static int assemble_msg(struct sip_msg* msg, struct tw_info *twi)
 	    str_uri.len,str_uri.len ? str_uri.s : "");
 	
 	if ( REQ_LINE(msg).method_value==METHOD_INVITE || 
+	     REQ_LINE(msg).method_value==METHOD_INFO ||
 			(twi->append && twi->append->add_body) ) {
 		/* get body */
 		if( (body.s = get_body(msg)) == 0 ){

+ 1 - 1
parser/msg_parser.h

@@ -67,7 +67,7 @@
 
 /* number methods as power of two to allow bitmap matching */
 enum request_method { METHOD_UNDEF=0, METHOD_INVITE=1, METHOD_CANCEL=2, METHOD_ACK=4, 
-	METHOD_BYE=8, METHOD_OTHER=16 };
+	METHOD_BYE=8, METHOD_INFO=16, METHOD_OTHER=32 };
 
 #define FL_FORCE_RPORT 1   /* force rport */
 #define FL_FORCE_ACTIVE 2  /* force active SDP */

+ 1 - 0
parser/parse_fline.c

@@ -1192,6 +1192,7 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start * fl)
 	else IFISMETHOD( CANCEL, 'C')
 	else IFISMETHOD( ACK, 'A' )
 	else IFISMETHOD( BYE, 'B' ) 
+	else IFISMETHOD( INFO, 'I' )
 	/* 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;

+ 1 - 0
parser/parse_fline.h

@@ -51,6 +51,7 @@
 #define CANCEL_LEN 6
 #define ACK_LEN 3
 #define BYE_LEN 3
+#define INFO_LEN 4
 
 
 struct msg_start {

+ 1 - 0
stats.h

@@ -47,6 +47,7 @@
           	case METHOD_ACK: stats->dir##_requests_ack++; break;		\
           	case METHOD_CANCEL: stats->dir##_requests_cnc++; break;	\
           	case METHOD_BYE: stats->dir##_requests_bye++; break;		\
+		case METHOD_INFO: stats->dir##_requests_info++; break;		\
           	case METHOD_OTHER: stats->dir##_requests_other++; break;	\
           	default: LOG(L_ERR, "ERROR: unknown method in rq stats (%s)\n", \
 							#dir);	\