Hello,
I have found out that sipp-3.1 contents a bug. Sipp truncates received
media port to four symbols.
Here is the patch.
I am sorry if it is already known issue.
Andrej Aleksandrov
--- call.cpp.orig 2009-01-13 08:41:27.000000000 +0200
+++ call.cpp 2009-01-13 08:43:07.000000000 +0200
@@ -176,7 +176,7 @@
uint16_t get_remote_port_media(char *msg, int pattype)
{
char *pattern;
- char *begin, *end;
+ char *begin, *end, *mport;
char number[6];
if (pattype == PAT_AUDIO) {
@@ -193,11 +193,14 @@
return 0;
}
begin += strlen(pattern) - 1;
+ mport = strstr(begin + 1, " ");
end = strstr(begin, "\r\n");
if (!end)
ERROR("get_remote_port_media: no CRLF found");
memset(number, 0, sizeof(number));
- strncpy(number, begin, sizeof(number) - 1);
+ //strncpy(number, begin, sizeof(number) - 1);
+ strncpy(number, begin, mport - begin);
+ //ERROR("**** get_remote_port %s\n", number);
return atoi(number);
}
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users