From: Bartosz Szatkowski <bulislaw@linux.com>
To: linux-bluetooth@vger.kernel.org
Cc: Bartosz Szatkowski <bulislaw@linux.com>
Subject: [PATCH obexd 7/8] MAP Tracker: Add abort support in folder listing
Date: Fri, 2 Sep 2011 10:57:59 +0200 [thread overview]
Message-ID: <1314953880-4663-7-git-send-email-bulislaw@linux.com> (raw)
In-Reply-To: <1314953880-4663-1-git-send-email-bulislaw@linux.com>
---
plugins/messages-tracker.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/plugins/messages-tracker.c b/plugins/messages-tracker.c
index f00ab6d..29f3ccd 100644
--- a/plugins/messages-tracker.c
+++ b/plugins/messages-tracker.c
@@ -869,6 +869,9 @@ static gboolean async_get_folder_listing(void *s) {
if (session->name && strchr(session->name, '/') != NULL)
goto done;
+ if (session->aborted)
+ goto aborted;
+
path = g_build_filename(session->cwd, session->name, NULL);
if (path == NULL || strlen(path) == 0)
@@ -895,11 +898,13 @@ static gboolean async_get_folder_listing(void *s) {
dir_data->name, session->user_data);
}
- done:
+done:
session->cb.folder_list(session, 0, folder_count, NULL,
session->user_data);
g_free(path);
+
+aborted:
g_free(session->name);
return FALSE;
@@ -916,6 +921,7 @@ int messages_get_folder_listing(void *s, const char *name,
session->offset = offset;
session->cb.folder_list = callback;
session->user_data = user_data;
+ session->aborted = FALSE;
g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, async_get_folder_listing,
session, NULL);
--
1.7.4.1
next prev parent reply other threads:[~2011-09-02 8:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 8:57 [PATCH obexd 1/8] MAP Tracker: Fix folder and path handling Bartosz Szatkowski
2011-09-02 8:57 ` [PATCH obexd 2/8] MAP Tracker: Fix memory issue in folder listing Bartosz Szatkowski
2011-09-02 8:57 ` [PATCH obexd 3/8] MAP Tracker: Add support for DBus connection Bartosz Szatkowski
2011-09-06 13:44 ` Johan Hedberg
2011-09-02 8:57 ` [PATCH obexd 4/8] MAP Tracker Add basic support for messages listing Bartosz Szatkowski
2011-09-02 8:57 ` [PATCH obexd 5/8] MAP Tracker Add filter support in " Bartosz Szatkowski
2011-09-02 8:57 ` [PATCH obexd 6/8] MAP Tracker: Add support for pulling messages Bartosz Szatkowski
2011-09-02 13:36 ` [PATCH " Bartosz Szatkowski
2011-09-02 8:57 ` Bartosz Szatkowski [this message]
2011-09-02 8:58 ` [PATCH obexd 8/8] MAP Tracker: Refactor session struct Bartosz Szatkowski
2011-09-27 9:46 ` [PATCH obexd 1/8] MAP Tracker: Fix folder and path handling Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314953880-4663-7-git-send-email-bulislaw@linux.com \
--to=bulislaw@linux.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).