summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/messaging/pymessaging.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index 1c22fb431a..869508fca6 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -127,12 +127,15 @@ static PyObject *py_messaging_send(PyObject *self, PyObject *args, PyObject *kwa
NTSTATUS status;
struct server_id server;
const char *kwnames[] = { "target", "msg_type", "data", NULL };
+ int length;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Ois#|:send",
- discard_const_p(char *, kwnames), &target, &msg_type, &data.data, &data.length)) {
+ discard_const_p(char *, kwnames), &target, &msg_type, &data.data, &length)) {
return NULL;
}
+ data.length = length;
+
if (!server_id_from_py(target, &server))
return NULL;