Browse code

core: fixed use of flags-based protocol detection

- wrong field was used due to c&p

Daniel-Constantin Mierla authored on 14/10/2020 18:17:20
Showing 1 changed files
... ...
@@ -145,22 +145,22 @@ if (  (*tmp==(firstchar) || *tmp==((firstchar) | 32)) &&                  \
145 145
 /* sip request */
146 146
 #define IS_SIP(req)                                     \
147 147
 	(((req)->first_line.type == SIP_REQUEST) &&           \
148
-	((req)->first_line.type & FLINE_FLAG_PROTO_SIP))
148
+	((req)->first_line.flags & FLINE_FLAG_PROTO_SIP))
149 149
 
150 150
 /* sip reply */
151 151
 #define IS_SIP_REPLY(rpl)                               \
152 152
 	(((rpl)->first_line.type == SIP_REPLY) &&             \
153
-	((rpl)->first_line.type & FLINE_FLAG_PROTO_SIP))
153
+	((rpl)->first_line.flags & FLINE_FLAG_PROTO_SIP))
154 154
 
155 155
 /* http request */
156 156
 #define IS_HTTP(req)                                    \
157 157
 	(((req)->first_line.type == SIP_REQUEST) &&           \
158
-	((req)->first_line.type & FLINE_FLAG_PROTO_HTTP))
158
+	((req)->first_line.flags & FLINE_FLAG_PROTO_HTTP))
159 159
 
160 160
 /* http reply */
161 161
 #define IS_HTTP_REPLY(rpl)                              \
162 162
 	(((rpl)->first_line.type == SIP_REPLY) &&             \
163
-	((rpl)->first_line.type & FLINE_FLAG_PROTO_HTTP))
163
+	((rpl)->first_line.flags & FLINE_FLAG_PROTO_HTTP))
164 164
 
165 165
 /*! \brief
166 166
  * Return a URI to which the message should be really sent (not what should