From MAILER-DAEMON Wed Dec 01 08:39:34 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1CZUhi-00063n-Ns
	for mharc-bug-commoncpp@gnu.org; Wed, 01 Dec 2004 08:39:34 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1CZUhe-00063K-U7
	for bug-commoncpp@gnu.org; Wed, 01 Dec 2004 08:39:30 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1CZUhe-00062z-4D
	for Bug-commoncpp@gnu.org; Wed, 01 Dec 2004 08:39:30 -0500
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1CZUhd-00062w-V5
	for Bug-commoncpp@gnu.org; Wed, 01 Dec 2004 08:39:30 -0500
Received: from [64.233.184.206] (helo=wproxy.gmail.com)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZUXg-0008Vu-Bk
	for Bug-commoncpp@gnu.org; Wed, 01 Dec 2004 08:29:12 -0500
Received: by wproxy.gmail.com with SMTP id 67so138944wri
	for <Bug-commoncpp@gnu.org>; Wed, 01 Dec 2004 05:29:11 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
	b=Hrmlzz782VoUNdRfGPpSWPNCY3q/wXTBDQH0VxawdezRL4efqjZK85EzDhFkohPjyG6Un0d98jxsCy83JX/wNoFd/6zG65hVEZx8Ma+v7M2QMlT1aiKRG/Kmlvah8ueE23ekBNrnLiQxxAxBXUCi7nawCeDCPyC19E7H66SOY4s=
Received: by 10.54.27.9 with SMTP id a9mr654018wra;
	Wed, 01 Dec 2004 05:29:11 -0800 (PST)
Received: by 10.54.43.18 with HTTP; Wed, 1 Dec 2004 05:29:11 -0800 (PST)
Message-ID: <ac488cf7041201052928bf7a62@mail.gmail.com>
Date: Wed, 1 Dec 2004 22:29:11 +0900
From: HyoungJu Lee <bstill@gmail.com>
To: Bug-commoncpp@gnu.org
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Cc: 
Subject: ccrtp 1.1.2 "removeDestinationFromList()" seems bug.
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: HyoungJu Lee <bstill@gmail.com>
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Dec 2004 13:39:31 -0000

Hi,
I think there is some bug.
========================================================
> +                       if ( getFirstDestination() == ta )
> +                               firstDestination = NULL;
====================================================
Let's assume that DestinationList object have A (first) and B (second)
transport address.
Now, I do "forgetDestination(A)", and then firstDesttination is NULL? 
and now I do "addDestination(A)", DestinationList object ONLY HAVE a "
A" address and destinationCounter value is 2.
so, I think,...
========================================================
                       if ( getFirstDestination() == ta ) 
                              if(ta->getNext()) firstDestination =
ta->getNext();
                              else                  firstDestination = NULL;
====================================================
Is right?



From MAILER-DAEMON Wed Dec 01 14:49:29 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1CZaTg-0003X2-TS
	for mharc-bug-commoncpp@gnu.org; Wed, 01 Dec 2004 14:49:29 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1CZaTf-0003Wp-7C
	for bug-commoncpp@gnu.org; Wed, 01 Dec 2004 14:49:27 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1CZaTe-0003WQ-Ct
	for bug-commoncpp@gnu.org; Wed, 01 Dec 2004 14:49:26 -0500
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1CZaTe-0003WN-9o
	for bug-commoncpp@gnu.org; Wed, 01 Dec 2004 14:49:26 -0500
Received: from [216.68.248.32] (helo=Milcor21.milacron.com)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZaK0-0005K6-Ru
	for bug-commoncpp@gnu.org; Wed, 01 Dec 2004 14:39:29 -0500
Received: from dmeusmail.dmeus.milacron.com ([143.62.132.57]) by
	Milcor21.milacron.com with Microsoft SMTPSVC(5.0.2195.6713); 
	Wed, 1 Dec 2004 13:50:45 -0500
Received: by dmeusmail.dmeus.milacron.com with Internet Mail Service
	(5.5.2657.72) id <XFYNGN3C>; Wed, 1 Dec 2004 13:54:18 -0500
Message-ID: <EF398F42BE1BDF479B1E481F6E0053F202C3FDFF@dmeusmail.dmeus.milacron.com>
From: erik_ohrnberger@dme.net
To: bug-commoncpp@gnu.org
Date: Wed, 1 Dec 2004 13:54:17 -0500 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: text/plain;
	charset="iso-8859-1"
X-OriginalArrivalTime: 01 Dec 2004 18:50:45.0655 (UTC)
	FILETIME=[AA7DA270:01C4D7D6]
Subject: RE: Exception support in the persistence engine - more info.
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Dec 2004 19:49:27 -0000

The reason that I ask is based on a test program that I wrote.

It simply opens an output archive stream, writes a single int value to it,
and closes it.  Then it opens that very stream for read, reads a float.
You'd figure that this would cause some sort of exception, but it does not.

I've repeated the same experiment by writing a vector of 10 ints to the
stream, and then reading back 11 floats.  Still no exception.  I would have
thought that it would be have generated some sort of 'seek beyond end of
file' type of error.

I've repeated the same experiment again, writing a vector of ints, and
reading a map< int, float> back in, and still no error.

Am I missing something here?  Based on these experiment results, it would
appear that using exceptions turns off all error checking and reporting, and
in fact no exceptions are thrown.  This is a bit concerning to me as it
raises the probability of reading in and trying to process corrupt data.

> -----Original Message-----
> From: bug-commoncpp-bounces+erik_ohrnberger=dme.net@gnu.org
> [mailto:bug-commoncpp-bounces+erik_ohrnberger=dme.net@gnu.org]
> On Behalf
> Of Erik Ohrnberger
> Sent: Tuesday, November 30, 2004 2:49 PM
> To: bug-commoncpp@gnu.org
> Subject: Exception support in the persistence engine
> 
> 
> Is it just me, or is the exception support in the persistence 
> engine not
> quite ready for prime time yet?
> 
> If it's ready, how to turn it on so that I can use 
> exceptions?  Seems like
> whatever I do to config.h, or configure, the g++ preprocessor 
> throws away
> the THROWS macros.
> 
> Thanks for the assist.
> 
> Erik.
> 
> 
> 
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-commoncpp
> 



From MAILER-DAEMON Wed Dec 08 19:13:12 2004
Received: from mailman by lists.gnu.org with archive (Exim 4.33)
	id 1CcBvj-0003xD-Ub
	for mharc-bug-commoncpp@gnu.org; Wed, 08 Dec 2004 19:13:12 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33)
	id 1CcBvh-0003wd-AM
	for bug-commoncpp@gnu.org; Wed, 08 Dec 2004 19:13:09 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33)
	id 1CcBvg-0003wH-9q
	for bug-commoncpp@gnu.org; Wed, 08 Dec 2004 19:13:08 -0500
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.33) id 1CcBvg-0003w0-0k
	for bug-commoncpp@gnu.org; Wed, 08 Dec 2004 19:13:08 -0500
Received: from [62.212.96.151] (helo=crash.yannos.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.34) id 1CcBld-00028h-0l
	for bug-commoncpp@gnu.org; Wed, 08 Dec 2004 19:02:45 -0500
Received: from localhost (localhost [127.0.0.1])
	by crash.yannos.com (Postfix) with ESMTP id 6337F3E567
	for <bug-commoncpp@gnu.org>; Thu,  9 Dec 2004 01:02:40 +0100 (CET)
Received: from crash.yannos.com ([127.0.0.1])
	by localhost (crash [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
	id 31103-10 for <bug-commoncpp@gnu.org>;
	Thu, 9 Dec 2004 01:02:37 +0100 (CET)
Received: from [192.168.1.99] (m157.net81-67-110.noos.fr [81.67.110.157])
	by crash.yannos.com (Postfix) with ESMTP id 58FFF3E566
	for <bug-commoncpp@gnu.org>; Thu,  9 Dec 2004 01:02:33 +0100 (CET)
From: Claude Brisson <claude@renegat.net>
To: bug-commoncpp@gnu.org
Content-Type: multipart/mixed; boundary="=-xcknl+G1g8qJ4wPc+7fQ"
Message-Id: <1102550553.3600.22.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.6 
Date: Thu, 09 Dec 2004 01:02:33 +0100
X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at yannos.com
Subject: datagram sockets bound at creation cannot send data
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Dec 2004 00:13:09 -0000


--=-xcknl+G1g8qJ4wPc+7fQ
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi

I found a strange behaviour of the UDPSocket class.

When an UDPSocket is created using the constructor :
UDPSocket::UDPSocket(InetHostAddress("127.0.0.1"),0)
then its send method fails with EINVAL (Invalid argument).

If I create an unbound UDPSocket using the default constructor, the send
method works.

I've attached a sample program that reproduces the problem.

Everything occurs as if the former constructor allowed only receiving
sockets. I know that it is not always advised to send and receive data
using the same datagram socket (collisions, etc...), but
bidirectionality should remain possible... moreover, an UDPSocket that
is created unbound can receive data after a first send.

Thanks for your response,

Claude


--=-xcknl+G1g8qJ4wPc+7fQ
Content-Disposition: attachment; filename=testsocket.cpp
Content-Type: text/x-c++src; name=testsocket.cpp; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

#include <cc++/socket.h>

// built with :
// g++ -I/usr/include/cc++2 -c testsocket.cpp
// g++ -o testsocket -L/usr/lib testsocket.o -lccgnu2 -lpthread -ldl


using namespace ost;

void test1()
{
	char buffer[10];
	memset(buffer,char(0xFF),10);
	int sent;

	// creates a first socket, unbound
	UDPSocket socket1;//(InetHostAddress("127.0.0.1"),0);
	
	// set destination of the first socket
	socket1.setPeer(InetHostAddress("212.37.193.123"),12345);
	
	// send a packet outside (will bind the socket)
	sent = socket1.send(buffer,6);
	if (sent == -1) printf("error : %s \n",strerror(errno));
	
	// get the local port the first socket is bound to
	tpport_t port;
	socket1.getLocal(&port);
	printf("socket #1 bound to port %d \n",(int)port);
	
	// send a packet to thie first socket using a second socket
	UDPSocket socket2;
	socket2.setPeer(InetHostAddress("127.0.0.1"),port);
	sent = socket2.send(buffer,6);
	if (sent == -1) printf("error : %s \n",strerror(errno));
	
	sleep(1);
	
	// check the first socket has received the packet
	if (socket1.isPending(Socket::pendingInput,0)) {
		sent=socket1.receive(buffer,6);
		if (sent == -1) printf("error : %s \n",strerror(errno));
	}
	else printf("error : no incoming data found!\n");
}

void test2()
{
	char buffer[10];
	memset(buffer,char(0xFF),10);
	int sent;

	// creates a first socket, bound
	UDPSocket socket1(InetHostAddress("127.0.0.1"),0);
	
	// set destination of the first socket
	socket1.setPeer(InetHostAddress("192.168.1.10"),12345);

	// send a packet outside
	sent = socket1.send(buffer,6);
	if (sent == -1) printf("error : %s \n",strerror(errno));
	
	// get the local port the first socket is bound to
	tpport_t port;
	socket1.getLocal(&port);
	printf("socket #1 bound to port %d \n",(int)port);
	
	// send a packet to thie first socket using a second socket
	UDPSocket socket2;
	socket2.setPeer(InetHostAddress("127.0.0.1"),port);
	sent = socket2.send(buffer,6);
	if (sent == -1) printf("error : %s \n",strerror(errno));
	
	sleep(1);
	
	// check the first socket has received the packet
	if (socket1.isPending(Socket::pendingInput,0)) {
		sent=socket1.receive(buffer,6);
		if (sent == -1) printf("error : %s \n",strerror(errno));
	}
	else printf("error : no incoming data found!\n");
}

int main(int argc,char* argv[])
{
	printf("test #1...\n");
	test1();
	printf("test #2...\n");
	test2();
}

--=-xcknl+G1g8qJ4wPc+7fQ--




