From: <arc...@us...> - 2013-02-15 00:43:35
|
Revision: 628 http://sourceforge.net/p/sipp/code/628 Author: arcady-91 Date: 2013-02-15 00:43:32 +0000 (Fri, 15 Feb 2013) Log Message: ----------- Fixed one bug arising from sipp.osso.nl changes Modified Paths: -------------- sipp/trunk/call.cpp sipp/trunk/message.cpp Modified: sipp/trunk/call.cpp =================================================================== --- sipp/trunk/call.cpp 2013-02-15 00:43:24 UTC (rev 627) +++ sipp/trunk/call.cpp 2013-02-15 00:43:32 UTC (rev 628) @@ -1844,7 +1844,7 @@ int messages = sizeof(default_message_strings)/sizeof(default_message_strings[0]); default_messages = new SendingMessage* [messages]; for (int i = 0; i < messages; i++) { - default_messages[i] = new SendingMessage(main_scenario, const_cast<char*>(default_message_strings[i])); /* BUG */ + default_messages[i] = new SendingMessage(main_scenario, const_cast<char*>(default_message_strings[i])); } } Modified: sipp/trunk/message.cpp =================================================================== --- sipp/trunk/message.cpp 2013-02-15 00:43:24 UTC (rev 627) +++ sipp/trunk/message.cpp 2013-02-15 00:43:32 UTC (rev 628) @@ -88,8 +88,9 @@ #define KEYWORD_SIZE 256 -SendingMessage::SendingMessage(scenario *msg_scenario, char *src, bool skip_sanity) { - char *osrc = src; +SendingMessage::SendingMessage(scenario *msg_scenario, char *const_src, bool skip_sanity) { + char * src = strdup(const_src); + char * osrc = src; char * literal; int literalLen; char * dest; @@ -425,6 +426,7 @@ freeMessageComponent(messageComponents[i]); } free(method); + free(src); } bool SendingMessage::isAck() { return ack; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |