void g_obex_unref(GObex *obex)
{
+#ifdef TIZEN_PATCH
+ gboolean last_ref, ret;
+#else
gboolean last_ref;
+#endif
last_ref = g_atomic_int_dec_and_test(&obex->ref_count);
g_slist_free_full(obex->req_handlers, g_free);
+#ifdef TIZEN_PATCH
+ do {
+ ret = write_data(obex->io, G_IO_OUT, obex);
+ if (obex->pending_req && obex->pending_req->cancelled)
+ break;
+ } while(ret);
+#endif
+
g_queue_foreach(obex->tx_queue, (GFunc) pending_pkt_free, NULL);
g_queue_free(obex->tx_queue);