Hi Charles,
There is the same problem in 'buffer_read' function:
void buffer_read(struct sipp_socket *socket, struct socketbuf *newbuf) {
struct socketbuf *buf = socket->ss_in;
struct socketbuf *prev = buf;
if (!buf) {
socket->ss_in = newbuf;
return;
}
while(buf->next) {
prev = buf;
buf = buf->next;
}
pre->next = newbuf;
}
the 'pre->next' should be 'buf->next' too.
There are memory leak in two places:
In the executeAction function of call class
the socketaddr object should be freed after using the getaddrinfo function:
if (getaddrinfo(str_host, NULL, &hints, &local_addr) != 0) {
ERROR("Unknown host '%s' for setdest", str_host);
}
........
freeaddrinfo(local_addr);
the same problem in connect_local_twin_socket function in sipp.cpp file.
Please confirm, Thanks!
Liyinsheng[Leonid]
HUAWEI TECHNOLOGIES CO.,LTD. huawei_logo
Address: Huawei Industrial Base
Bantian Longgang
Shenzhen 518129, P.R.China
Tel: +8675528976586
E-mail: [email protected]
www.huawei.com
----------------------------------------------------------------------------
---------------------------------------------------------
This e-mail and its attachments contain confidential information from
HUAWEI, which
is intended only for the person or entity whose address is listed above. Any
use of the
information contained herein in any way (including, but not limited to,
total or partial
disclosure, reproduction, or dissemination) by persons other than the
intended
recipient(s) is prohibited. If you receive this e-mail in error, please
notify the sender by
phone or email immediately and delete it!
-----Original Message-----
From: Charles P Wright [mailto:[email protected]]
Sent: Tuesday, March 17, 2009 10:45 PM
To: leonid
Cc: [email protected]
Subject: Re: [Sipp-users] Bug in 3pcc mode
Yes, that's a bug. Your fix is in SVN revision 577.
Charles
leonid <[email protected]>
03/17/2009 03:16 AM
To
[email protected]
cc
Subject
[Sipp-users] Bug in 3pcc mode
We had performance testing in 3pcc mode, but we find there are some command
lost in heavy traffic, there maybe some errors in below code:
void buffer_write(struct sipp_socket *socket, char *buffer, size_t len,
struct sockaddr_storage *dest) {
struct socketbuf *buf = socket->ss_out;
struct socketbuf *prev = buf;
if (!buf) {
socket->ss_out = alloc_socketbuf(buffer, len, DO_COPY, dest);
TRACE_MSG("Added first buffered message to socket %d\n", socket->ss_fd);
return;
}
while(buf->next) {
prev = buf;
buf = buf->next;
}
prev->next = alloc_socketbuf(buffer, len, DO_COPY, dest);
TRACE_MSG("Appended buffered message to socket %d\n", socket->ss_fd); }
the 'prev->next' should be 'buf->next' in the last line, otherwise the last
message in the linklist will be lost Please confirm it.
Thanks!
----------------------------------------------------------------------------
--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users