Browse code

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

Andrei Pelinescu-Onciul authored on 23/05/2005 09:20:57
Showing 5 changed files
... ...
@@ -805,6 +805,7 @@ static int assemble_msg(struct sip_msg* msg, struct tw_info *twi)
805 805
 	    str_uri.len,str_uri.len ? str_uri.s : "");
806 806
 	
807 807
 	if ( REQ_LINE(msg).method_value==METHOD_INVITE || 
808
+	     REQ_LINE(msg).method_value==METHOD_INFO ||
808 809
 			(twi->append && twi->append->add_body) ) {
809 810
 		/* get body */
810 811
 		if( (body.s = get_body(msg)) == 0 ){
... ...
@@ -67,7 +67,7 @@
67 67
 
68 68
 /* number methods as power of two to allow bitmap matching */
69 69
 enum request_method { METHOD_UNDEF=0, METHOD_INVITE=1, METHOD_CANCEL=2, METHOD_ACK=4, 
70
-	METHOD_BYE=8, METHOD_OTHER=16 };
70
+	METHOD_BYE=8, METHOD_INFO=16, METHOD_OTHER=32 };
71 71
 
72 72
 #define FL_FORCE_RPORT 1   /* force rport */
73 73
 #define FL_FORCE_ACTIVE 2  /* force active SDP */
... ...
@@ -1192,6 +1192,7 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start * fl)
1192 1192
 	else IFISMETHOD( CANCEL, 'C')
1193 1193
 	else IFISMETHOD( ACK, 'A' )
1194 1194
 	else IFISMETHOD( BYE, 'B' ) 
1195
+	else IFISMETHOD( INFO, 'I' )
1195 1196
 	/* if you want to add another method XXX, include METHOD_XXX in
1196 1197
            H-file (this is the value which you will take later in
1197 1198
            processing and define XXX_LEN as length of method name;
... ...
@@ -51,6 +51,7 @@
51 51
 #define CANCEL_LEN 6
52 52
 #define ACK_LEN 3
53 53
 #define BYE_LEN 3
54
+#define INFO_LEN 4
54 55
 
55 56
 
56 57
 struct msg_start {
... ...
@@ -47,6 +47,7 @@
47 47
           	case METHOD_ACK: stats->dir##_requests_ack++; break;		\
48 48
           	case METHOD_CANCEL: stats->dir##_requests_cnc++; break;	\
49 49
           	case METHOD_BYE: stats->dir##_requests_bye++; break;		\
50
+		case METHOD_INFO: stats->dir##_requests_info++; break;		\
50 51
           	case METHOD_OTHER: stats->dir##_requests_other++; break;	\
51 52
           	default: LOG(L_ERR, "ERROR: unknown method in rq stats (%s)\n", \
52 53
 							#dir);	\