Commit Graph

316 Commits

Author SHA1 Message Date
Szymon Janc
28cf717c04 sdp: Fix build errors due to unaligned memory access
This fix following compilation errors on ARM.

  CC     lib/sdp.lo
lib/sdp.c: In function 'sdp_device_record_unregister_binary':
lib/sdp.c:2984:11: error: cast increases required alignment of
	target type [-Werror=cast-align]
lib/sdp.c:2984:11: error: cast increases required alignment of
	target type [-Werror=cast-align]
lib/sdp.c: In function 'sdp_device_record_update':
lib/sdp.c:3089:11: error: cast increases required alignment of
	target type [-Werror=cast-align]
lib/sdp.c:3089:11: error: cast increases required alignment of
	target type [-Werror=cast-align]
lib/sdp.c: In function 'sdp_process':
lib/sdp.c:4139:22: error: cast increases required alignment of
	target type [-Werror=cast-align]
lib/sdp.c:4146:14: error: cast increases required alignment of
	target type [-Werror=cast-align]
lib/sdp.c:4146:14: error: cast increases required alignment of
	target type [-Werror=cast-align]
cc1: all warnings being treated as errors
make[1]: *** [lib/sdp.lo] Error 1
2012-12-11 07:41:07 +02:00
Johan Hedberg
b8779d2202 Revert "Ensure config.h is included by using CPPFLAGS"
This reverts commit 8a03376544.

The patch needs to be split up and the gdbus/ changes were bogus
compared to the original commit message.

Conflicts:
	Makefile.am
	Makefile.obexd
	profiles/cyclingspeed/cyclingspeed.c
	profiles/heartrate/heartrate.c
	src/error.c
2012-12-07 12:46:04 +02:00
Anderson Lizardo
8f0d6c96c4 lib: Fix member type on le_read_advertising_channel_tx_power_rp
Transmit power level range is -20 <= N <= 10, thus it should be stored
as int8_t.
2012-12-06 12:24:04 +02:00
Lucas De Marchi
8a03376544 Ensure config.h is included by using CPPFLAGS
Instead of trying to include config.h in each file over the tree and
possibly forgetting to include it, give a "-include config.h" argument
to the compiler so it's guaranteed that a) it will be included for all
source files and b) it will be the first header included.

gdbus/ directory is left out, since it would break other projects using
it.
2012-12-05 17:18:07 +02:00
Andrzej Kaczmarek
727fddeb96 cyclingspeed: Discover CSCS characteristics 2012-12-05 10:11:23 +02:00
Andrzej Kaczmarek
941c44472a cyclingspeed: Add CSC profile plugin skeleton
This patch adds stub profile driver plugin for CSC profile.
2012-12-05 10:08:43 +02:00
Johan Hedberg
8ac20a715c lib: Add missing svclass entries for MAP 2012-11-23 14:33:49 +02:00
Bart Westgeest
f8b977a776 sdp: Upgrade datatype SEQ8 to SEQ16 when data size is greater than 256
Fixes a bug where the complete sequence data is written, but the size
is truncated to one byte.
2012-11-20 14:53:21 +02:00
Bart Westgeest
06c25421af sdp: Limit side effects of sdp_get_data_type and sdp_get_data_size
Remove modification of buf->buf_size in 'get' functions. Data is
still indirectly modified due to recursive nature of code.

Renamed sdp_get_data_type to sdp_get_data_type_size.
2012-11-20 14:52:34 +02:00
Bart Westgeest
74116be7b8 sdp: Inlined single use of function sdp_set_data_type
Inlining single use of sdp_set_data_type to improve code readability,
since the function was doing more than just setting the data type.
2012-11-20 14:51:16 +02:00
Johan Hedberg
356386cd2f core: Add Service property for external profiles
This property is used to distinguish the service class UUID from the
actual profile UUID.
2012-11-16 14:27:51 +02:00
Johan Hedberg
b1c4a376bf lib: Add new Network attribute define for HFP 1.6 AG record 2012-11-15 12:46:10 +02:00
Johan Hedberg
0eff937073 lib: Add missing OBEX UUID strings to uuid.h 2012-11-14 14:50:05 +02:00
Johan Hedberg
b27b7757d4 mgmt: Remove peripheral setting
It's still not decided how this will be exposed in the end but most
likely it wont be through mgmt (e.g. socket-based enabling is a probable
choice).
2012-11-09 16:52:48 +02:00
Andrei Emeltchenko
7062d75c84 lib: Change maximum pkt size for High Speed max pkt
For AMP, L2CAP packets might be of bigger size, up to 1492 bytes.
Without the change hcidump cuts AMP data packets.
2012-11-05 08:48:20 +02:00
Marcel Holtmann
04adf821f5 lib: Fix EVT_CONN_COMPLETE_SIZE constant 2012-11-02 04:47:58 +01:00
Johan Hedberg
d6ff55181b mgmt: Remove LE prefix from the peripheral setting 2012-10-22 18:47:43 +03:00
Johan Hedberg
1b0a4291d1 mgmt: Add support for LE peripheral mode 2012-10-22 17:36:51 +03:00
Szymon Janc
4b273e5d98 lib: Simplify str2ba function
Reverse loop iteration so that baswap call is not needed.
2012-10-16 13:35:18 +03:00
Chan-yeol Park
02dd8b9fcb mgmt: Add string for Passkey Notify Event 2012-10-04 18:02:32 +03:00
Johan Hedberg
dbd9c3109e lib: Add GoepL2capPsm SDP attribute define 2012-10-03 23:14:03 +03:00
Johan Hedberg
64bf69dc9a lib: Add SPP UUID define 2012-10-02 13:43:07 +03:00
Johan Hedberg
a5ee8819e2 lib: Add some missing svclass values 2012-10-02 13:42:43 +03:00
Andrzej Kaczmarek
8da46ea640 heartrate: Discover HRS characteristics
This patch adds support to discover known Heart Rate Service
characteristics.
2012-09-28 13:16:42 +03:00
Rafal Garbat
bada796a03 heartrate: Add initial HRP client support
This patch adds initial support for the Heart Rate Profile client.
Profile driver is registered to keep track of adapters and devices.
2012-09-28 13:14:09 +03:00
Szymon Janc
4ac4e80fd2 sdp: Use bt_get_be* helpers instead of bt_get_unaligned
This fix number of compilation errors on ARM similar to one below.

lib/sdp.c: In function 'sdp_uuid_extract':
lib/sdp.c:1019:27: error: cast increases required alignment
    of target type [-Werror=cast-align]
lib/sdp.c:1019:27: error: cast increases required alignment
    of target type [-Werror=cast-align]
lib/sdp.c:1026:27: error: cast increases required alignment
    of target type [-Werror=cast-align]
lib/sdp.c:1026:27: error: cast increases required alignment
    of target type [-Werror=cast-align]
2012-09-05 12:12:31 +03:00
Szymon Janc
eb4ef46960 sdp: Fix compilation errors due to unaligned memory access
This fix number of build errors on ARM similar to one below.

lib/sdp.c: In function 'sdp_set_seq_len':
lib/sdp.c:625:3: error: cast increases required alignment of target
	 type [-Werror=cast-align]
lib/sdp.c:625:3: error: cast increases required alignment of target
	type [-Werror=cast-align]
lib/sdp.c:631:3: error: cast increases required alignment of target
	type [-Werror=cast-align]
lib/sdp.c:631:3: error: cast increases required alignment of target
	type [-Werror=cast-align]
2012-09-05 12:05:15 +03:00
Szymon Janc
51df858745 lib: Add unaligned put helper functions
These functions are similar to bt_get_* functions.
2012-09-05 12:04:52 +03:00
Johan Hedberg
546fee067d mgmt: Implement support for Passkey Notify event 2012-09-04 16:34:41 +03:00
Johan Hedberg
c7c092bca3 uuid: Add string-format UUID comparison helper function 2012-09-03 14:10:19 +03:00
Szymon Janc
a9b567a98d sdp: Fix error reporting in sdp_service_search_attr_req
This function reports error code via errno not return value.
2012-08-28 10:29:16 -07:00
Anderson Lizardo
78889501f8 Fix trivial coding style issues on pointer declarations and casting
Avoid using C++ style pointer declarations like "char* ptr", as most
BlueZ code uses "char *ptr".
2012-08-26 09:37:06 +01:00
Mikel Astiz
902e9f2de2 mgmt: Add reason to device disconnect event
Extend the management API with the disconnect reason, as now reported
by the Kernel in MGMT_EV_DEVICE_DISCONNECTED.
2012-08-17 12:26:30 +03:00
Jefferson Delfes
85dde1d744 lib: Add new company identifiers 2012-08-16 15:04:35 +03:00
Claudio Takahasi
d1d1d4ff9c lib: Rename GAP UUID
Cosmetic patch changing the GAP UUID declaration to follow the same
standard of the others GATT based services.
2012-08-16 10:38:19 +03:00
Szymon Janc
1baf8702e1 Fix not setting class of device in adapter
Set class of device in adapter when new class is received from kernel.
This fix adapters property Class being always zero.
2012-07-30 13:48:43 +03:00
Andrei Emeltchenko
08461ea65d lib: Correct length name in write assoc struct
Correct name from assoc_length to remaining_length.
2012-07-19 15:12:06 +03:00
Andrei Emeltchenko
6c05eb5209 lib: Add headers for AMP ASSOC data 2012-06-28 16:14:40 +03:00
Slawomir Bochenski
2053eeda32 lib/sdp.c: Prevent passing unitialised argument
In case of sdp_seq_alloc() failures in loop, unitialised seqDTDs would
be passed to final sdp_seq_alloc.
2012-06-28 13:51:00 +03:00
Daniel Wagner
9bfc21c2dd core: Move UUID string definition to lib 2012-06-02 09:07:56 +08:00
Daniel Wagner
5c3c3fef23 pnat: Move UUID string definition to lib 2012-06-02 09:07:50 +08:00
Daniel Wagner
3af0412b42 input: Move UUID string definition to lib 2012-06-02 09:07:47 +08:00
Daniel Wagner
cce53f0cf2 health: Move UUID string definition to lib 2012-06-02 09:07:45 +08:00
Daniel Wagner
9e80406e08 serial: Move UUID string definition to lib 2012-06-02 09:07:43 +08:00
Daniel Wagner
0a87ad9099 thermometer: Move UUID string definition to lib 2012-06-02 09:07:39 +08:00
Daniel Wagner
8f13cb2beb sap: Move UUID string definition to lib 2012-06-02 09:07:36 +08:00
Daniel Wagner
5a82646b30 proximity: Move UUID string definition to lib 2012-06-02 09:07:34 +08:00
Daniel Wagner
2eda66eb47 deviceinfo: Move UUID string definition to lib 2012-06-02 09:07:17 +08:00
Daniel Wagner
b0dcec9c79 network: Move UUID string definition to lib 2012-06-02 09:07:00 +08:00
Daniel Wagner
b968b12927 audio: Move UUID string definition to lib 2012-06-02 09:06:32 +08:00