static int SIP_ignoreChannels(SIP_DialogData* dialog, Packet* p, SIP_PROTO_CONF* config)
{
SIP_MediaData* mdataA,* mdataB;
- FlowData *fd;
if (0 == config->ignoreChannel)
return false;
sfip_to_str(&mdataA->maddress), mdataA->mport); );
DEBUG_WRAP(DebugMessage(DEBUG_SIP, "Ignoring channels Destine IP: %s Port: %u\n",
sfip_to_str(&mdataB->maddress), mdataB->mport); );
+
/* Call into Streams to mark data channel as something to ignore. */
#ifdef HAVE_DAQ_ADDRESS_SPACE_ID
- fd = stream.get_application_data_from_ip_port((uint8_t)PktType::UDP, IPPROTO_UDP, &mdataA->maddress,mdataA->mport,
- &mdataB->maddress,
- mdataB->mport, 0, 0, p->pkth->address_space_id, SipFlowData::flow_id);
+ FlowData* fd = stream.get_application_data_from_ip_port(
+ (uint8_t)PktType::UDP, IPPROTO_UDP, &mdataA->maddress,mdataA->mport,
+ &mdataB->maddress, mdataB->mport, 0, 0, p->pkth->address_space_id,
+ SipFlowData::flow_id);
#else
- fd = stream.get_application_data_from_ip_port((uint8_t)PktType::UDP, IPPROTO_UDP, &mdataA->maddress,mdataA->mport,
- &mdataB->maddress,
- mdataB->mport, 0, 0, 0, SipFlowData::flow_id);
+ FlowData* fd = stream.get_application_data_from_ip_port(
+ (uint8_t)PktType::UDP, IPPROTO_UDP, &mdataA->maddress,mdataA->mport,
+ &mdataB->maddress, mdataB->mport, 0, 0, 0, SipFlowData::flow_id);
+#endif
if ( fd )
{
stream.set_ignore_direction(p->flow, SSN_DIR_BOTH);
}
else
-#endif
{
stream.ignore_session(&mdataA->maddress, mdataA->mport, &mdataB->maddress,
mdataB->mport, p->type(), SipFlowData::flow_id, SSN_DIR_BOTH);
* SIP_PARSE_SUCCESS
********************************************************************/
-static int sip_parse_authorization(SIPMsg* msg, const char* start, const char*, SIP_PROTO_CONF*)
+static int sip_parse_authorization(
+ SIPMsg* msg, const char* start, const char* end, SIP_PROTO_CONF*)
{
+#ifdef DEBUG_MSGS
DEBUG_WRAP(int length = end -start; )
DEBUG_WRAP(DebugMessage(DEBUG_SIP, "Authorization value: %.*s\n", length, start); );
+#else
+ UNUSED(end);
+#endif
msg->authorization = (char*)start;
return SIP_PARSE_SUCCESS;
}
* SIP_PARSE_SUCCESS
********************************************************************/
-static int sip_parse_content_encode(SIPMsg* msg, const char* start, const char*, SIP_PROTO_CONF*)
+static int sip_parse_content_encode(
+ SIPMsg* msg, const char* start, const char* end, SIP_PROTO_CONF*)
{
+#ifdef DEBUG_MSGS
DEBUG_WRAP(int length = end -start; )
DEBUG_WRAP(DebugMessage(DEBUG_SIP, "Content encode value: %.*s\n", length, start); );
+#else
+ UNUSED(end);
+#endif
msg->content_encode = (char*)start;
return SIP_PARSE_SUCCESS;
}