diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 709b8ec..6070585 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
if (!path)
return OBEX_RSP_BAD_REQUEST;
- if (pbapdata->path != NULL && g_str_equal(pbapdata->path, path))
+ if (pbapdata->path != NULL && g_str_equal(pbapdata->path, path))
return 0;
if (gw_obex_chdir(session->obex, "", &err) == FALSE) {
char *buf = "";
if (session->msg == NULL)
- return;
+ goto done;
reply = dbus_message_new_method_return(session->msg);
g_dbus_send_message(session->conn, reply);
dbus_message_unref(session->msg);
session->msg = NULL;
+
+done:
+ transfer_unregister(transfer);
}
static void phonebook_size_callback(struct session_data *session,
guint8 new_missed_calls;
if (session->msg == NULL)
- return;
+ goto done;
reply = dbus_message_new_method_return(session->msg);
g_dbus_send_message(session->conn, reply);
dbus_message_unref(session->msg);
session->msg = NULL;
+
+done:
+ transfer_unregister(transfer);
}
static void pull_vcard_listing_callback(struct session_data *session,
int i;
if (session->msg == NULL)
- return;
+ goto complete;
reply = dbus_message_new_method_return(session->msg);
g_dbus_send_message(session->conn, reply);
dbus_message_unref(session->msg);
session->msg = NULL;
+complete:
+ transfer_unregister(transfer);
}
static DBusMessage *pull_phonebook(struct session_data *session,