linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Szatkowski <bulislaw@linux.com>
To: linux-bluetooth@vger.kernel.org
Cc: Bartosz Szatkowski <bulislaw@linux.com>
Subject: [PATCH obexd 2/3] client: Add file flexibility for GET
Date: Fri, 16 Dec 2011 14:23:09 +0100	[thread overview]
Message-ID: <1324041790-17559-2-git-send-email-bulislaw@linux.com> (raw)
In-Reply-To: <1324041790-17559-1-git-send-email-bulislaw@linux.com>

Sometimes it would be useful to use file (and actually register transfer
object) instead of memory buffer for GET, even for OBEX specific mime
types (in some cases amount of data might be substantial eg. MAP
GetMessage).
---
 client/transfer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/transfer.c b/client/transfer.c
index 472a04d..03e2825 100644
--- a/client/transfer.c
+++ b/client/transfer.c
@@ -232,7 +232,7 @@ struct obc_transfer *obc_transfer_register(DBusConnection *conn,
 	transfer->params = params;
 
 	/* for OBEX specific mime types we don't need to register a transfer */
-	if (type != NULL &&
+	if (type != NULL && name == NULL &&
 			(strncmp(type, "x-obex/", 7) == 0 ||
 			strncmp(type, "x-bt/", 5) == 0))
 		goto done;
@@ -510,7 +510,7 @@ int obc_transfer_get(struct obc_transfer *transfer, transfer_callback_t func,
 	if (transfer->xfer != 0)
 		return -EALREADY;
 
-	if (transfer->type != NULL &&
+	if (transfer->type != NULL && transfer->name == NULL &&
 			(strncmp(transfer->type, "x-obex/", 7) == 0 ||
 			strncmp(transfer->type, "x-bt/", 5) == 0)) {
 		rsp_cb = get_buf_xfer_progress;
-- 
1.7.4.1


  reply	other threads:[~2011-12-16 13:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16 13:23 [PATCH obexd 1/3] client: Fix opening file in obc_transfer_get Bartosz Szatkowski
2011-12-16 13:23 ` Bartosz Szatkowski [this message]
2011-12-16 13:23 ` [PATCH obexd 3/3] map: Add basic GetMessage support Bartosz Szatkowski
2011-12-16 14:23   ` 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=1324041790-17559-2-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).