summaryrefslogtreecommitdiffstats
path: root/src/modules/bluetooth/ipc.c
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2011-03-20 11:44:53 +0000
committerColin Guthrie <cguthrie@mandriva.org>2011-03-20 12:49:49 +0000
commitb676f89d8579c7ec1629892342a330f1e4c35657 (patch)
tree7e37747a29bbf12c48b47cd183869871e27137a5 /src/modules/bluetooth/ipc.c
parent1674e1ca535910af9ba46d897e7d496f42162337 (diff)
bluetooth: Run 'make update-sbc'
Note that changes to ipc.h from 8f3ef04b had to be manually reapplied.
Diffstat (limited to 'src/modules/bluetooth/ipc.c')
-rw-r--r--src/modules/bluetooth/ipc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/bluetooth/ipc.c b/src/modules/bluetooth/ipc.c
index dcecad8a..1bdad784 100644
--- a/src/modules/bluetooth/ipc.c
+++ b/src/modules/bluetooth/ipc.c
@@ -2,7 +2,7 @@
*
* BlueZ - Bluetooth protocol stack for Linux
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -106,8 +106,10 @@ int bt_audio_service_get_data_fd(int sk)
for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;
cmsg = CMSG_NXTHDR(&msgh, cmsg)) {
if (cmsg->cmsg_level == SOL_SOCKET
- && cmsg->cmsg_type == SCM_RIGHTS)
- return (*(int *) CMSG_DATA(cmsg));
+ && cmsg->cmsg_type == SCM_RIGHTS) {
+ memcpy(&ret, CMSG_DATA(cmsg), sizeof(int));
+ return ret;
+ }
}
errno = EINVAL;