Send packets with proper size.

This commit is contained in:
Luiz Augusto von Dentz 2009-01-05 19:12:43 -03:00
parent fe2b8c359b
commit be49c92a38

View file

@ -127,7 +127,7 @@ static int bt_audioservice_send(int sk, const bt_audio_msg_header_t *msg) {
type = bt_audio_strtype(msg->type); type = bt_audio_strtype(msg->type);
name = bt_audio_strname(msg->name); name = bt_audio_strname(msg->name);
pa_log_debug("sending: %s -> %s", type, name); pa_log_debug("sending: %s -> %s", type, name);
if (send(sk, msg, BT_SUGGESTED_BUFFER_SIZE, 0) > 0) if (send(sk, msg, msg->length, 0) > 0)
e = 0; e = 0;
else { else {
e = -errno; e = -errno;