Commit Graph

8690 Commits

Author SHA1 Message Date
Rafal Michalski
09b6fbef70 Fix invalid read of memory in avdtp module
Fixed incorrect update of server->sessions GSlist in avdtp_exit.
Previosly it was leading to invalid read of memory (l = l->next)
(and possible memory leaks) since after invoking avdtp_unref in
connection_lost, l pointer was not valid anymore (previously assignment
l = l->next was used after invoking connection_lost in for loop).
2011-05-29 22:08:30 +03:00
Luiz Augusto von Dentz
27a52a9ccb Fix possible buffer overflow when sending avdtp commands
Buffer size should be as big as the maximum of imtu and omtu, otherwise
it may overflow when sending messages which are bigger then imtu.
2011-05-29 22:05:08 +03:00
Bastien Nocera
1b6f41bea1 Remove obsolete Sixaxis enablement in hidd
Seeing as this is now handled in the kernel.
2011-05-29 21:59:30 +03:00
Marcel Holtmann
29a46bf7db btio: Add workaround for not defined BT_FLUSHABLE 2011-05-27 10:22:07 -07:00
Bastien Nocera
51ab3c975f doc: Add mention of the 6-digit padding problem
Passkeys used for Secure Simple pairing should always appear
zero-padded in the end-user display, as per specification
(5.4 ASSOCIATION MODELS in BLUETOOTH SPECIFICATION Version 2.1 + EDR
 [vol 1])
2011-05-25 13:32:11 -07:00
Sheldon Demario
1f921e01c7 Cleanup of device class update signal
Adds a new device function to address the PropertyChanged
signal when the device's class changes. event.c file should
avoid sending signals that belongs to device objects.
2011-05-19 10:54:09 -07:00
Claudio Takahasi
a0cbbd2b8a Removed unused variable "secmode3" in btd_device 2011-05-19 10:00:38 -07:00
Bruna Moreira
f169bea7d5 Drop variable EIR length
The functions eir_parse() and adapter_update_found_devices() now
assume that the EIR buffer has always 240 octets. For advertising
reports, the advertising data is stored on a buffer with 240 bytes,
padded with zeroes.
2011-05-18 16:46:54 -07:00
Bruna Moreira
9d172c96a5 Replace EIR_DATA_LENGTH with HCI_MAX_EIR_LENGTH
Both defines have the same value (240) and meaning.
2011-05-18 16:46:42 -07:00
Claudio Takahasi
04205c06ee Cleanup inserting new device found entry 2011-05-18 16:46:18 -07:00
Claudio Takahasi
5de0ab3563 Change the order to write/read the remote's name
When discovering, write the EIR "complete" name first before to read
the name. Only names retrieved from EIR "complete" name and HCI Remote
Name Request Complete event are stored. This patch doesn't change the
final result: the value of the name sent in the signal.
2011-05-18 16:46:15 -07:00
Bruna Moreira
5b1f949a42 Remove btd_event_advertising_report
Advertises should be notified using btd_event_device_found function
to keep the compatibility with mgmtops plugin.
2011-05-18 16:46:12 -07:00
Claudio Takahasi
8b353b60e2 Fix memory leak of EIR data 2011-05-18 16:46:10 -07:00
Claudio Takahasi
f97603c9d4 Unify inquiry results and advertises
Adapter needs to have only one method to allow discovery results
integration for both interfaces: hciops and mgmtops. This patch
moves the code related to advertises parsing to the same function
that handles inquiry results.
2011-05-18 16:31:56 -07:00
Claudio Takahasi
45709a7d0d Don't resolve name if the name is in the storage 2011-05-18 13:44:44 -07:00
Claudio Takahasi
c800401019 Cleanup read name and alias from storage 2011-05-18 13:44:15 -07:00
Claudio Takahasi
35667eb052 Move legacy verification to a new function 2011-05-18 13:43:06 -07:00
Szymon Janc
95f0dafe6d sbc: Fix empty parameter list in usage() declaration 2011-05-18 09:08:44 -07:00
Szymon Janc
8af5f43a69 Fix empty parameter list in functions declarations 2011-05-18 09:05:55 -07:00
Frédéric Danis
9480e8c706 mgmt: fix DBG string format 2011-05-17 09:43:06 -07:00
Claudio Takahasi
54afb50eaa Initial device found cleanup
Moves EIR parsing call and stored name loading to adapter. This patch
doesn't change the implemented logic, it is only the initial step to
integrated inquiry results and LE advertises.
2011-05-17 09:09:24 -07:00
Claudio Takahasi
991a7a4f09 Move EIR related functions to a new file 2011-05-17 09:07:28 -07:00
Vinicius Costa Gomes
3a4be69583 Fix a crash when creating a device from storage
The list "services" is just a list of the object paths of the
registered services that a device has. When we want to store
the primary services information we need to store the "primaries"
list, that contain all the primary services information.
2011-05-15 02:31:24 +03:00
Andre Guedes
b4ddb8a811 Remove unused DISC_* macros 2011-05-15 02:26:18 +03:00
Claudio Takahasi
1658f3bd67 Remove unnecessary headers from main.c 2011-05-15 02:20:36 +03:00
Claudio Takahasi
2eb13b86c9 Remove unused "scan" variable from main_opts 2011-05-15 02:19:51 +03:00
David Herrmann
bbf21e61fb Document new "hex-encoded pins" feature 2011-05-15 02:14:52 +03:00
David Herrmann
966e12d17a Remove 16 byte limit for PIN codes returned by agents
Agents can now return PIN codes longer than 16 characters. The
pin parser automatically truncates all PINs to 16 characters, but
allows hexadecimal PINs to be longer than 16 characters because
each two hexdecimal encoded bytes are parsed into one output byte.
2011-05-15 02:14:49 +03:00
David Herrmann
c70a4afe43 Parse pin codes starting with '$' as hexadecimal encoded strings
If a pin code is retrieved from an agent and the first character is
a dollar sign '$', then the pin is decoded as following:
 - The first character (dollar sign) is stripped from the pin
 - The rest is parsed as hexadecimal numbers, where each two characters
   will be converted into a one byte integer. If an odd number of
   characters follows, then the last character is stripped.
Parser is case insensitive. Pins not starting with '$' are parsed
as usual.

For instance:
 pin: $0A3e005067
is decoded into a 5 byte pin:
 decoded: 0x0a 0x3e 0x00 0x50 0x67
2011-05-15 02:14:44 +03:00
David Herrmann
90e0b59b97 Make adapter API accept binary pincodes
Add pin-length argument to adapter API to allow passing binary pins
containing \0 characters to the hci handler.
2011-05-15 02:14:24 +03:00
David Herrmann
2d59b9b4a3 Add length argument to hci pincode reply
This adds a new "length" argument to the hci pincode reply to allow
sending binary pins including \0 characters.
2011-05-15 02:14:17 +03:00
Waldemar Rymarkiewicz
c33d02148b Update params description of PIN Code Request 2011-05-15 02:12:40 +03:00
Johan Hedberg
2076574365 Fix unused variable warnings reported by GCC 4.6 2011-05-15 01:57:12 +03:00
Johan Hedberg
0e047a188b sbc: Remove unused variable 2011-05-15 01:56:11 +03:00
Johan Hedberg
9c7a6a48f2 btio: Fix unused variable warning 2011-05-15 01:55:16 +03:00
Szymon Janc
10a0350126 Report error if read failed in bluetooth_playback_poll_revents 2011-05-15 01:47:12 +03:00
Szymon Janc
a834df8c7d Report error from ioctl in bnep_if_down
Make bnep_if_down report error from ioctl similar to bnep_if_up.
2011-05-15 01:47:12 +03:00
Szymon Janc
5cfe640e88 Remove unused discoverable variable from mgmt_update_powered 2011-05-15 01:47:11 +03:00
Szymon Janc
0738d9b906 Remove not needed NULL check in sdp_gen_pdu 2011-05-15 01:47:11 +03:00
Szymon Janc
5315250b69 Fix check for negative port number in tcp_socket_connect 2011-05-15 01:47:11 +03:00
Szymon Janc
3c07ee5578 Remove unused result variable from g_dbus_pending_success 2011-05-15 01:47:11 +03:00
Szymon Janc
b671636c82 Remove unused err variable from init_conn_list 2011-05-15 01:47:11 +03:00
Szymon Janc
51d73841d4 Remove unused variable svclass from hf_io_cb 2011-05-15 01:47:10 +03:00
Szymon Janc
6dc1643c76 Disconnect headset when not able to reply with ERROR command 2011-05-15 01:47:10 +03:00
Szymon Janc
50f0671290 Fix callbacks numbering in connect_cb_new from audio/headset.c 2011-05-15 01:47:10 +03:00
Szymon Janc
4ccf324d56 Validate if sending reply succeed in control_cb 2011-05-15 01:47:10 +03:00
Szymon Janc
984260d913 Remove unused remote_type variable from a2dp_config 2011-05-15 01:47:09 +03:00
Szymon Janc
0c5f016867 Remove unused op variable from encode_discover_primary 2011-05-15 01:47:09 +03:00
Szymon Janc
04ff02f9bb Remove unused discoverable variables from adapter code 2011-05-15 01:47:09 +03:00
Szymon Janc
582d84646d Fix minor code style issue in write_key 2011-05-15 01:47:09 +03:00