[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [bluetooth-dev] RFCOMM: rfcomm_send_data() return value



Hi,

I just checked the code and you are right, of course the function should return the number of successfully sent bytes. The sending application will then try to send remaining bytes (if any) and if there is a "critical" error the application will know about it at the second try (as we will return an error if we can't write at all). I'll check it in at sourceforge shortly. Thanks for you help!

Best Regards
Anders Johansson

> -----Original Message-----
> From: Ulrich Mueller [mailto:muelleru@xxxxxxx.de]
> Sent: Monday, November 19, 2001 4:28 PM
> To: bluetooth-dev@xxxxxxx.com
> Subject: [bluetooth-dev] RFCOMM: rfcomm_send_data() return value
> 
> 
> Hi,
> 
> I am wondering about the return value of rfcomm_send_data 
> (current CVS 
> snapshot). The input is a buffer of "count" bytes:
> - if an error occures, it returns a negative value (error code),
> - if all data could be sent, "count" is returned,
> - if an error occures after sending some bytes, it also returns the 
> error code.
> 
> Shouldn't in the last case the number of successfully sent bytes be 
> returned?
> 
> br, Ulrich
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> bluetooth-dev" in
> the body of a message to majordomo@xxxxxxx.com
> 
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com