* [PATCH obexd 1/2 v2] client: Use larger timeout first packet in transfers
@ 2012-09-20 12:07 Luiz Augusto von Dentz
2012-09-20 12:07 ` [PATCH obexd 2/2 v2] test: Use longer D-Bus timeout in test scripts Luiz Augusto von Dentz
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2012-09-20 12:07 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This align the client timeout for GET operations with g_obex_get_req_pkt
which does use 60 seconds to cover for extra interaction during the first
packet.
---
v2: Change clients to use 60 seconds timeout.
client/transfer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/client/transfer.c b/client/transfer.c
index 76f6681..e9fabfb 100644
--- a/client/transfer.c
+++ b/client/transfer.c
@@ -48,6 +48,8 @@
#define OBC_TRANSFER_ERROR obc_transfer_error_quark()
+#define FIRST_PACKET_TIMEOUT 60
+
static guint64 counter = 0;
struct transfer_callback {
@@ -662,7 +664,8 @@ static gboolean transfer_start_get(struct obc_transfer *transfer, GError **err)
transfer->params->data,
transfer->params->size);
- transfer->xfer = g_obex_send_req(transfer->obex, req, -1,
+ transfer->xfer = g_obex_send_req(transfer->obex, req,
+ FIRST_PACKET_TIMEOUT,
get_xfer_progress_first,
transfer, err);
if (transfer->xfer == 0)
--
1.7.11.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH obexd 2/2 v2] test: Use longer D-Bus timeout in test scripts
2012-09-20 12:07 [PATCH obexd 1/2 v2] client: Use larger timeout first packet in transfers Luiz Augusto von Dentz
@ 2012-09-20 12:07 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2012-09-20 12:07 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
As the daemon already waits for 60 seconds for the first response this
just use the same timeout for calls that don't use transfer but return the
response as reply.
---
test/map-client | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/map-client b/test/map-client
index ac1a8ca..7741c7f 100755
--- a/test/map-client
+++ b/test/map-client
@@ -109,11 +109,11 @@ class MapClient:
print "%s/" % (i["Name"])
def list_messages(self, folder):
- ret = self.map.GetMessageListing(folder, dict())
+ ret = self.map.GetMessageListing(folder, dict(), timeout=60)
print pformat(unwrap(ret))
def get_message(self, handle):
- self.map.GetMessageListing("", dict())
+ self.map.GetMessageListing("", dict(), timeout=60)
path = self.path + "/message" + handle
obj = bus.get_object("org.bluez.obex.client", path)
msg = dbus.Interface(obj, "org.bluez.obex.Message")
--
1.7.11.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-20 12:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-20 12:07 [PATCH obexd 1/2 v2] client: Use larger timeout first packet in transfers Luiz Augusto von Dentz
2012-09-20 12:07 ` [PATCH obexd 2/2 v2] test: Use longer D-Bus timeout in test scripts Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox