summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-11-04 19:06:56 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-11-04 19:06:56 -0300
commita6e82811026f8b2ce6266b4a2ebd95dad118c09f (patch)
treef373816978e99336dc1db2136be6a7f543d783f6 /plugins
parent39529ba3d70d174604af97c766cab92bb8f0ba53 (diff)
Check ANY record list in case the record is not present on adapter record list.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/service.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/service.c b/plugins/service.c
index 0d0efce5..98026e34 100644
--- a/plugins/service.c
+++ b/plugins/service.c
@@ -77,6 +77,8 @@ struct service_adapter {
GSList *records;
};
+static struct service_adapter *serv_adapter_any = NULL;
+
static int compute_seq_size(sdp_data_t *data)
{
int unit_size = data->unitSize;
@@ -632,8 +634,11 @@ static DBusMessage *request_authorization(DBusConnection *conn,
return failed(msg);
user_record = find_record(serv_adapter, handle, sender);
- if (!user_record)
- return not_authorized(msg);
+ if (!user_record) {
+ user_record = find_record(serv_adapter_any, handle, sender);
+ if (!user_record)
+ return not_authorized(msg);
+ }
record = sdp_record_find(user_record->handle);
@@ -783,6 +788,9 @@ static int register_interface(const char *path, struct btd_adapter *adapter)
info("Registered interface %s on path %s", SERVICE_INTERFACE, path);
+ if (serv_adapter->adapter == NULL)
+ serv_adapter_any = serv_adapter;
+
return 0;
}