Loading codec/c++/sip_codets.cpp +12 −3 Changes for codec/c++/sip_codets.cpp: 12 added lines, 3 removed lines. Original line number Diff line number Diff line //#include "gen_classes.h" //#include "Regex.h" #include "common_sip_msrp.h" #include "common_debug_log.h" #include <iostream> #include <fstream> Loading @@ -12,7 +13,7 @@ namespace t3devlib { namespace gen { logfile << "CaptureSource::PreEncodeField: " << field_id << std::endl; logfile.close(); }*/ #define DEBUG_LOG_FILE "C:\\Temp\\LibSip.log" // // Implementation of the decoder for SDP // Loading Loading @@ -2515,17 +2516,24 @@ void ServerVal_List::PreEncodeField (int field_id, Buffer& buffer) throw (Encode void ServerVal_List::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_content ("^((?:" SIPREG_TOKEN "(?:" SIPREG_SLASH SIPREG_TOKEN ")?)|" SIPREG_COMMENT ")"); debug_log_PreDecodeField(DEBUG_LOG_FILE, "ServerVal_List", id); reg_content.AssertMatch(buffer, this); SetHypFieldLength(reg_content.GetMatchedLength()); } void ServerVal_List::PostDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_content("^((?:" SIPREG_TOKEN "(?:" SIPREG_SLASH SIPREG_TOKEN ")?)|" SIPREG_COMMENT ")"); static Regex reg_separator ("^" SIPREG_LWS); if (reg_separator.Match (buffer)) { debug_log_PostDecodeField(DEBUG_LOG_FILE, "ServerVal_List", id); debug_log(DEBUG_LOG_FILE, GetField(id).GetValue()); if (reg_separator.Match (buffer)) reg_separator.MovePast (buffer); if(reg_content.Match(buffer)) SetHypSize (GetSize() + 1); } else SetHypSize (-2); } Loading Loading @@ -2914,6 +2922,7 @@ void msgname::PostDecode (Buffer& buffer, DecodeError& e) throw (DecodeError) \ logfile << "###################################################################################" << std::endl; \ logfile << "### INVALID SIP MESSAGE RECEIVED ###" << std::endl; \ logfile << "###################################################################################" << std::endl; \ logfile << "DecodeError: " << e << std::endl; \ logfile.write(reinterpret_cast<const char*>(buffer.GetValueBin()), buffer.GetLength()/8); \ logfile.close(); \ throw DecodeIgnoreMessage(e.mVar); \ Loading Loading
codec/c++/sip_codets.cpp +12 −3 Changes for codec/c++/sip_codets.cpp: 12 added lines, 3 removed lines. Original line number Diff line number Diff line //#include "gen_classes.h" //#include "Regex.h" #include "common_sip_msrp.h" #include "common_debug_log.h" #include <iostream> #include <fstream> Loading @@ -12,7 +13,7 @@ namespace t3devlib { namespace gen { logfile << "CaptureSource::PreEncodeField: " << field_id << std::endl; logfile.close(); }*/ #define DEBUG_LOG_FILE "C:\\Temp\\LibSip.log" // // Implementation of the decoder for SDP // Loading Loading @@ -2515,17 +2516,24 @@ void ServerVal_List::PreEncodeField (int field_id, Buffer& buffer) throw (Encode void ServerVal_List::PreDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_content ("^((?:" SIPREG_TOKEN "(?:" SIPREG_SLASH SIPREG_TOKEN ")?)|" SIPREG_COMMENT ")"); debug_log_PreDecodeField(DEBUG_LOG_FILE, "ServerVal_List", id); reg_content.AssertMatch(buffer, this); SetHypFieldLength(reg_content.GetMatchedLength()); } void ServerVal_List::PostDecodeField (int id, Buffer& buffer) throw (DecodeError) { static Regex reg_content("^((?:" SIPREG_TOKEN "(?:" SIPREG_SLASH SIPREG_TOKEN ")?)|" SIPREG_COMMENT ")"); static Regex reg_separator ("^" SIPREG_LWS); if (reg_separator.Match (buffer)) { debug_log_PostDecodeField(DEBUG_LOG_FILE, "ServerVal_List", id); debug_log(DEBUG_LOG_FILE, GetField(id).GetValue()); if (reg_separator.Match (buffer)) reg_separator.MovePast (buffer); if(reg_content.Match(buffer)) SetHypSize (GetSize() + 1); } else SetHypSize (-2); } Loading Loading @@ -2914,6 +2922,7 @@ void msgname::PostDecode (Buffer& buffer, DecodeError& e) throw (DecodeError) \ logfile << "###################################################################################" << std::endl; \ logfile << "### INVALID SIP MESSAGE RECEIVED ###" << std::endl; \ logfile << "###################################################################################" << std::endl; \ logfile << "DecodeError: " << e << std::endl; \ logfile.write(reinterpret_cast<const char*>(buffer.GetValueBin()), buffer.GetLength()/8); \ logfile.close(); \ throw DecodeIgnoreMessage(e.mVar); \ Loading