Commit Graph

76 Commits

Author SHA1 Message Date
Johan Hedberg
68838679e1 Move SDP client functions from glib-helper.c to sdp-client.c 2011-10-18 11:15:23 +03:00
Johan Hedberg
9b98a6c764 Add glib-compat.h to deal with issues in old GLib versions 2011-10-18 10:57:06 +03:00
Gustavo F. Padovan
5ca964accf serial: add Serial.ConnectFD()
It's similar to Serial.Connect() but returns the actual RFCOMM file
descriptor instead of creating a device in /dev
2011-09-14 10:48:55 +03:00
Gustavo F. Padovan
a762de7aa2 serial: fix DBus message reply
If reply is NULL we have a crash.
2011-09-14 10:48:55 +03:00
Luiz Augusto von Dentz
da608774df Make use of g_slist_free_full on serial plugin 2011-06-30 12:32:26 +03:00
Vinicius Costa Gomes
50fb53c4a7 Add a way to store the remote device type
Because we need to know the device type (LE, Basic Rate or Dual Mode)
to be able to fully restore the device from storage, we have to store
and load this information to permanent storage.

Note: due to "device_type_t" usage in storage.h, some header includes
needed to be reordered in files which include storage.h.
2010-12-22 13:57:33 +02:00
Gustavo F. Padovan
fdafb86ff0 Convert more D-Bus errors to btd_error_* 2010-12-16 21:45:43 +02:00
Johan Hedberg
ea6e83ac67 Fix signess of err variable passed to strerror 2010-12-14 15:43:41 +02:00
Johan Hedberg
1215951d92 Use correct signess for err variable 2010-12-14 10:51:41 +02:00
Gustavo F. Padovan
2ee9428829 serial: use btd_error_failed() 2010-12-14 10:31:25 +02:00
Gustavo F. Padovan
57c9bf4d91 convert error to btd_error_not_connected() 2010-12-08 22:54:53 +02:00
Gustavo F. Padovan
09be5d6efa convert errors to btd_error_not_authorized() 2010-12-08 22:54:45 +02:00
Gustavo F. Padovan
581171be9b Add btd_error_does_not_exist() 2010-12-07 23:12:32 +02:00
Gustavo F. Padovan
696c18c48f Create btd_error_invalid_args()
DBus error handling in BlueZ is a mess. This is the first patch to unify
all DBus error handling like in ConnMan and oFono. This unifies all
.InvalidArguments errors.
2010-12-07 22:58:32 +02:00
Johan Hedberg
da446f5edd Fix format string warnings for g_dbus_create_error
This patch fixes gcc warnings for "format not a string literal and no
format arguments".
2010-08-19 23:24:42 +03:00
Gustavo F. Padovan
8e58667ef0 Move debug() to DBG()
Use the new dynamic debug feature
2010-05-21 18:21:48 +02:00
Gustavo F. Padovan
e891f7df62 Move logging.{c,h} to log.{c,h}
Try to make log stuff more similar to ConnMan and oFono.
2010-05-21 14:40:36 +02:00
Marcel Holtmann
9184e2eeb7 Update copyright information 2010-01-01 17:08:17 -08:00
Johan Hedberg
b09e5f8892 Fix NULL check in find_port() for port->uuid 2009-06-30 14:24:54 +03:00
Luiz Augusto von Dentz
e8610fcbe0 Fix bt_cancel_discovery to not call callback.
bt_cancel_discovery when disconnecting async and calling the callback
which cause crashes if the user data is free'd in between.
2009-04-30 00:35:41 +03:00
Luiz Augusto von Dentz
f7e6b2cd75 Fix bug on Serial.Connect which cause UUID-128 to be interpreted as channel.
strtol was generating a valid channel from the given UUID-128 and find_port
would first check if the port channel matches the given pattern.
2009-04-24 16:46:22 +03:00
Johan Hedberg
1118edbc79 Fix uninitialized variable compiler warning 2009-04-19 00:07:39 +03:00
Luiz Augusto von Dentz
bc1b555acd Add support to channel pattern in Serial interface.
Application can give RFCOMM channel as pattern for Serial.Connect and
Serial.Disconnect, in case of no service matching the given channel it
wont trigger the channel discover proceeding directly to connection phase.
2009-04-15 17:50:22 +03:00
Luiz Augusto von Dentz
0135f63663 Make Serial.Disconnect to abort connection attempt.
Serial.Disconnect should abort connection attempt if Serial.Connect is not
completed or user application quits before connection is done.
2009-04-14 11:11:57 -03:00
Luiz Augusto von Dentz
eeb8599f0b Make serial port to not use channels from record storage.
Some devices are known to change the channels of its records so the storage
might become invalid over time. The solution is to always attempt to retrieve
the channel when connecting.
2009-04-11 18:29:47 +03:00
Johan Hedberg
8e706e2d4f Convert some not-so-important info logs to debug logs 2009-03-24 12:31:10 +02:00
Johan Hedberg
44f054fa22 Be sure to remove the name listener in serial_port_free 2009-03-23 17:31:40 +02:00
Luiz Augusto von Dentz
10d6858927 Make use of g_io_channel_shutdown instead of deprecated g_io_channel_close. 2009-02-19 16:23:10 -03:00
Luiz Augusto von Dentz
b5519a1fed Make serial plugin to use BtIO API. 2009-02-19 10:19:11 +02:00
Marcel Holtmann
fb333f1c88 Update copyright information 2009-01-01 19:33:20 +01:00
Marcel Holtmann
86984e4b0e Add missing include definitions 2008-12-23 04:32:20 +01:00
Johan Hedberg
fe5de84c0d Revert previous change to g_timeout_add_seconds
These timeouts really need to be sub-second so g_timeout_add_seconds
can't be used.
2008-12-15 17:17:22 +02:00
Marcel Holtmann
321b4afa54 Convert two more users to g_timeout_add_seconds() 2008-12-10 21:54:12 +01:00
Luiz Augusto von Dentz
4a073b1a5a Disallow Serial.Disconnect from unauthorized senders. 2008-12-01 18:11:38 -03:00
Johan Hedberg
f780466ede Store RFCOMM tty fd and close it before release 2008-11-08 16:45:53 +02:00
Luiz Augusto von Dentz
f449b80bff Fix driver removal for serial port driver.
Because of the last changes serial port driver would not remove all ports
registered on probe just the one registered with serial port uuid if
registered.
2008-11-07 18:21:43 -03:00
Luiz Augusto von Dentz
054f044588 Rename bt_string2class to bt_name2class and introduce bt_name2string.
Since bt_string2class didn't work for UUID128 in string format the name got
changed to be more suggestive. bt_name2string was introduced to prevent
potential use of bt_string2uuid followed with bt_uuid2string which turns
to do the same conversion twice.
2008-11-06 16:12:16 -03:00
Johan Hedberg
0cd6d963d0 Use bt_string2class instead of bt_string2uuid to avoid unecessary conversion 2008-11-06 17:13:03 +02:00
Johan Hedberg
b877233d59 Fix checks for port->id value 2008-11-06 16:05:59 +02:00
Johan Hedberg
23640c409f Get rid of the name attribute for ports
The name was used for matching against friendly-name strings but we can
just as well derive it from the port UUID.
2008-11-06 15:45:16 +02:00
Marcel Holtmann
1f5107e65f Fix fallouts due to GDBusWatchFunction changes 2008-10-17 18:43:48 +02:00
Marcel Holtmann
028ea961e3 Fix org.bluez.Serial interface 2008-09-06 01:33:29 +02:00
Luiz Augusto von Dentz
96e860e322 Fix possible check for not assigned devnode. 2008-07-30 14:30:47 -03:00
Marcel Holtmann
e0581b5e29 Move hcid to src directory and rename it to bluetoothd 2008-07-29 20:35:12 +02:00
Luiz Augusto von Dentz
0df1e79ee0 Cleanup serial manager. 2008-07-28 10:49:14 -03:00
Marcel Holtmann
22ec945f10 Move some D-Bus helpers around 2008-06-07 20:09:25 +00:00
Marcel Holtmann
f80a721527 Use g_dbus_emit_signal for sending D-Bus signals 2008-06-07 19:30:24 +00:00
Marcel Holtmann
00f4c9a6e1 Replace destroy method with proper unregister version 2008-06-03 15:00:06 +00:00
Luiz Augusto von Dentz
724e5713bc Make serial to use libgdbus functions. 2008-06-03 10:37:11 +00:00
Johan Hedberg
cc0f97ec2c Change name_listener API to libgdbus watch API 2008-05-29 14:43:27 +00:00