Commit ef203906 authored by baire's avatar baire
Browse files

added UNKNOWN_METHOD_E so as to match unknown methods

parent 36ac4e96
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -534,7 +534,8 @@ const char* Method::msSipMethods[] = {
	"REFER_E",
	"UPDATE_E",
	"MESSAGE_E",
	"INFO_E"
	"INFO_E",
	"UNKNOWN_METHOD_E"
	, "" };

const char* Method::msMethodValues[] = { 
@@ -552,6 +553,7 @@ const char* Method::msMethodValues[] = {
	"UPDATE",
	"MESSAGE",
	"INFO"
	"UNKNOWN_METHOD"
	, "" };

void Method::Encode (Buffer& buffer) throw (EncodeError)
@@ -588,12 +590,10 @@ void Method::Decode (Buffer& buffer) throw (DecodeError)
		i++;

	if (*(ppValue[i]) == 0) {
		std::string message ("unsupported enum value '");
		message += val;
		throw DecodeError (this, message);
	}

		SetValueString ("UNKNOWN_METHOD_E");
	} else {
		SetValueString (msSipMethods[i]);
	}
	buffer.SetPosition(buffer.GetPosition() + reg_method.GetMatchedLength());
}

+3 −1
Original line number Diff line number Diff line
@@ -445,7 +445,9 @@ group SubTypes{// Subtypes
		  REFER_E, // [3515]
		  UPDATE_E, // [3311]
		  MESSAGE_E, // [3428]
		  INFO_E	// [2976]
		  INFO_E,	// [2976]

		  UNKNOWN_METHOD_E
		  }
	        
      // [20.1, 20.3, 20.4, 20.7, 20.9, 20.10, 20.11, 20.18, 20.20, 20.27, 20.28, 20.30, 20.31,