Commit Graph

8322 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
e3a2719782 telephony-ofono: fix handling of telephony_key_press_req 2011-03-24 11:13:23 +02:00
Dmitriy Paliy
015e261296 Remove unregister interface in telephony-maemo6
g_dbus_unregister_interface is removed from maemo6 telephony driver.
Interface com.nokia.MaemoTelephony is not used as result of changes
in csd back-end. CreateWith was replaced by Create and CreateFromLast
method calls, and set last number is implemented directly in csd.

Registration of this interface was removed due to these changes.
2011-03-23 15:29:45 +02:00
Claudio Takahasi
b358f4f350 Fix memory leak of matched device drivers list 2011-03-23 15:23:39 +02:00
Claudio Takahasi
521006ef7b Remove unnecessary btd_driver_data struct 2011-03-23 15:17:59 +02:00
Rafal Michalski
ab8a3b8361 Fix strict aliasing issue in hciops
This patch changes type of the "pending" variable to uint32_t. A pointer
to this variable is passed to the hci_clear_bit function as void * and
then cast to uint32_t * again.

Previously the unsigned long type could cause some unexpected behavior
due to violating strict aliasing rules. This patch fixes this problem by
making sure that the same integer type is used in all places.

This solution is simpler than the other option of changing the types of
all other places (from uint32_t to unsigned long, including changing
type for casting in hci_*_bit function family). Also, not all places can
be changed, like the hci_dev_info struct, since it would violate
compatibility rules between the kernel and user space.
2011-03-23 15:11:23 +02:00
Santiago Carot-Nemesio
f7459450c3 Fix security level for MCAP instances created from HDP plugin
Some health devices without IO capabilities can't connect to MCAP
instances when security level is set to HIGH. This patch enables above
devices to connect to Health instances avoiding the MITM problem.
2011-03-23 15:09:43 +02:00
Dmitriy Paliy
aa5f3db706 Add release all sessions when adapter is switched off
All sessions should be released when adapter is switched off. Then a new
RequestSession method call always results in change from power off to
power on such ensuring operational mode. Otherwise, it is possible to
end up in adapter state being powered off after RequestSession succeded.

g_slist_free is not called after g_slist_foreach because the list is
updated using g_slist_remove inside of session_free, which is called for
each element by g_slist_foreach.
2011-03-23 15:08:45 +02:00
Johan Hedberg
16c3330a15 Add SAP to bootstrap-configure defaults 2011-03-23 15:08:15 +02:00
Claudio Takahasi
a68d1fe4a4 Fix ATT error code response for authentication
This patch fix the error code in the Error Response PDU. If an attribute
requires authentication and the link security level doesn't meet the
requirements the server should reply Insufficient Authentication(0x05).
2011-03-23 15:07:20 +02:00
Waldemar Rymarkiewicz
f9dc0c0762 Add Sim Access Profile dummy driver
Add SAP dummy driver implementation and extend configure
with --with-sap=<driver>.
2011-03-23 14:57:45 +02:00
Waldemar Rymarkiewicz
b785550749 Add support for SAP protocol
Add new protocol features:
	* transfer APDu request/response
	* get ATR request/response
	* power sim of/on request/response
	* card reader status
	* set transport protocol
2011-03-23 14:51:14 +02:00
Waldemar Rymarkiewicz
3827cfbc00 Add Sim Access Profile connect/disconnect procedures
Add support for SAP protocol features:
	* connect and disconnect requests
	* connect and disconnect responses
	* disconnect indication
	* timeouts for the valid connection
2011-03-23 14:47:50 +02:00
Luiz Augusto von Dentz
8095805736 Fix crash when unregistering a2dp driver before media driver
Since media driver uses a2dp to register its sep and store a pointer,
this pointer may be invalid/freed when media driver is unregistered.

To fix this now a2dp will also release any sep registered using media
API.

It also protect from future changes on the order of drivers removal by
checking if pointers (sep or endpoint) are still available in the list
before removing them.
2011-03-22 12:36:23 +02:00
Arun Raghavan
e70fb63e46 Recalculate remote SEP if the codec type changes
This forces recalculating the remote SEP if the local SEP's codec type
is no longer the same as the remote SEP's codec type. This can happen
after we issue a BT_STOP_STREAM+BT_CLOSE followed by a
BT_SET_CONFIGURATION with a new SEID.
2011-03-18 11:37:53 +02:00
Andre Guedes
2c0c9662d0 TODO: set owner of 'Whitelist support' task 2011-03-18 11:25:05 +02:00
Radoslaw Jablonski
9e7e6b31ad Set correct adapter state in cancel_resolve_name
Previously resetting STATE_RESOLVNAME for adapter was missing.
This was causing problems with discovering devices when discovery
was quickly turned off/on during resolving name.
2011-03-18 11:24:19 +02:00
Bruna Moreira
6fc92a5341 Add Exchange MTU in interactive gatttool 2011-03-18 11:22:45 +02:00
Bruna Moreira
1b07befa15 Add Exchange MTU operation in GATT library 2011-03-18 11:17:58 +02:00
Bruna Moreira
efcef2bd79 Use GAttrib buffer for ATT protocol PDUs
Prior to this commit, there were local buffers inside GATT functions.
Now, a single buffer is used, to make sure the MTU limit is respected.
2011-03-18 11:15:07 +02:00
Bruna Moreira
68887c2133 Add internal buffer to GAttrib struct
The new buffer is allocated in g_attrib_new() and it will be used to
send/receive PDUs. The buffer size is the MTU read from L2CAP channel
limited to ATT_MAX_MTU. Functions to handle the buffer size were also
created.
2011-03-18 11:14:35 +02:00
Bruna Moreira
f773053e55 TODO: remove 'fix MTU exchange' task 2011-03-18 11:14:31 +02:00
Anderson Lizardo
4969ae43ae TODO: set owner of 'Define attribute server API' task
An initial implementation was sent as RFC.
2011-03-17 14:59:24 +02:00
Elvis Pfützenreuter
6bcda79cbb Update TODO regarding bt_uuid_* functions 2011-03-17 14:58:42 +02:00
Anderson Lizardo
f694885825 Check for existing handle in attrib_db_add()
This check is necessary to avoid inserting attributes with same handle.
2011-03-17 14:57:52 +02:00
Anderson Lizardo
fb23d0273c Change attrib_db_update() to return reallocated data
attrib_db_update() uses g_try_realloc(), which means the memory address
of the updated attribute may change. Callers may need to update
references to the old address.

The new struct attribute pointer is returned to caller by the "attr"
paramater.
2011-03-17 14:54:56 +02:00
Anderson Lizardo
59ba9844eb Remove unnecessary assignment from attrib_db_update()
attrib_db_update() uses g_try_realloc() only to expand/shrink space for
the variable "data" field. Therefore existing fields (like handle) are
guaranteed to remain unchanged.
2011-03-17 14:53:40 +02:00
Anderson Lizardo
1b6cd1f3c6 Allow NULL pointer as UUID for attrib_db_update()
A NULL uuid_t pointer means that the UUID should remain unchanged. This
simplifies most attrib_db_update() calls which do not change the
attribute UUID.
2011-03-17 14:52:58 +02:00
Anderson Lizardo
d97e70142a Add DBG() calls to attrib_db_* functions
This will help debugging issues with registration of GATT services.
2011-03-17 14:52:36 +02:00
Sheldon Demario
922c5feb93 Add discover characteristics by UUID to gatttool
According to the specification the characteristics discover and
characteristics discover by UUID use the same opcode and the result
should be filtered by callback.
2011-03-17 14:50:59 +02:00
Dmitriy Paliy
2da716f340 Add 'Protocol not supported' error in a2dp_add_sep
'Protocol not supported' error code is added to the registration of A2DP
end-points. Error response org.bluez.Error.NotSupported instead of
org.bluez.Error.InvalidArguments is used when SEP registration fails due
to disabled corresponding interface in audio.conf.
2011-03-17 14:35:55 +02:00
Johan Hedberg
4f8d6ba353 Fix missing check for dev->up before calling init_adapter
With some kernels and the right timing it is possible to get into the
state where we get the local name but haven't yet gotten a DEVUP event.
In such a case it is *not* ok to call init_adapter.
2011-03-17 14:33:02 +02:00
Marcel Holtmann
67fc00db39 Release 4.90 2011-03-15 20:25:23 -07:00
Marcel Holtmann
43bfa36567 Update library version 2011-03-15 19:54:49 -07:00
Johan Hedberg
52e333ff28 Add attrib server refactoring task to TODO 2011-03-15 22:40:00 +02:00
Johan Hedberg
3c0786fea5 Fix minor coding style issues in attrib server code 2011-03-15 22:36:50 +02:00
Johan Hedberg
c620d295f7 Remove redundant return statements from interactive gatttool 2011-03-15 22:27:00 +02:00
Johan Hedberg
b98c30a065 Fix minor coding style issues in SAP server code 2011-03-15 22:22:52 +02:00
Johan Hedberg
6b6b100783 Add LE whitelist support to the TODO 2011-03-15 21:10:45 +02:00
Johan Hedberg
803db5d475 mgmt: support for local_name_changed event 2011-03-15 20:51:46 +02:00
Johan Hedberg
7abf8c6e4d mgmt: Fix debug log strings 2011-03-15 20:34:08 +02:00
Waldemar Rymarkiewicz
caa8299225 Add Sim Access Profile Server
Add a Sim Access Server to the SAP plugin and a framework for the dummy
sap driver as well.

	* add the server register and unregister rutines
	* add server listening socket setup
	* add SAP DBus API
	* add prototypes for SAP protocol implementation
	* add skeleton of dummy SIM driver
2011-03-15 19:51:01 +02:00
Waldemar Rymarkiewicz
d4542f4268 Adjust sap/server.c license text to the rest of the code 2011-03-15 19:41:11 +02:00
Elvis Pfützenreuter
69f57a7d56 Add "unit test" for new UUID functions 2011-03-15 19:37:40 +02:00
Elvis Pfützenreuter
a278db781a Use new UUID functions in GATT
This patch puts the new UUID functions into use for GATT-related
code, and adds some convenience functions to ATT API (att.h).
Example GATT server is also changed.
2011-03-15 19:36:48 +02:00
Dmitriy Paliy
da620b5e91 Remove unused code due to dial and re-dial change
last_dialed_number and callerid are not used after changing CreateWith
to Create and CreateFromLast csd method calls, and therefore can be
removed.
2011-03-15 19:35:42 +02:00
Dmitriy Paliy
fcd1ac9c72 Change dial and re-dial in maemo6 telephony
Dial and re-dial to last number functions are changed in maemo6
telephony driver accordingly to updated API in csd back-end. CreateWith
method call is replaced by Create and CreateFromLast.

After such modification callerid and last dialed number are not used
and hence removed in sucessive patch.
2011-03-15 19:35:40 +02:00
Dmitriy Paliy
cef5610236 Move telephony_last_dialed_number_req
telephony_last_dialed_number_req function moved to be after
send_method_call. It is used in successive commit.
2011-03-15 19:35:37 +02:00
Johan Hedberg
3011a312a7 mgmt: Implement adapter name control
This patch adds a new set_local_name command as well as a
local_name_changed event to the management interface. Instead of 248
bytes (like in the HCI spec) 249 bytes are always reserved for the name
in the messages so that there's a guarantee of it being nul-terminated
(this is not guaranteed on the HCI level).
2011-03-15 19:32:09 +02:00
Johan Hedberg
1c16543345 mgmt: Add adapter name to read_info response 2011-03-15 19:30:11 +02:00
Szymon Janc
2854ecff1f Make strtoba use str2ba for string conversion 2011-03-15 15:13:52 +02:00