diff options
-rw-r--r-- | obexd/client/session.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/obexd/client/session.c b/obexd/client/session.c index 48016c446..67c2b83fa 100644 --- a/obexd/client/session.c +++ b/obexd/client/session.c @@ -177,6 +177,9 @@ static struct pending_request *pending_request_new(struct obc_session *session, static void pending_request_free(struct pending_request *p) { + if (p->req_id > 0) + g_obex_cancel_req(p->session->obex, p->req_id, TRUE); + if (p->destroy) p->destroy(p->data); @@ -1311,6 +1314,8 @@ void obc_session_cancel(struct obc_session *session, guint id, return; g_obex_cancel_req(session->obex, p->req_id, remove); + p->req_id = 0; + if (!remove) return; |