summaryrefslogtreecommitdiff
path: root/source4/lib/messaging
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-01-26 08:58:46 +1100
committerStefan Metzmacher <metze@samba.org>2013-01-26 13:47:35 +0100
commita3054323d3fa1dadff1675e7f8ec672a991d8e56 (patch)
tree7ee88188243f2823de026a202a94efa55bb6bd67 /source4/lib/messaging
parent1d1ea72574cfa22ee6207d0e9787d0271db3b5c2 (diff)
downloadsamba-a3054323d3fa1dadff1675e7f8ec672a991d8e56.tar.gz
samba-a3054323d3fa1dadff1675e7f8ec672a991d8e56.tar.bz2
samba-a3054323d3fa1dadff1675e7f8ec672a991d8e56.zip
pymessaging: Use correct unsigned types for server ID tuple elememnts
This is needed if we start using the top bits of these values. Andrew Bartlett Reviewed-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/lib/messaging')
-rw-r--r--source4/lib/messaging/pymessaging.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index cb79d72065..f8703b25af 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -51,10 +51,10 @@ static bool server_id_from_py(PyObject *object, struct server_id *server_id)
return true;
}
if (PyTuple_Size(object) == 3) {
- return PyArg_ParseTuple(object, "iii", &server_id->pid, &server_id->task_id, &server_id->vnn);
+ return PyArg_ParseTuple(object, "KII", &server_id->pid, &server_id->task_id, &server_id->vnn);
} else {
int pid, task_id;
- if (!PyArg_ParseTuple(object, "ii", &pid, &task_id))
+ if (!PyArg_ParseTuple(object, "KI", &pid, &task_id))
return false;
*server_id = cluster_id(pid, task_id);
return true;
@@ -165,7 +165,7 @@ static void py_msg_callback_wrapper(struct imessaging_context *msg, void *privat
{
PyObject *callback = (PyObject *)private_data;
- PyObject_CallFunction(callback, discard_const_p(char, "i(iii)s#"), msg_type,
+ PyObject_CallFunction(callback, discard_const_p(char, "i(KII)s#"), msg_type,
server_id.pid, server_id.task_id, server_id.vnn,
data->data, data->length);
}