| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Free memory pointed by cr variable after it is used.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to strncat() manpage:
"If src contains n or more characters, strncat() writes n+1 characters
to dest (n from src plus the terminating null byte). Therefore, the
size of dest must be at least strlen(dest)+n+1"
While the current usage of strncat() cannot cause an overflow, if a
bigger string is added to the switch()'s without increasing the static
buffer, it would overflow by one byte due to the incorrect size
calculation.
Fixes clang errors like:
tools/hciconfig.c:827:33: error: the value of the size argument in
'strncat' is too large, might lead to a buffer overflow
[-Werror,-Wstrncat-size]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8a03376544b046a84301847d1594f6c3674983ff.
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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
This patch extends the LE scanning command allowing the user to inform
an option to enable LE scanning detecting advertises sent from devices
in the White List Only. This option can be used combined with others.
|
| |
|
|
|
|
|
|
| |
Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.
|
|
|
|
|
|
| |
There were missing buffer size checks and wrong assumptions about the
EIR data length (core spec 4.0 defines it to be max 31 bytes, so the
name can be max 29 bytes).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The timeout value has been hardcoded on hci_send_req call and, instead,
it should be passed from above (for ex from hci_le_set_scan_enable).
This patch removes the hardcoded value from hci_send_req and it
increases the timeout to 1000ms.
|
|
|
|
|
|
| |
If "whitelist" option is given, the peer address and type will be
ignored and the white list will be used to determine which advertiser
to connect to.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set interval and window parameters properly if --discovery option
is present in lescan command.
According to the Bluetooth spec, during a general or limited discovery
procedure the scan interval and the scan window should be set to
11.25 ms. If --discovery option isn't present, both parameters are set
to the default value (10 ms) defined in LE Set Scan Parameters Command.
According to that command description, the interval and window parameters
should be set as follows:
Time = N * 0.625 msec
So, in order to set the time values to 11.25 and 10 ms, the parameters
should be equal to 18 (0x0012) and 16 (0x0010), respectively.
|
|
|
|
|
|
|
| |
This patch adds the option [--discovery=g|l] to lescan command. Use
this option to enable the general or limited discovery procedure.
If discovery option is not given scanning will display all results
ignoring the AD flags.
|
|
|
|
|
|
| |
Allows the LE master to start the Connection Parameter Update Procedure.
Parameters values consistency are not verified on purpose allowing
invalid values to test fail scenarios.
|
| |
|
| |
|
|
|
|
| |
The LE_Scan_Type parameter controls the type of scan to perform.
|
|
|
|
|
| |
When privacy is enabled, random address is used during active scanning.
The non-resolvable private address shall be set using hciconfig.
|
| |
|
|
|
|
|
|
|
| |
hciconfig: warrning user on unknown commands
hcitool: return error on unknown command in hcitool
fix length size in comparision to avoid ambiguity commands
check if command number of arguments is correct
|
|
|
|
|
|
|
| |
The value 0x03 isn't something that exists in the core spec, so it
shouldn't be used in the same API as SCO/ACL link types. Since there are
some experimental kernel patches that use it this patch makes it private
to hcitool.c.
|
| |
|
|
|
|
| |
Choose default adapter if device was not specified on the command line.
|
|
|
|
|
| |
This command allows for low-level LE connections to be disconnected
by handle.
|
|
|
|
|
| |
Now hci_le_create_conn is more consistent with hci_create_conn, both
have a handle out parameter and a timeout.
|
|
|
|
|
|
|
| |
This command allows the creation of LE Connections to remote devices.
The command is useful for testing if the local device is able to start
connections and if the remote device is able to receive connection
requests.
|
|
|
|
|
| |
When setting LE Scan parameters we were assuming that the user was using
a Little Endian machine.
|
|
|
|
| |
This is a sample implementation of the LE Scan procedure.
|
| |
|
| |
|
|
|
|
|
| |
I was doing some code reviews of the 4.54 release and found a few memory
leaks. These are mostly in error paths.
|
|
|
|
|
| |
Some printfs were using functions that return dynamic allocated memory
as parameters.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Recent gcc versions, like 4.3.2 from ubuntu intrepid, give warnings like
"format not a string literal and no format arguments" without this
patch.
|
| |
|