Linux bluetooth development
 help / color / mirror / Atom feed
From: "Albert Huang" <albert@csail.mit.edu>
To: bluez-users@lists.sourceforge.net
Subject: Re: [Bluez-users] Programming in C with Bluetooth Sockets
Date: Wed, 19 Apr 2006 14:32:38 -0400	[thread overview]
Message-ID: <ef9938ec0604191132v66b0e299nbd4f50071b907c2e@mail.gmail.com> (raw)
In-Reply-To: <c6a2f99a0604191126p744f86f5xa9c1a361381fa23a@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

>                bytes_read = 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

[-- Attachment #2: Type: text/html, Size: 497 bytes --]

  reply	other threads:[~2006-04-19 18:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-19  2:25 [Bluez-users] Programming in C with Bluetooth Sockets Eric Munson
2006-04-19  4:18 ` Sowmya Gattupalli
2006-04-19 15:04   ` Eric Munson
2006-04-19 16:50     ` Sowmya Gattupalli
2006-04-19 16:56     ` Albert Huang
2006-04-19 18:26       ` Eric Munson
2006-04-19 18:32         ` Albert Huang [this message]
2006-04-19 20:41           ` Eric Munson
2006-04-20  6:46             ` Eric Munson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef9938ec0604191132v66b0e299nbd4f50071b907c2e@mail.gmail.com \
    --to=albert@csail.mit.edu \
    --cc=bluez-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox