From e94f1a9a3c4e9a7800e013dd61b06b5538c9b8ac Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 11 Jul 2007 15:51:23 +0100 Subject: [PATCH] Use PyArg_ParseTuple correctly, fixing the timeout in send_message_with_reply and send_message_with_reply_and_block. (bugs.fd.o #11489; thanks to Marco Pesenti Gritti for report and initial patch) --- NEWS | 3 +++ _dbus_bindings/conn-methods.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 276e26d..c3114b3 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ Features: Fixes: +* Parse the timeout correctly in send_message_with_reply() and + send_message_with_reply_and_block(), fixing the use of non-default timeouts + (bugs.fd.o #11489) * The tutorial no longer uses interactive-Python syntax, as it confused users. (bugs.fd.o #11209) * When making a call via a proxy object with ignore_reply=True, also get the diff --git a/_dbus_bindings/conn-methods.c b/_dbus_bindings/conn-methods.c index 23e7d64..9f0d05b 100644 --- a/_dbus_bindings/conn-methods.c +++ b/_dbus_bindings/conn-methods.c @@ -370,7 +370,7 @@ Connection_send_message_with_reply(Connection *self, PyObject *args, PyObject *k TRACE(self); DBUS_PY_RAISE_VIA_NULL_IF_FAIL(self->conn); if (!PyArg_ParseTupleAndKeywords(args, kw, - "OO|fi:send_message_with_reply", + "OO|di:send_message_with_reply", argnames, &obj, &callable, &timeout_s, &require_main_loop)) { @@ -447,7 +447,7 @@ Connection_send_message_with_reply_and_block(Connection *self, PyObject *args) TRACE(self); DBUS_PY_RAISE_VIA_NULL_IF_FAIL(self->conn); - if (!PyArg_ParseTuple(args, "O|f:send_message_with_reply_and_block", &obj, + if (!PyArg_ParseTuple(args, "O|d:send_message_with_reply_and_block", &obj, &timeout_s)) { return NULL; } -- 2.11.4.GIT