OSDN Git Service

gobex: Fix asserting when resending connect request
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 1 Apr 2014 07:33:25 +0000 (10:33 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 2 Apr 2014 11:25:39 +0000 (14:25 +0300)
In case connect requests needs to be resent to authenticate the timeout
handle should be removed otherwise it may end up asserting:

ERROR:gobex/gobex.c:251:req_timeout: assertion failed: (p != NULL)

gobex/gobex.c

index 880ed91..4185ed1 100644 (file)
@@ -1016,6 +1016,8 @@ static void auth_challenge(GObex *obex)
 
        /* Remove it as pending and add it back to the queue so it gets sent
         * again */
+       g_source_remove(p->timeout);
+       p->timeout_id = 0;
        obex->pending_req = NULL;
        g_obex_send_internal(obex, p, NULL);
 }