From MAILER-DAEMON Wed Feb 04 13:45:19 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AoS1W-00040o-Gw
	for mharc-bug-commoncpp@gnu.org; Wed, 04 Feb 2004 13:45:18 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AoS1S-0003zs-RG
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 13:45:14 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AoS0v-0003ob-2q
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 13:45:12 -0500
Received: from [213.179.251.246] (helo=jdevelop)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AoS0u-0003nE-Ay
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 13:44:40 -0500
Received: from jdevelop (localhost [127.0.0.1])
	by jdevelop (8.12.10/8.12.10) with SMTP id i14Ij0He003885
	for <bug-commoncpp@gnu.org>; Wed, 4 Feb 2004 20:45:00 +0200 (EET)
	(envelope-from eugenydzh@jdevelop.com)
Date: Wed, 4 Feb 2004 20:44:59 +0200
From: Eugeny N Dzhurinsky <eugenydzh@jdevelop.com>
To: bug-commoncpp@gnu.org
Message-Id: <20040204204459.265b4545@jdevelop>
Organization: JDevelop software
X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; i386-portbld-freebsd4.9)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: question about SocketPort, SocketService and so on
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Feb 2004 18:45:16 -0000

<Disclaimer>
May be i failed with the mailing list, but i didn't found another
one at gnu.org.
</Disclaimer>

Hello!
Have a question regarding the applying the SocketPort and SocketService
to my project. 

I need to do something like this - listen for incoming
connections at specified port, then when connection comes, take the
first 8 bytes of the packet, extract the packet length from it and
read the packet's tail. I tried to alter the existing example
"tcpservice", but seems that the method pending() of SocketPort class is
called from the SocketSerivice asynchronous. But i don't need such
functionality, because it makes mu job a bit complicated. Is there a way
where i can call the receive() method in "blocking" mode, so i can read
the 80 bytes, then calculate the length and then read the data from
socket unless all the packet read?



From MAILER-DAEMON Wed Feb 04 14:07:52 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AoSNL-0003H7-JC
	for mharc-bug-commoncpp@gnu.org; Wed, 04 Feb 2004 14:07:51 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AoSNB-0003DV-Ig
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 14:07:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AoSLJ-0001sW-Pt
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 14:06:18 -0500
Received: from [194.67.67.195] (helo=trinity.dezcom.mephi.ru)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AoSKm-0001FT-LI
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 14:05:12 -0500
Received: from ilfis.dezcom.mephi.ru ([10.3.78.1])
	by trinity.dezcom.mephi.ru with asmtp (Exim 3.36 #1 (Debian))
	id 1AoSKc-0004PX-00; Wed, 04 Feb 2004 22:05:02 +0300
Date: Wed, 4 Feb 2004 22:03:42 +0300
From: Andrey Kulikov <ilfis@dezcom.mephi.ru>
X-Mailer: The Bat! (v2.00)
Organization: B3A
X-Priority: 3 (Normal)
Message-ID: <74696655718.20040204220342@dezcom.mephi.ru>
To: Eugeny N Dzhurinsky <eugenydzh@jdevelop.com>
In-Reply-To: <20040204204459.265b4545@jdevelop>
References: <20040204204459.265b4545@jdevelop>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-DEZCOM-MailScanner: Found to be clean
Cc: bug-commoncpp@gnu.org
Subject: Re: question about SocketPort, SocketService and so on
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Feb 2004 19:07:43 -0000

Hello Eugeny,

END> I need to do something like this - listen for incoming
END> connections at specified port, then when connection comes, take the
END> first 8 bytes of the packet, extract the packet length from it and
END> read the packet's tail. I tried to alter the existing example
END> "tcpservice", but seems that the method pending() of SocketPort class is
END> called from the SocketSerivice asynchronous. But i don't need such
END> functionality, because it makes mu job a bit complicated. Is there a way
END> where i can call the receive() method in "blocking" mode, so i can read
END> the 80 bytes, then calculate the length and then read the data from
END> socket unless all the packet read?

Some times ago i have the same problem.
And i have solve this by the writing a superstructure under the
TCPSocket class. It's work, but implementation looks terrible.
I can sent to you source codes. May be you can form that in useful
manner.

-- 
Best regards,
 Andrey                            mailto:ilfis@dezcom.mephi.ru




From MAILER-DAEMON Wed Feb 04 14:43:16 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AoSvb-0000LD-4c
	for mharc-bug-commoncpp@gnu.org; Wed, 04 Feb 2004 14:43:15 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AoSvY-0000Ja-4G
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 14:43:12 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AoSv0-0000CX-Vx
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 14:43:10 -0500
Received: from [213.179.251.246] (helo=jdevelop)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AoSv0-0000BT-5L
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 14:42:38 -0500
Received: from jdevelop (localhost [127.0.0.1])
	by jdevelop (8.12.10/8.12.10) with SMTP id i14JgvHe004357
	for <bug-commoncpp@gnu.org>; Wed, 4 Feb 2004 21:42:57 +0200 (EET)
	(envelope-from eugenydzh@jdevelop.com)
Date: Wed, 4 Feb 2004 21:42:57 +0200
From: Eugeny N Dzhurinsky <eugenydzh@jdevelop.com>
To: bug-commoncpp@gnu.org
Message-Id: <20040204214257.77dba006@jdevelop>
In-Reply-To: <74696655718.20040204220342@dezcom.mephi.ru>
References: <20040204204459.265b4545@jdevelop>
	<74696655718.20040204220342@dezcom.mephi.ru>
Organization: JDevelop software
X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; i386-portbld-freebsd4.9)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: question about SocketPort, SocketService and so on
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Feb 2004 19:43:13 -0000

On Wed, 4 Feb 2004 22:03:42 +0300 Andrey Kulikov <ilfis@dezcom.mephi.ru>
wrote:

> Hello Eugeny,
> 
> END> I need to do something like this - listen for incoming
> END> connections at specified port, then when connection comes, take
> END> the first 8 bytes of the packet, extract the packet length from
> END> it and read the packet's tail. I tried to alter the existing
> END> example"tcpservice", but seems that the method pending() of
> END> SocketPort class is called from the SocketSerivice asynchronous.
> END> But i don't need such functionality, because it makes mu job a
> END> bit complicated. Is there a way where i can call the receive()
> END> method in "blocking" mode, so i can read the 80 bytes, then
> END> calculate the length and then read the data from socket unless
> END> all the packet read?
> 
> Some times ago i have the same problem.
> And i have solve this by the writing a superstructure under the
> TCPSocket class. It's work, but implementation looks terrible.
> I can sent to you source codes. May be you can form that in useful
> manner.

Well, seems that if ound a way with altering the TCPSocket and
TCPSession classes, but sure, i would like to see your sources, if
possible ;)



From MAILER-DAEMON Wed Feb 04 16:17:44 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AoUOb-0005hE-R8
	for mharc-bug-commoncpp@gnu.org; Wed, 04 Feb 2004 16:17:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AoUOA-0005PW-DG
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 16:16:50 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AoUNS-0004k6-Mb
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 16:16:38 -0500
Received: from [213.179.251.246] (helo=jdevelop)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AoUMc-0003wn-4G
	for bug-commoncpp@gnu.org; Wed, 04 Feb 2004 16:15:14 -0500
Received: from jdevelop (localhost [127.0.0.1])
	by jdevelop (8.12.10/8.12.10) with SMTP id i14LFZHe004738
	for <bug-commoncpp@gnu.org>; Wed, 4 Feb 2004 23:15:35 +0200 (EET)
	(envelope-from eugenydzh@jdevelop.com)
Date: Wed, 4 Feb 2004 23:15:35 +0200
From: Eugeny N Dzhurinsky <eugenydzh@jdevelop.com>
To: "bug-commoncpp@gnu.org" <bug-commoncpp@gnu.org>
Message-Id: <20040204231535.7a2bb01c@jdevelop>
Organization: JDevelop software
X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; i386-portbld-freebsd4.9)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: TCPSession.readLine question
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Feb 2004 21:17:14 -0000

Hello.
In the specs it described that TCPSession.readLine returns the actual
bytes read. But as i see now, it returns the actual bytes read-1. What's
wrong with this?



From MAILER-DAEMON Tue Feb 10 08:24:52 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AqXsi-0004uw-CK
	for mharc-bug-commoncpp@gnu.org; Tue, 10 Feb 2004 08:24:52 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AqPUB-0006vX-Gu
	for bug-commoncpp@gnu.org; Mon, 09 Feb 2004 23:26:59 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AqPTe-0006lf-5W
	for bug-commoncpp@gnu.org; Mon, 09 Feb 2004 23:26:57 -0500
Received: from [24.93.47.40] (helo=ms-smtp-01-eri0.texas.rr.com)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AqPTd-0006l5-LJ
	for bug-commoncpp@gnu.org; Mon, 09 Feb 2004 23:26:25 -0500
Received: from rt311-3 (cs679158-29.austin.rr.com [67.9.158.29])
	by ms-smtp-01-eri0.texas.rr.com (8.12.10/8.12.7) with ESMTP id
	i1A4QILc008289
	for <bug-commoncpp@gnu.org>; Mon, 9 Feb 2004 22:26:22 -0600 (CST)
From: "Jeffrey B. Reed" <daboys@austin.rr.com>
To: bug-commoncpp@gnu.org
Content-Type: multipart/mixed; boundary="=-ig5lUplau7nlA0/kmu77"
Message-Id: <1076386706.3735.12.camel@jethro>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.0 
Date: 09 Feb 2004 22:18:26 -0600
X-Mailman-Approved-At: Tue, 10 Feb 2004 08:24:50 -0500
Subject: String less bug patch
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: daboys@austin.rr.com
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Feb 2004 04:27:00 -0000


--=-ig5lUplau7nlA0/kmu77
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I downloaded commoncpp2-1.1.0 and compiled some code that I had
exercising persistence objects.  I found that the new String object
introduced a bug when using them as keys in a std::map.  std::map relies
on less<String> to order the map.  This is used during insert, find
etc.  Less uses the following prototype to compare the objects

bool String::operator<(const String&) const;

This method was not supported as shown instead the method was declared 
as:

bool String::operator<(const String&);

Since this does not match what less was looking for, it ended up using
less<const char*> by converting const String to const char* using:

inline String::operator char *() const;

This of course did not produce the correct results.  

I have taken the liberty of including a patch.  I have modified some of
the true constant method declarations and implementations.  I did not
get all of them I am sure, but this is a start.

Let me if you have any problems with description or the patch.

Regards,

Jeff

-- 
Jeffrey B. Reed <daboys@austin.rr.com>

--=-ig5lUplau7nlA0/kmu77
Content-Disposition: attachment; filename=string_less_patch
Content-Type: text/x-patch; name=string_less_patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: include/cc++/string.h
===================================================================
RCS file: /cvsroot/cplusplus/commoncpp2/include/cc++/string.h,v
retrieving revision 1.2
diff -u -r1.2 string.h
--- include/cc++/string.h	22 Dec 2003 23:28:36 -0000	1.2
+++ include/cc++/string.h	10 Feb 2004 04:11:50 -0000
@@ -731,18 +731,18 @@
 	friend __EXPORT int strprintf(String &str, unsigned size, const char *fmt, ...);
 #endif
 
-        bool operator<(const String &str);
-        bool operator<(const char *str);
-	bool operator>(const String &str);
-	bool operator>(const char *str);
-        bool operator<=(const String &str);
-        bool operator<=(const char *str);
-        bool operator>=(const String &str);
-        bool operator>=(const char *str);
-        bool operator==(const String &str);
-        bool operator==(const char *str);
-        bool operator!=(const String &str);
-        bool operator!=(const char *str);
+        bool operator<(const String &str) const;
+        bool operator<(const char *str) const;
+	bool operator>(const String &str) const;
+	bool operator>(const char *str) const;
+        bool operator<=(const String &str) const;
+        bool operator<=(const char *str) const;
+        bool operator>=(const String &str) const;
+        bool operator>=(const char *str) const;
+        bool operator==(const String &str) const;
+        bool operator==(const char *str) const;
+        bool operator!=(const String &str) const;
+        bool operator!=(const char *str) const;
 
 #ifdef	HAVE_SNPRINTF
 
Index: src/string.cpp
===================================================================
RCS file: /cvsroot/cplusplus/commoncpp2/src/string.cpp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 string.cpp
--- src/string.cpp	15 Dec 2003 19:26:39 -0000	1.1.1.1
+++ src/string.cpp	10 Feb 2004 04:11:50 -0000
@@ -751,7 +751,7 @@
 	return result;
 }
 
-bool String::operator<(const String &s1)
+bool String::operator<(const String &s1) const
 {
         if(compare(s1.getText()) < 0)
                 return true;
@@ -759,7 +759,7 @@
         return false;
 }
 
-bool String::operator<(const char *s1)
+bool String::operator<(const char *s1) const
 {
         if(compare(s1) < 0)
                 return true;
@@ -767,7 +767,7 @@
         return false;
 }
 
-bool String::operator>(const String &s1)
+bool String::operator>(const String &s1) const
 {
         if(compare(s1.getText()) > 0)
                 return true;
@@ -775,7 +775,7 @@
         return false;
 }
 
-bool String::operator>(const char *s1)
+bool String::operator>(const char *s1) const
 {
         if(compare(s1) > 0)
                 return true;
@@ -783,7 +783,7 @@
         return false;
 }
 
-bool String::operator<=(const String &s1)
+bool String::operator<=(const String &s1) const
 {
 	if(compare(s1.getText()) <= 0)
 		return true;
@@ -791,7 +791,7 @@
 	return false;
 }
 
-bool String::operator<=(const char *s1)
+bool String::operator<=(const char *s1) const
 {
         if(compare(s1) <= 0)
                 return true;
@@ -799,7 +799,7 @@
         return false;
 }
 
-bool String::operator>=(const String &s1)
+bool String::operator>=(const String &s1) const
 {
         if(compare(s1.getText()) >= 0)
                 return true;
@@ -807,7 +807,7 @@
         return false;
 }
 
-bool String::operator>=(const char *s1)
+bool String::operator>=(const char *s1) const
 {
         if(compare(s1) >= 0)
                 return true;
@@ -815,7 +815,7 @@
         return false;
 }
 
-bool String::operator==(const String &s1)
+bool String::operator==(const String &s1) const
 {
         if(compare(s1.getText()) == 0)
                 return true;
@@ -823,7 +823,7 @@
         return false;
 }
 
-bool String::operator==(const char *s1)
+bool String::operator==(const char *s1) const
 {
         if(compare(s1) == 0)
                 return true;
@@ -831,7 +831,7 @@
         return false;
 }
 
-bool String::operator!=(const String &s1)
+bool String::operator!=(const String &s1) const
 {
         if(compare(s1.getText()) != 0)
                 return true;
@@ -839,7 +839,7 @@
         return false;
 }
 
-bool String::operator!=(const char *s1)
+bool String::operator!=(const char *s1) const
 {
         if(compare(s1) != 0)
                 return true;

--=-ig5lUplau7nlA0/kmu77--




From MAILER-DAEMON Tue Feb 10 09:06:10 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AqYWg-00052c-5y
	for mharc-bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:06:10 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AqYRS-0004Jv-S0
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:00:46 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AqYQi-00048Y-V6
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:00:32 -0500
Received: from [138.89.37.116] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AqYQi-00047x-Ch
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:00:00 -0500
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.10/8.12.8) with ESMTP id
	i1AGDvHT031425; Tue, 10 Feb 2004 11:13:57 -0500
From: David Sugar <dyfet@ostel.com>
To: Eugeny N Dzhurinsky <eugenydzh@jdevelop.com>,
	"bug-commoncpp@gnu.org" <bug-commoncpp@gnu.org>
Date: Tue, 10 Feb 2004 09:24:06 -0500
User-Agent: KMail/1.5.3
References: <20040204231535.7a2bb01c@jdevelop>
In-Reply-To: <20040204231535.7a2bb01c@jdevelop>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200402100924.06834.dyfet@ostel.com>
Cc: 
Subject: Re: TCPSession.readLine question
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Feb 2004 14:06:08 -0000

It converts \r\n sequences to simple \n's.  Is this where we are dropping a 
character, or is it the request - nleft - 1?

On Wednesday 04 February 2004 04:15 pm, Eugeny N Dzhurinsky wrote:
> Hello.
> In the specs it described that TCPSession.readLine returns the actual
> bytes read. But as i see now, it returns the actual bytes read-1. What's
> wrong with this?
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Tue Feb 10 09:22:05 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AqYm4-0008Ox-OC
	for mharc-bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:22:04 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AqYm0-0008NC-Up
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:22:00 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AqYRt-0004Oh-39
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:01:32 -0500
Received: from [138.89.37.116] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AqYRl-0004MP-By
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:01:05 -0500
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.10/8.12.8) with ESMTP id
	i1AGEsHT031430; Tue, 10 Feb 2004 11:14:54 -0500
From: David Sugar <dyfet@ostel.com>
To: Eugeny N Dzhurinsky <eugenydzh@jdevelop.com>, bug-commoncpp@gnu.org
Date: Tue, 10 Feb 2004 09:25:04 -0500
User-Agent: KMail/1.5.3
References: <20040204204459.265b4545@jdevelop>
	<74696655718.20040204220342@dezcom.mephi.ru>
	<20040204214257.77dba006@jdevelop>
In-Reply-To: <20040204214257.77dba006@jdevelop>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200402100925.04179.dyfet@ostel.com>
Cc: 
Subject: Re: question about SocketPort, SocketService and so on
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Feb 2004 14:22:01 -0000

It could be helpful to look at this and see how SocketPort/SocketService can 
be improved.

On Wednesday 04 February 2004 02:42 pm, Eugeny N Dzhurinsky wrote:
> On Wed, 4 Feb 2004 22:03:42 +0300 Andrey Kulikov <ilfis@dezcom.mephi.ru>
>
> wrote:
> > Hello Eugeny,
> >
> > END> I need to do something like this - listen for incoming
> > END> connections at specified port, then when connection comes, take
> > END> the first 8 bytes of the packet, extract the packet length from
> > END> it and read the packet's tail. I tried to alter the existing
> > END> example"tcpservice", but seems that the method pending() of
> > END> SocketPort class is called from the SocketSerivice asynchronous.
> > END> But i don't need such functionality, because it makes mu job a
> > END> bit complicated. Is there a way where i can call the receive()
> > END> method in "blocking" mode, so i can read the 80 bytes, then
> > END> calculate the length and then read the data from socket unless
> > END> all the packet read?
> >
> > Some times ago i have the same problem.
> > And i have solve this by the writing a superstructure under the
> > TCPSocket class. It's work, but implementation looks terrible.
> > I can sent to you source codes. May be you can form that in useful
> > manner.
>
> Well, seems that if ound a way with altering the TCPSocket and
> TCPSession classes, but sure, i would like to see your sources, if
> possible ;)
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Tue Feb 10 09:22:33 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AqYmX-00009F-20
	for mharc-bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:22:33 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AqYRn-0004NT-Hj
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 09:01:07 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AqYLd-0002zE-3w
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 08:55:16 -0500
Received: from [138.89.37.116] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AqYK9-0002gk-2f
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 08:53:13 -0500
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.10/8.12.8) with ESMTP id
	i1AG6xHT031404; Tue, 10 Feb 2004 11:06:59 -0500
From: David Sugar <dyfet@ostel.com>
To: daboys@austin.rr.com, bug-commoncpp@gnu.org
Date: Tue, 10 Feb 2004 09:17:09 -0500
User-Agent: KMail/1.5.3
References: <1076386706.3735.12.camel@jethro>
In-Reply-To: <1076386706.3735.12.camel@jethro>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200402100917.09248.dyfet@ostel.com>
Cc: 
Subject: Re: String less bug patch
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Feb 2004 14:22:30 -0000

This patch I took in for 1.1.1.

On Monday 09 February 2004 11:18 pm, Jeffrey B. Reed wrote:
> I downloaded commoncpp2-1.1.0 and compiled some code that I had
> exercising persistence objects.  I found that the new String object
> introduced a bug when using them as keys in a std::map.  std::map relies
> on less<String> to order the map.  This is used during insert, find
> etc.  Less uses the following prototype to compare the objects
>
> bool String::operator<(const String&) const;
>
> This method was not supported as shown instead the method was declared
> as:
>
> bool String::operator<(const String&);
>
> Since this does not match what less was looking for, it ended up using
> less<const char*> by converting const String to const char* using:
>
> inline String::operator char *() const;
>
> This of course did not produce the correct results.
>
> I have taken the liberty of including a patch.  I have modified some of
> the true constant method declarations and implementations.  I did not
> get all of them I am sure, but this is a start.
>
> Let me if you have any problems with description or the patch.
>
> Regards,
>
> Jeff




From MAILER-DAEMON Tue Feb 10 19:26:06 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AqiCc-0007KV-6x
	for mharc-bug-commoncpp@gnu.org; Tue, 10 Feb 2004 19:26:06 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Aqhn2-0003LV-Q8
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 18:59:40 -0500
Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aqhn1-0003LL-TS
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 18:59:39 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AqhcJ-00043x-Vp
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 18:49:07 -0500
Received: from [206.46.170.106] (helo=out006.verizon.net)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AqhcJ-0003xj-Ie
	for bug-commoncpp@gnu.org; Tue, 10 Feb 2004 18:48:35 -0500
Received: from masfh ([138.88.228.235]) by out006.verizon.net
	(InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP
	id <20040210234817.UFRV1634.out006.verizon.net@masfh>
	for <bug-commoncpp@gnu.org>; Tue, 10 Feb 2004 17:48:17 -0600
From: "Fedor Bokov" <masf@masf.us>
To: <bug-commoncpp@gnu.org>
Date: Tue, 10 Feb 2004 18:48:15 -0500
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_00F5_01C3F006.72036140"
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Thread-Index: AcPwMFlvmXV9RhN9SNqBbG0BkltX4w==
X-Authentication-Info: Submitted using SMTP AUTH at out006.verizon.net from
	[138.88.228.235] at Tue, 10 Feb 2004 17:48:12 -0600
Message-Id: <20040210234817.UFRV1634.out006.verizon.net@masfh>
X-TMDA-Confirmed: Tue Feb 10 18:59:39 EST 2004
X-Mailman-Approved-At: Tue, 10 Feb 2004 19:26:02 -0500
Subject: (no subject)
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Feb 2004 23:59:41 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_00F5_01C3F006.72036140
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_00F6_01C3F006.7205D240"


------=_NextPart_001_00F6_01C3F006.7205D240
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

I've tried to use persistence classes from this library and encountered
several bugs in String class which is used implicitly by TypeManager.
1. internal method 'copy' in String class does not copy trailing '\0'.
2. comparision operators are not marked as const and therefore cannot be
used by std::less template which is used by std::map in TypeManager.
 
I attached patch which fixes these two bugs.
 
Fedor Bokov.
 

------=_NextPart_001_00F6_01C3F006.7205D240
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I've tried to use persistence classes =
from this=20
library and encountered several bugs in String class which is used =
implicitly by=20
TypeManager.<BR>1. internal method 'copy' in String class does not copy =
trailing=20
'\0'.<BR>2. comparision operators are not marked as const and therefore =
cannot=20
be used by std::less template which is used by std::map in=20
TypeManager.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D605484423-10022004><FONT face=3DArial size=3D2>I =
attached=20
patch&nbsp;which fixes these two bugs.</FONT></SPAN></DIV>
<DIV><SPAN class=3D605484423-10022004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D605484423-10022004><FONT face=3DArial size=3D2>Fedor=20
Bokov.</FONT></SPAN></DIV>
<DIV><SPAN class=3D605484423-10022004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV></BODY></HTML>

------=_NextPart_001_00F6_01C3F006.7205D240--

------=_NextPart_000_00F5_01C3F006.72036140
Content-Type: application/octet-stream;
	name="commoncpp.masf.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="commoncpp.masf.patch"

diff -r -u ./include/cc++/string.h =
../commoncpp2-1.1.0/include/cc++/string.h
--- ./include/cc++/string.h	2004-01-17 06:51:02.000000000 -0500
+++ ../commoncpp2-1.1.0/include/cc++/string.h	2004-02-10 =
00:58:15.090250000 -0500
@@ -731,18 +731,18 @@
 	friend __EXPORT int strprintf(String &str, unsigned size, const char =
*fmt, ...);
 #endif
=20
-        bool operator<(const String &str);
-        bool operator<(const char *str);
-	bool operator>(const String &str);
-	bool operator>(const char *str);
-        bool operator<=3D(const String &str);
-        bool operator<=3D(const char *str);
-        bool operator>=3D(const String &str);
-        bool operator>=3D(const char *str);
-        bool operator=3D=3D(const String &str);
-        bool operator=3D=3D(const char *str);
-        bool operator!=3D(const String &str);
-        bool operator!=3D(const char *str);
+        bool operator<(const String &str) const;
+        bool operator<(const char *str) const;
+	bool operator>(const String &str) const;
+	bool operator>(const char *str) const;
+        bool operator<=3D(const String &str) const;
+        bool operator<=3D(const char *str) const;
+        bool operator>=3D(const String &str) const;
+        bool operator>=3D(const char *str) const;
+        bool operator=3D=3D(const String &str) const;
+        bool operator=3D=3D(const char *str) const;
+        bool operator!=3D(const String &str) const;
+        bool operator!=3D(const char *str) const;
=20
 #ifdef	HAVE_SNPRINTF
=20
@@ -806,12 +806,12 @@
 	/**
 	 * Test if string is contained in our string.
 	 */
-	bool operator*=3D(const String &str);
+	bool operator*=3D(const String &str) const;
=20
 	/**
 	 * Test if text is contained in our string.
 	 */
-	bool operator*=3D(const char *str);
+	bool operator*=3D(const char *str) const;
 };
=20
 class __EXPORT SString : public String, protected std::streambuf, =
public std::ostream
diff -r -u ./src/string.cpp ../commoncpp2-1.1.0/src/string.cpp
--- ./src/string.cpp	2004-01-17 06:51:02.000000000 -0500
+++ ../commoncpp2-1.1.0/src/string.cpp	2004-02-10 01:34:36.684000000 =
-0500
@@ -412,18 +412,18 @@
 	if(!isBig())
 		return;
=20
-	if(getLength() <=3D minsize)
+	if(getLength() < minsize)
 	{
 		content.ministring.length =3D getLength();
-		memcpy(content.ministring.text, getText(), getLength());
+		memcpy(content.ministring.text, getText(), getLength() + 1);
 		content.ministring.big =3D false;
 		return;
 	}
=20
 	ptr =3D getText();
-	content.bigstring.size =3D setSize(content.bigstring.length);
+	content.bigstring.size =3D setSize(content.bigstring.length + 1);
 	content.bigstring.text =3D getSpace(getSize());
-	memcpy(content.bigstring.text, ptr, getLength());
+	memcpy(content.bigstring.text, ptr, getLength() + 1);
 }
=20
 String::~String()
@@ -751,7 +751,7 @@
 	return result;
 }
=20
-bool String::operator<(const String &s1)
+bool String::operator<(const String &s1) const
 {
         if(compare(s1.getText()) < 0)
                 return true;
@@ -759,7 +759,7 @@
         return false;
 }
=20
-bool String::operator<(const char *s1)
+bool String::operator<(const char *s1) const
 {
         if(compare(s1) < 0)
                 return true;
@@ -767,7 +767,7 @@
         return false;
 }
=20
-bool String::operator>(const String &s1)
+bool String::operator>(const String &s1) const
 {
         if(compare(s1.getText()) > 0)
                 return true;
@@ -775,7 +775,7 @@
         return false;
 }
=20
-bool String::operator>(const char *s1)
+bool String::operator>(const char *s1) const
 {
         if(compare(s1) > 0)
                 return true;
@@ -783,7 +783,7 @@
         return false;
 }
=20
-bool String::operator<=3D(const String &s1)
+bool String::operator<=3D(const String &s1) const
 {
 	if(compare(s1.getText()) <=3D 0)
 		return true;
@@ -791,7 +791,7 @@
 	return false;
 }
=20
-bool String::operator<=3D(const char *s1)
+bool String::operator<=3D(const char *s1) const
 {
         if(compare(s1) <=3D 0)
                 return true;
@@ -799,7 +799,7 @@
         return false;
 }
=20
-bool String::operator>=3D(const String &s1)
+bool String::operator>=3D(const String &s1) const
 {
         if(compare(s1.getText()) >=3D 0)
                 return true;
@@ -807,7 +807,7 @@
         return false;
 }
=20
-bool String::operator>=3D(const char *s1)
+bool String::operator>=3D(const char *s1) const
 {
         if(compare(s1) >=3D 0)
                 return true;
@@ -815,7 +815,7 @@
         return false;
 }
=20
-bool String::operator=3D=3D(const String &s1)
+bool String::operator=3D=3D(const String &s1) const
 {
         if(compare(s1.getText()) =3D=3D 0)
                 return true;
@@ -823,7 +823,7 @@
         return false;
 }
=20
-bool String::operator=3D=3D(const char *s1)
+bool String::operator=3D=3D(const char *s1) const
 {
         if(compare(s1) =3D=3D 0)
                 return true;
@@ -831,7 +831,7 @@
         return false;
 }
=20
-bool String::operator!=3D(const String &s1)
+bool String::operator!=3D(const String &s1) const
 {
         if(compare(s1.getText()) !=3D 0)
                 return true;
@@ -839,7 +839,7 @@
         return false;
 }
=20
-bool String::operator!=3D(const char *s1)
+bool String::operator!=3D(const char *s1) const
 {
         if(compare(s1) !=3D 0)
                 return true;
@@ -847,12 +847,12 @@
         return false;
 }
=20
-bool String::operator*=3D(const String &s1)
+bool String::operator*=3D(const String &s1) const
 {
 	return search(s1.getText(), s1.getLength()) !=3D npos;
 }
=20
-bool String::operator*=3D(const char *s)
+bool String::operator*=3D(const char *s) const
 {
 	return search(s) !=3D npos;
 }

------=_NextPart_000_00F5_01C3F006.72036140--






From MAILER-DAEMON Wed Feb 11 10:11:22 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1Aqw1K-0003Vy-GJ
	for mharc-bug-commoncpp@gnu.org; Wed, 11 Feb 2004 10:11:22 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1Aqw1H-0003VF-Hi
	for bug-commoncpp@gnu.org; Wed, 11 Feb 2004 10:11:19 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1Aqw0k-0003FG-JF
	for bug-commoncpp@gnu.org; Wed, 11 Feb 2004 10:11:17 -0500
Received: from [193.98.115.211] (helo=bns1.envia-tel.net)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aqw0j-0003CN-PU
	for bug-commoncpp@gnu.org; Wed, 11 Feb 2004 10:10:45 -0500
Received: from mailserver.wige-data.de (gw1.wige-data.de [80.243.44.1])
	by bns1.envia-tel.net (8.12.10/8.12.10) with ESMTP id i1BFAgGH028134
	for <bug-commoncpp@gnu.org>; Wed, 11 Feb 2004 16:10:42 +0100
Received: by mailserver.wigemic.lpz with Internet Mail Service (5.5.2653.19)
	id <1XH5K29N>; Wed, 11 Feb 2004 16:10:37 +0100
Received: from wige-data.de (taraben_a.wigemic.lpz [10.1.11.14]) by
	mailserver.wige-data.de with SMTP (Microsoft Exchange Internet
	Mail Service Version 5.5.2653.13)
	id 1XH5K29M; Wed, 11 Feb 2004 16:10:33 +0100
From: taraben.a@wige-data.de
To: bug-commoncpp@gnu.org
Message-ID: <402A45E9.5000105@wige-data.de>
Date: Wed, 11 Feb 2004 16:10:33 +0100
User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: part of debian package list
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Feb 2004 15:11:20 -0000

Hello all,

why is commoncpp2 not part of the official debian package-list?

Any info?

Adib.



From MAILER-DAEMON Wed Feb 18 07:55:44 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AtREh-0006es-T3
	for mharc-bug-commoncpp@gnu.org; Wed, 18 Feb 2004 07:55:31 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AtPOt-0001Ys-1u
	for bug-commoncpp@gnu.org; Wed, 18 Feb 2004 05:57:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AtPOL-0001GB-Og
	for bug-commoncpp@gnu.org; Wed, 18 Feb 2004 05:57:54 -0500
Received: from [195.58.224.34] (helo=skif.net)
	by monty-python.gnu.org with esmtp (Exim 4.24) id 1AtPOK-0001BL-RI
	for bug-commoncpp@gnu.org; Wed, 18 Feb 2004 05:57:21 -0500
Received: from [195.58.240.79] (HELO skif.net)
	by skif.net (CommuniGate Pro SMTP 4.1.5)
	with ESMTP id 34312757 for bug-commoncpp@gnu.org;
	Wed, 18 Feb 2004 12:57:15 +0200
Message-ID: <40334512.4050403@skif.net>
Date: Wed, 18 Feb 2004 12:57:22 +0200
From: Cronos <kronos@skif.net>
Organization: Cronos
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.4) Gecko/20030624
X-Accept-Language: en-us, en, ru
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
Content-Type: text/plain; charset=windows-1251; format=flowed
Content-Transfer-Encoding: 8bit
X-Mailman-Approved-At: Wed, 18 Feb 2004 07:55:30 -0500
Subject: common cpp 2  (1.0.13) under win32 platform (winXP)
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Feb 2004 10:57:55 -0000

Hello!

I am developer in a small company and I try to make some cross-platform 
application for our purposes. But under win32 platform (today is a 
target platform for our software) I have got several bugs (or my 
misundestoods?).

First, In the serial.cpp class under windows I have got undesired 
behaviuor in the input stream (from modem). when I send the some 
sequense like "ath", I have got only first letter "a". This behaviour is 
occured due to somthing in the windows reading file mechanizm. I have 
written additional function for avoid this.

In the serial.h:
...
         enum Queue
         {
                 queueInput,
                 queueOutput
         };
         typedef enum Queue Queue;
...
public:
...

         /**
          * Get the size of pending queue.
          *
          * @return size of the queue
          * @param que type of the queue
          */
         int getQueueSize(Queue que);
...

In the serial.cpp

...
int Serial::getQueueSize(Queue queue)
{
#ifdef WIN32
         unsigned long   dwError;
         COMSTAT cs;

         ClearCommError(dev, &dwError, &cs);

         switch(queue)
         {
         case queueInput:
                 return cs.cbInQue;
         case queueOutput:
                 return cs.cbOutQue;
         }
#else
         // not implemented yet...
#endif // !WIN32
         return 0;
}
...


After this changes I have fixed the SerialEcho.cpp sample:
...
     while (isPending(Serial::pendingInput)) {
       int x = getQueueSize(Serial::queueInput);
       cout << "queue size: " << x << endl;

       while (x-- > 0)
         cout.put( get() );
       cout << endl;
     }
...

Additionaly to above, I try to build other samples under win32 by 
msvc6.0. But almost of they are not contained ws2_32.lib in the project 
options. Please, check it.

Thank you for good library!

-- 
Ñ óâàæåíèåì,
ÎÎÎ ÍÏÏ "Êðîíîñ"





From MAILER-DAEMON Wed Feb 18 13:27:36 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.24)
	id 1AtVa4-0007x3-Ot
	for mharc-bug-commoncpp@gnu.org; Wed, 18 Feb 2004 12:33:52 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24)
	id 1AtVUH-0005NG-PO
	for bug-commoncpp@gnu.org; Wed, 18 Feb 2004 12:27:53 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24)
	id 1AtVMF-0002AN-2R
	for bug-commoncpp@gnu.org; Wed, 18 Feb 2004 12:20:06 -0500
Received: from [138.89.108.198] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.24) id 1AtVL6-0001mg-Hv
	for bug-commoncpp@gnu.org; Wed, 18 Feb 2004 12:18:24 -0500
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.10/8.12.8) with ESMTP id
	i1IJZNHT031043; Wed, 18 Feb 2004 14:35:24 -0500
From: David Sugar <dyfet@ostel.com>
To: Cronos <kronos@skif.net>, bug-commoncpp@gnu.org
Date: Wed, 18 Feb 2004 12:43:33 -0500
User-Agent: KMail/1.5.3
References: <40334512.4050403@skif.net>
In-Reply-To: <40334512.4050403@skif.net>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="windows-1251"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200402181243.33978.dyfet@ostel.com>
Cc: 
Subject: Re: common cpp 2  (1.0.13) under win32 platform (winXP)
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Feb 2004 17:33:50 -0000

I just found an equally interesting and more serious bug in 1.1.0 "terminate" 
function (w32 target only) which may also be in w32 for 1.0.13 as well; 
setting of _self.setKey(DUMMY_INVALID_THREAD) should NOT happen in terminate 
unless the current thread context is a (self)exiting thread context, or it 
could be removed completely.  Otherwise it kills the back-pointer object 
pointer to the thread that caused termination rather than the thread that is 
being terminated, and hence getThread() becomes NULL for that thread, and 
this is bad for slog() among other things....

I would like to see if this change for serial can be standardized into a patch 
for 1.1.1.

On Wednesday 18 February 2004 05:57 am, Cronos wrote:
> Hello!
>
> I am developer in a small company and I try to make some cross-platform
> application for our purposes. But under win32 platform (today is a
> target platform for our software) I have got several bugs (or my
> misundestoods?).
>
> First, In the serial.cpp class under windows I have got undesired
> behaviuor in the input stream (from modem). when I send the some
> sequense like "ath", I have got only first letter "a". This behaviour is
> occured due to somthing in the windows reading file mechanizm. I have
> written additional function for avoid this.
>
> In the serial.h:
> ...
>          enum Queue
>          {
>                  queueInput,
>                  queueOutput
>          };
>          typedef enum Queue Queue;
> ...
> public:
> ...
>
>          /**
>           * Get the size of pending queue.
>           *
>           * @return size of the queue
>           * @param que type of the queue
>           */
>          int getQueueSize(Queue que);
> ...
>
> In the serial.cpp
>
> ...
> int Serial::getQueueSize(Queue queue)
> {
> #ifdef WIN32
>          unsigned long   dwError;
>          COMSTAT cs;
>
>          ClearCommError(dev, &dwError, &cs);
>
>          switch(queue)
>          {
>          case queueInput:
>                  return cs.cbInQue;
>          case queueOutput:
>                  return cs.cbOutQue;
>          }
> #else
>          // not implemented yet...
> #endif // !WIN32
>          return 0;
> }
> ...
>
>
> After this changes I have fixed the SerialEcho.cpp sample:
> ...
>      while (isPending(Serial::pendingInput)) {
>        int x = getQueueSize(Serial::queueInput);
>        cout << "queue size: " << x << endl;
>
>        while (x-- > 0)
>          cout.put( get() );
>        cout << endl;
>      }
> ...
>
> Additionaly to above, I try to build other samples under win32 by
> msvc6.0. But almost of they are not contained ws2_32.lib in the project
> options. Please, check it.
>
> Thank you for good library!




From MAILER-DAEMON Wed Feb 25 05:17:39 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.30)
	id 1Avw6l-0008Qs-9F
	for mharc-bug-commoncpp@gnu.org; Wed, 25 Feb 2004 05:17:39 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30)
	id 1Avw6i-0008QK-2z
	for bug-commoncpp@gnu.org; Wed, 25 Feb 2004 05:17:36 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30)
	id 1Avw6B-0007vc-51
	for bug-commoncpp@gnu.org; Wed, 25 Feb 2004 05:17:34 -0500
Received: from [193.98.115.211] (helo=bns1.envia-tel.net)
	by monty-python.gnu.org with esmtp (Exim 4.30) id 1Avw54-0007Bj-AH
	for bug-commoncpp@gnu.org; Wed, 25 Feb 2004 05:15:54 -0500
Received: from mail.wigemic.lpz (gw1.wige-data.de [80.243.44.1])
	by bns1.envia-tel.net (8.12.10/8.12.10) with ESMTP id i1PAFfGH021977
	for <bug-commoncpp@gnu.org>; Wed, 25 Feb 2004 11:15:41 +0100
Received: from wige-data.de ([10.1.11.14]) by mail.wigemic.lpz with Microsoft
	SMTPSVC(6.0.3790.0); Wed, 25 Feb 2004 11:15:36 +0100
Message-ID: <403C761C.6040609@wige-data.de>
Date: Wed, 25 Feb 2004 11:17:00 +0100
From: Adib Taraben <taraben.a@wige-data.de>
User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: CommonC++ Mailingliste <bug-commoncpp@gnu.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 25 Feb 2004 10:15:36.0318 (UTC)
	FILETIME=[4F6D19E0:01C3FB88]
Subject: why win32 renamed to w32 in cvs ???
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Feb 2004 10:17:36 -0000

Hello

I got Commoncpp2-1.1.0 from sourceforge and found this:
The win32 subdir is renamed to w32.
Any reason?

Thanks,

Adib.




From MAILER-DAEMON Wed Feb 25 12:09:15 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.30)
	id 1Aw2VP-0003Kc-IT
	for mharc-bug-commoncpp@gnu.org; Wed, 25 Feb 2004 12:07:31 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30)
	id 1Aw2Tw-0002cl-10
	for bug-commoncpp@gnu.org; Wed, 25 Feb 2004 12:06:00 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30)
	id 1Aw2TH-0002JX-9R
	for bug-commoncpp@gnu.org; Wed, 25 Feb 2004 12:05:51 -0500
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.30) id 1Aw2TG-0002Ix-OX
	for bug-commoncpp@gnu.org; Wed, 25 Feb 2004 12:05:18 -0500
Received: from [193.98.115.211] (helo=bns1.envia-tel.net)
	by mx20.gnu.org with esmtp (Exim 4.30) id 1Aw2DV-0001sw-L5
	for bug-commoncpp@gnu.org; Wed, 25 Feb 2004 11:49:01 -0500
Received: from mail.wigemic.lpz (gw1.wige-data.de [80.243.44.1])
	by bns1.envia-tel.net (8.12.10/8.12.10) with ESMTP id i1PGmrGH029314
	for <bug-commoncpp@gnu.org>; Wed, 25 Feb 2004 17:48:53 +0100
Received: from wige-data.de ([10.1.11.14]) by mail.wigemic.lpz with Microsoft
	SMTPSVC(6.0.3790.0); Wed, 25 Feb 2004 17:48:48 +0100
Message-ID: <403CD241.1080800@wige-data.de>
Date: Wed, 25 Feb 2004 17:50:09 +0100
From: Adib Taraben <taraben.a@wige-data.de>
User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: CommonC++ Mailingliste <bug-commoncpp@gnu.org>
Content-Type: multipart/mixed; boundary="------------070703060901030002090808"
X-OriginalArrivalTime: 25 Feb 2004 16:48:48.0160 (UTC)
	FILETIME=[3D428200:01C3FBBF]
Subject: win32 serial.cpp patch for isPending
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Feb 2004 17:07:27 -0000

This is a multi-part message in MIME format.
--------------070703060901030002090808
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hello all,

attached there is a patch for the win32 path of serial.cpp

As I already mention Serial::isPending does not wait until timeout but 
returns immediately.

To avoid this and have a defined timeout there is a need for 
"overlapped" io.

I changed the affected functions: open, aRead, aWrite, isPending.

I tested with serialecho from demo I could remove that "sleep(500)" with 
no CPU-load.

Note:
I mentioned that aRead and aWrite are always called with Length=1. As I 
create in this function the OVERLAPPED structure, then initialize ... .
First we can check why is aWrite not called by a chunk of bytes.
And I think it is better to have 3 separate OVERLAPPED members for read, 
write, wait. They can be initialized once.

Any comments?

Adib.


serial.diff

--------------070703060901030002090808
Content-Type: text/plain;
 name="serial.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="serial.diff"

431c431
<                     FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING,
---
>                     FILE_FLAG_OVERLAPPED | FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING,
442c442
< 	unsigned long	dwLength, dwError;
---
> 	unsigned long	dwLength = 0, dwError, dwReadLength;
444,452c444,478
< 
< 	// Clear the com port of any error condition prior to read
< 	ClearCommError(dev, &dwError, &cs);
< 
< 
< 
< 	if (0 == ReadFile(dev, (void *)Data, (unsigned long)Length, &dwLength, NULL))
< 		return 0;
< 
---
>     OVERLAPPED ol;
>     
>     // Return zero if handle is invalid
>     if(dev == INVALID_HANDLE_VALUE)
>         return 0;
> 
>     // Read max length or only what is available
>     ClearCommError(dev, &dwError, &cs);
> 
>     // If not requiring an exact byte count, get whatever is available
>     if(dwLength > (int)cs.cbInQue)
>         dwReadLength = cs.cbInQue;
>     else
>         dwReadLength = Length;
> 
>     memset(&ol, 0, sizeof(OVERLAPPED));
>     ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
>     
>     if(dwReadLength > 0)
>     {
>         if(ReadFile(dev, Data, dwReadLength, &dwLength, &ol) == FALSE) 
>         {
>             if(GetLastError() == ERROR_IO_PENDING)
>             {
>                 WaitForSingleObject(ol.hEvent, INFINITE);
>                 GetOverlappedResult(dev, &ol, &dwLength, TRUE);
>             }
>             else
>                 ClearCommError(dev, &dwError, &cs);
>         }
>     }
>         
>     if(ol.hEvent != INVALID_HANDLE_VALUE)
>         CloseHandle(ol.hEvent);
>         
459a486
>     OVERLAPPED ol;
465c492,509
< 	WriteFile(dev, Data, Length, &retSize, NULL);
---
>     
>     memset(&ol, 0, sizeof(OVERLAPPED));
>     ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
> 	
>     if(WriteFile(dev, Data, Length, &retSize, &ol) == FALSE)
>     {
>         if(GetLastError() == ERROR_IO_PENDING)
>         {
>             WaitForSingleObject(ol.hEvent, INFINITE);
>             GetOverlappedResult(dev, &ol, &retSize, TRUE);
>         }
>         else
>             ClearCommError(dev, &dwError, &cs);
>     }
>     
>     if(ol.hEvent != INVALID_HANDLE_VALUE)
>         CloseHandle(ol.hEvent);
>         
865c909
< 	ClearCommError(dev, &dwError, &cs);
---
>     ClearCommError(dev, &dwError, &cs);
867,875c911,955
< 	switch(pending)
< 	{
< 	case pendingInput:
< 		return (0 != cs.cbInQue);
< 	case pendingOutput:
< 		return (0 != cs.cbOutQue);
< 	case pendingError:
< 		return false;
< 	}
---
> 	if(timeout == 0 || ((pending == pendingInput) && (0 != cs.cbInQue)) ||
> 	   ((pending == pendingOutput) && (0 != cs.cbOutQue)) || (pending == pendingError)) 
>     {
>     	switch(pending)
>     	{
>     	case pendingInput:
>             return (0 != cs.cbInQue);
>     	case pendingOutput:
>     		return (0 != cs.cbOutQue);
>     	case pendingError:
>     		return false;
>     	}
>     }
>     else
>     {
>         OVERLAPPED ol;
>         DWORD dwMask;
>         BOOL suc;
>                 
>         memset(&ol, 0, sizeof(OVERLAPPED));
>         ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
> 
>     	if(pending == pendingInput)
>             dwMask = EV_RXCHAR;
>     	else if(pending == pendingOutput)
>             dwMask = EV_TXEMPTY;
>     	else   // on error
>             dwMask = EV_ERR;
> 
>         SetCommMask(dev, dwMask);
>         // let's wait for event or timeout
>         if((suc = WaitCommEvent(dev, &dwMask, &ol)) == FALSE)
>         {
>             if(GetLastError() == ERROR_IO_PENDING)
>             {
>                 dwError = WaitForSingleObject(ol.hEvent, timeout);
>                 suc = (dwError == WAIT_OBJECT_0);
>                 SetCommMask(dev, 0);
>             }
>             else
>                 ClearCommError(dev, &dwError, &cs);
>         }
> 	
>         if(ol.hEvent != INVALID_HANDLE_VALUE)
>             CloseHandle(ol.hEvent);
876a957,958
>         return suc;
>     }

--------------070703060901030002090808--



From MAILER-DAEMON Thu Feb 26 15:10:01 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.30)
	id 1AwRpY-0007Ok-Ia
	for mharc-bug-commoncpp@gnu.org; Thu, 26 Feb 2004 15:10:00 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30)
	id 1AwRpW-0007Nc-04
	for bug-commoncpp@gnu.org; Thu, 26 Feb 2004 15:09:58 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30)
	id 1AwRos-0006zI-Vn
	for bug-commoncpp@gnu.org; Thu, 26 Feb 2004 15:09:50 -0500
Received: from [12.27.46.140] (helo=metrispo04.metriscompanies.com)
	by monty-python.gnu.org with esmtp (Exim 4.30) id 1AwRos-0006yc-E6
	for bug-commoncpp@gnu.org; Thu, 26 Feb 2004 15:09:18 -0500
Received: from azmail01.metriscompanies.com ([172.31.160.55])
	by metrispo04.metriscompanies.com (Lotus Domino Release 5.0.9)
	with ESMTP id 2004022613482386:142803 ;
	Thu, 26 Feb 2004 13:48:23 -0600 
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 6.0.3 September 26, 2003
Message-ID: <OF2C810FE3.0101225D-ON07256E46.006E71AE-07256E46.006EB47A@metriscompanies.com>
From: Jason.Majors@metriscompanies.com
Date: Thu, 26 Feb 2004 13:12:29 -0700
X-MIMETrack: Serialize by Router on AZMAIL01/Servers/Metris(Release
	6.0.3|September 26, 2003) at 02/26/2004 01:12:34 PM,
	Serialize complete at 02/26/2004 01:12:34 PM,
	Itemize by SMTP Server on metrispo04/Metris01(Release 5.0.9 |November
	16, 2001) at 02/26/2004 01:48:24 PM,
	Serialize by Router on metrispo04/Metris01(Release 5.0.9 |November 16,
	2001) at 02/26/2004 01:48:27 PM,
	Serialize complete at 02/26/2004 01:48:27 PM
Content-Type: text/plain; charset="US-ASCII"
Subject: Errors compiling commonc++2 1.1.0 on AIX 4.3.2
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Feb 2004 20:09:58 -0000

I'm trying to compile commonc++2-1.1.0 on AIX 4.3.2 using g++ 2.95.3.
I get this error message:
.../straits.h: In function `static char * 
string_char_traits<char>::copy(char *, const char *, long unsigned int)':
.../straits.h:127: cannot convert `memcpy(s1, s2, n)' from type `void' to 
type `char *'

memcpy, as defined in /usr/include/string.h, is returning a void pointer, 
not void.
Does anybody know what's wrong, or have an idea on how I can get around 
this and get it to compile?

Thanks.



From MAILER-DAEMON Thu Feb 26 17:07:47 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.30)
	id 1AwTfW-0000bA-Pt
	for mharc-bug-commoncpp@gnu.org; Thu, 26 Feb 2004 17:07:46 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30)
	id 1AwTfU-0000am-Jf
	for bug-commoncpp@gnu.org; Thu, 26 Feb 2004 17:07:44 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30)
	id 1AwTey-0000TZ-F8
	for bug-commoncpp@gnu.org; Thu, 26 Feb 2004 17:07:43 -0500
Received: from [12.27.46.140] (helo=metrispo04.metriscompanies.com)
	by monty-python.gnu.org with esmtp (Exim 4.30)
	id 1AwTey-0000TU-6Y; Thu, 26 Feb 2004 17:07:12 -0500
Received: from azmail01.metriscompanies.com ([172.31.160.55])
	by metrispo04.metriscompanies.com (Lotus Domino Release 5.0.9)
	with ESMTP id 2004022615461961:144180 ;
	Thu, 26 Feb 2004 15:46:19 -0600 
In-Reply-To: <OF2C810FE3.0101225D-ON07256E46.006E71AE-07256E46.006EB47A@metriscompanies.com>
To: Jason.Majors@metriscompanies.com
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 6.0.3 September 26, 2003
Message-ID: <OF153E79AE.CAE20613-ON07256E46.00782D9F-07256E46.00798075@metriscompanies.com>
From: Jason.Majors@metriscompanies.com
Date: Thu, 26 Feb 2004 15:10:25 -0700
X-MIMETrack: Serialize by Router on AZMAIL01/Servers/Metris(Release
	6.0.3|September 26, 2003) at 02/26/2004 03:10:30 PM,
	Serialize complete at 02/26/2004 03:10:30 PM,
	Itemize by SMTP Server on metrispo04/Metris01(Release 5.0.9 |November
	16, 2001) at 02/26/2004 03:46:19 PM,
	Serialize by Router on metrispo04/Metris01(Release 5.0.9 |November 16,
	2001) at 02/26/2004 03:46:20 PM,
	Serialize complete at 02/26/2004 03:46:20 PM
Content-Type: text/plain; charset="US-ASCII"
Cc: bug-commoncpp@gnu.org,
	bug-commoncpp-bounces+jason.majors=metriscompanies.com@gnu.org
Subject: Re: Errors compiling commonc++2 1.1.0 on AIX 4.3.2
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 26 Feb 2004 22:07:45 -0000

> I'm trying to compile commonc++2-1.1.0 on AIX 4.3.2 using g++ 2.95.3.
> I get this error message:
> .../straits.h: In function `static char *
> string_char_traits<char>::copy(char *, const char *, long unsigned 
int)':
> .../straits.h:127: cannot convert `memcpy(s1, s2, n)' from type `void' 
to
> type `char *'

> memcpy, as defined in /usr/include/string.h, is returning a void 
pointer,
> not void.
> Does anybody know what's wrong, or have an idea on how I can get around
> this and get it to compile?

> Thanks.

> 
I found a clue, which is more perplexing. It thinks memcpy is being 
defined elsewhere:

/usr/include/strings.h:60: declaration of C function `void memcpy(void *, 
const void *, long unsigned int)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/include/string.h:92: 
previous declaration `void * memcpy(void *, const void *, long unsigned 
int)' here

However line 60 of strings.h is this:
extern void bcopy(const void *, void *, size_t);

Why would bcopy override the declaration of memcpy?




From MAILER-DAEMON Fri Feb 27 12:55:40 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.30)
	id 1AwmD6-0005Z4-Gh
	for mharc-bug-commoncpp@gnu.org; Fri, 27 Feb 2004 12:55:40 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30)
	id 1AwmD3-0005YE-SV
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 12:55:37 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30)
	id 1AwmCX-0005Oh-CB
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 12:55:36 -0500
Received: from [131.234.91.10] (helo=hni.upb.de)
	by monty-python.gnu.org with esmtp (Exim 4.30) id 1AwmCX-0005OW-20
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 12:55:05 -0500
Received: from localhost (localhost [127.0.0.1])
	by hni.upb.de (Postfix) with ESMTP id B00E680C2A
	for <bug-commoncpp@gnu.org>; Fri, 27 Feb 2004 17:55:01 +0000 (MET)
Received: from hni.upb.de ([127.0.0.1])
	by localhost (hni [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
	id 09095-10 for <bug-commoncpp@gnu.org>;
	Fri, 27 Feb 2004 18:54:59 +0100 (MET)
Received: from hni.upb.de (hni-gate [192.168.10.13])
	by hni.upb.de (Postfix) with ESMTP id 6507B80C21
	for <bug-commoncpp@gnu.org>; Fri, 27 Feb 2004 18:54:59 +0100 (MET)
Message-ID: <403F8456.5090305@hni.upb.de>
Date: Fri, 27 Feb 2004 18:54:30 +0100
From: Qing Shen <qing.shen@hni.upb.de>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113
X-Accept-Language: en-us, en, zh-cn
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by amavisd-new at hni.upb.de
Subject: recv() && MSG_PEEK problem!
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Feb 2004 17:55:38 -0000

Hallo,

I recently fund a problem about recv() and MSG_PEEK which were used in 
ost::SocketPort::Peek(...).

I fund the problem by running "SampleSocketPort". the "peek" function 
can't get the right buffer size.
In my case, it always return 1 as the buffer size.

In fact it's caused by MSG_PEEK. Because it's an unreliable working 
method specially under Windows.

I tested it under several system. Furtunately I only find the problem 
under Windows 20000 professional.

further info. about MSG_PEEK problem can be fund via these links:
    http://support.microsoft.com/support/kb/articles/Q192/5/99.ASP
    http://support.microsoft.com/support/kb/articles/Q140/2/63.asp

 I hope some developer can modify this demo and maybe implement it with 
receive() instead of peek().

Thanks,

Qing Shen

-- 
========================================
   Qing Shen
   Rechnerintegrierte Produktion
   Heinz Nixdorf Institut,
   Fuerstenallee 11
   33102 Paderborn, Germany
   Tel. ++49 +5251 60-6227
   Fax. ++49 +5251 60-6268
   http://wwwhni.uni-paderborn.de/vr/
========================================




From MAILER-DAEMON Fri Feb 27 16:31:56 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.30)
	id 1AwpaO-0000dG-GJ
	for mharc-bug-commoncpp@gnu.org; Fri, 27 Feb 2004 16:31:56 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30)
	id 1AwpZn-0000XS-4C
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 16:31:19 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30)
	id 1AwpZG-0000HD-4t
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 16:31:17 -0500
Received: from [80.202.31.119] (helo=totto.homelinux.net)
	by monty-python.gnu.org with esmtp (Exim 4.30) id 1AwpZE-0000Ft-TL
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 16:30:45 -0500
Received: from totto.homelinux.net ([127.0.0.1] helo=idi.ntnu.no)
	by totto.homelinux.net with esmtp (Exim 3.36 #1 (Debian))
	id 1AwpZC-00072D-00
	for <bug-commoncpp@gnu.org>; Fri, 27 Feb 2004 22:30:42 +0100
Message-ID: <403FB6F6.2050500@idi.ntnu.no>
Date: Fri, 27 Feb 2004 22:30:30 +0100
From: Tor Arvid Lund <tor.arvid.lund@idi.ntnu.no>
User-Agent: Mozilla Thunderbird 0.5+ (X11/20040209)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
X-Enigmail-Version: 0.83.3.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="------------enigE50F10D25120005281C659EA"
Subject: Checking if TCPSession made successful connection
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Feb 2004 21:31:20 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigE50F10D25120005281C659EA
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

I cannot figure out how to do this right. In the client code below, I've 
made a very simple class extending TCPSession. When called with an 
invalid hostname or port, the Thread is never spawned, it seems.

So, my question is: how can I check whether the TCPSession failes its 
connection or not? I would like to print "bad hostname", or "connection 
refused on port <port>" appropriately.

#include <cc++/socket.h>
#include <iostream>

using namespace ost;
using namespace std;

class mySession : public TCPSession
{
public:
	void run() {cout << "Thread running" << endl;}
	void final() {cout << "mySession exiting" << endl;}
	
	mySession(InetHostAddress host, int port) : TCPSession(host, port)
	{ start(); }
};

int main(int argc, char **argv)
{
	const char *host = argv[1];
	const int port = atoi(argv[2]);

	mySession session(host, port);
	Thread::sleep(2000);
	return 0;
}

-- 
Tor Arvid Lund               ,''`.
http://totto.homelinux.net  : :' :
GnuPG key ID: 0xF335ED1E    `. `'
find it at pgp.mit.edu        `-


--------------enigE50F10D25120005281C659EA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAP7cB8CJw6vM17R4RAo7/AKCT3h0XoVZThNwXFM9Wr98MZ1o0FwCdF4op
W9V7s1C2fHIR6F0mwl8jVkY=
=Zsyv
-----END PGP SIGNATURE-----

--------------enigE50F10D25120005281C659EA--



From MAILER-DAEMON Fri Feb 27 16:46:42 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.30)
	id 1AwpoQ-0007pw-3t
	for mharc-bug-commoncpp@gnu.org; Fri, 27 Feb 2004 16:46:26 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30)
	id 1AwpoC-0007Yt-2a
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 16:46:12 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30)
	id 1AwpnL-0006dr-HU
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 16:45:51 -0500
Received: from [12.27.46.140] (helo=metrispo04.metriscompanies.com)
	by monty-python.gnu.org with esmtp (Exim 4.30)
	id 1AwpnL-0006dF-38; Fri, 27 Feb 2004 16:45:19 -0500
Received: from azmail01.metriscompanies.com ([172.31.160.55])
	by metrispo04.metriscompanies.com (Lotus Domino Release 5.0.9)
	with ESMTP id 2004022715242210:155667 ;
	Fri, 27 Feb 2004 15:24:22 -0600 
In-Reply-To: <403FB6F6.2050500@idi.ntnu.no>
To: Tor Arvid Lund <tor.arvid.lund@idi.ntnu.no>
MIME-Version: 1.0
X-Mailer: Lotus Notes Release 6.0.3 September 26, 2003
Message-ID: <OFFD796148.2B908EDE-ON07256E47.0077B044-07256E47.00777F33@metriscompanies.com>
From: Jason.Majors@metriscompanies.com
Date: Fri, 27 Feb 2004 14:48:31 -0700
X-MIMETrack: Serialize by Router on AZMAIL01/Servers/Metris(Release
	6.0.3|September 26, 2003) at 02/27/2004 02:48:36 PM,
	Serialize complete at 02/27/2004 02:48:36 PM,
	Itemize by SMTP Server on metrispo04/Metris01(Release 5.0.9 |November
	16, 2001) at 02/27/2004 03:24:22 PM,
	Serialize by Router on metrispo04/Metris01(Release 5.0.9 |November 16,
	2001) at 02/27/2004 03:24:24 PM,
	Serialize complete at 02/27/2004 03:24:24 PM
Content-Type: text/plain; charset="US-ASCII"
Cc: bug-commoncpp@gnu.org,
	bug-commoncpp-bounces+jason.majors=metriscompanies.com@gnu.org
Subject: Re: Checking if TCPSession made successful connection
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Feb 2004 21:46:20 -0000

> Hello,

> I cannot figure out how to do this right. In the client code below, I've
> made a very simple class extending TCPSession. When called with an
> invalid hostname or port, the Thread is never spawned, it seems.

> So, my question is: how can I check whether the TCPSession failes its
> connection or not? I would like to print "bad hostname", or "connection
> refused on port <port>" appropriately.

TCPSession inherits isActive(), isConnected(), and operator! () from 
Socket. Try those.
http://www.gnu.org/software/commoncpp/docs/refman/html/class_socket.html


> #include <cc++/socket.h>
> #include <iostream>

> using namespace ost;
> using namespace std;

> class mySession : public TCPSession
> {
> public:
> void run() {cout << "Thread running" << endl;}
> void final() {cout << "mySession exiting" << endl;}
> 
> mySession(InetHostAddress host, int port) : TCPSession(host, port)
> { start(); }
> };

> int main(int argc, char **argv)
> {
> const char *host = argv[1];
> const int port = atoi(argv[2]);
> 
> mySession session(host, port);
> Thread::sleep(2000);
> return 0;
> }

> --
> Tor Arvid Lund               ,''`.
> http://totto.homelinux.net  : :' :
> GnuPG key ID: 0xF335ED1E    `. `'
> find it at pgp.mit.edu        `-

> 
> [attachment "signature.asc" deleted by Jason Majors/Scottsdale/Metris] 
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp



From MAILER-DAEMON Fri Feb 27 17:56:59 2004
Received: from list by monty-python.gnu.org with archive (Exim 4.30)
	id 1AwquX-0005Jh-2O
	for mharc-bug-commoncpp@gnu.org; Fri, 27 Feb 2004 17:56:49 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30)
	id 1Awqti-0004zL-Rw
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 17:55:58 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30)
	id 1Awqt9-0004oS-VQ
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 17:55:55 -0500
Received: from [80.202.31.119] (helo=totto.homelinux.net)
	by monty-python.gnu.org with esmtp (Exim 4.30) id 1AwqsL-0004aB-CX
	for bug-commoncpp@gnu.org; Fri, 27 Feb 2004 17:54:33 -0500
Received: from totto.homelinux.net ([127.0.0.1] helo=idi.ntnu.no)
	by totto.homelinux.net with esmtp (Exim 3.36 #1 (Debian))
	id 1AwqsJ-0008Rr-00
	for <bug-commoncpp@gnu.org>; Fri, 27 Feb 2004 23:54:31 +0100
Message-ID: <403FCAA6.7090404@idi.ntnu.no>
Date: Fri, 27 Feb 2004 23:54:30 +0100
From: Tor Arvid Lund <tor.arvid.lund@idi.ntnu.no>
User-Agent: Mozilla Thunderbird 0.5+ (X11/20040209)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
References: <OFFD796148.2B908EDE-ON07256E47.0077B044-07256E47.00777F33@metriscompanies.com>
In-Reply-To: <OFFD796148.2B908EDE-ON07256E47.0077B044-07256E47.00777F33@metriscompanies.com>
X-Enigmail-Version: 0.83.3.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: Checking if TCPSession made successful connection
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.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://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Feb 2004 22:56:01 -0000

Jason.Majors@metriscompanies.com wrote:

 >TCPSession inherits isActive(), isConnected(), and operator! () from 
 >Socket. Try those.
 >http://www.gnu.org/software/commoncpp/docs/refman/html/class_socket.html


Thanks for the (very fast) reply. I've seen noticed these functions. At 
first I had trouble with them, since isConnected, for instance, seemed 
to always return false, even after I'd seen the connection was up...

Anyway, I have gotten to the place where my program can tell me whether 
the connection failed or succeded. So now I'm wondering how I can 
determine why a connection failed... (bad hostname, connection refused, etc)

Maybe theres some basic concept I have missed... I noticed the 
connectError() function, but it seemes to always return errConnectFailed 
or errConnectBusy... maybe they shouldn't be called directly? Well... 
any pointers here would be greatly appreciated

Thanks

-- 
Tor Arvid Lund               ,''`.
http://totto.homelinux.net  : :' :
GnuPG key ID: 0xF335ED1E    `. `'
find it at pgp.mit.edu        `-



