Return-Path: Message-ID: From: "Albert Huang" To: bluez-users@lists.sourceforge.net Subject: Re: [Bluez-users] Programming in C with Bluetooth Sockets In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4546_6057239.1145471558107" References: Sender: bluez-users-admin@lists.sourceforge.net Errors-To: bluez-users-admin@lists.sourceforge.net Reply-To: bluez-users@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ users List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 19 Apr 2006 14:32:38 -0400 ------=_Part_4546_6057239.1145471558107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > bytes_read =3D read(client, buf + count, sizeof(buf) - > count); sizeof(buf) will always return 4 because buf was allocated as a char* and not a char[] So it's never trying to read more than 4 bytes at a time -albert ------=_Part_4546_6057239.1145471558107 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
 &n= bsp;            = ; bytes_read =3D read(client, buf + count, sizeof(buf) - count);

sizeof(buf) will always return  4 because buf was allocated a= s a char* and not a char[]
So it's never trying to read more than 4 byte= s at a time

-albert

------=_Part_4546_6057239.1145471558107-- ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users