Skip to content

Commit

Permalink
gsupplicant: Support function to call any pending callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
jukkar authored and pfl committed Dec 2, 2013
1 parent cd27afe commit a05682b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gsupplicant/dbus.c
Expand Up @@ -366,6 +366,19 @@ struct method_call_data {
void *user_data;
};

void supplicant_dbus_call_callback(DBusPendingCall *call, dbus_int32_t slot)
{
struct method_call_data *data;

data = dbus_pending_call_get_data(call, slot);
if (data && data->function)
data->function("net.connman.Error.OperationAborted",
NULL, data->user_data);

dbus_pending_call_free_data_slot(&slot);
dbus_pending_call_unref(call);
}

static void method_call_reply(DBusPendingCall *call, void *user_data)
{
struct method_call_data *data = user_data;
Expand Down
2 changes: 2 additions & 0 deletions gsupplicant/dbus.h
Expand Up @@ -73,6 +73,8 @@ int supplicant_dbus_method_call(const char *path,
supplicant_dbus_result_function function,
void *user_data);

void supplicant_dbus_call_callback(DBusPendingCall *call, dbus_int32_t slot);

void supplicant_dbus_property_append_basic(DBusMessageIter *iter,
const char *key, int type, void *val);

Expand Down

0 comments on commit a05682b

Please sign in to comment.