summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/messaging/pymessaging.c11
-rw-r--r--source4/lib/messaging/tests/bindings.py4
2 files changed, 8 insertions, 7 deletions
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index 33746af26c..0e6fe88b11 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -138,8 +138,9 @@ static PyObject *py_messaging_send(PyObject *self, PyObject *args, PyObject *kwa
const char *kwnames[] = { "target", "msg_type", "data", NULL };
int length;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Ois#|:send",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Ois#:send",
discard_const_p(char *, kwnames), &target, &msg_type, &data.data, &length)) {
+
return NULL;
}
@@ -176,7 +177,7 @@ static PyObject *py_messaging_register(PyObject *self, PyObject *args, PyObject
NTSTATUS status;
const char *kwnames[] = { "callback", "msg_type", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:send",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:register",
discard_const_p(char *, kwnames), &callback, &msg_type)) {
return NULL;
}
@@ -207,7 +208,7 @@ static PyObject *py_messaging_deregister(PyObject *self, PyObject *args, PyObjec
PyObject *callback;
const char *kwnames[] = { "callback", "msg_type", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:send",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:deregister",
discard_const_p(char *, kwnames), &callback, &msg_type)) {
return NULL;
}
@@ -226,7 +227,7 @@ static PyObject *py_messaging_add_name(PyObject *self, PyObject *args, PyObject
char *name;
const char *kwnames[] = { "name", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|:send",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|:add_name",
discard_const_p(char *, kwnames), &name)) {
return NULL;
}
@@ -247,7 +248,7 @@ static PyObject *py_messaging_remove_name(PyObject *self, PyObject *args, PyObje
char *name;
const char *kwnames[] = { "name", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|:send",
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|:remove_name",
discard_const_p(char *, kwnames), &name)) {
return NULL;
}
diff --git a/source4/lib/messaging/tests/bindings.py b/source4/lib/messaging/tests/bindings.py
index c89538ddfa..ead7a83afd 100644
--- a/source4/lib/messaging/tests/bindings.py
+++ b/source4/lib/messaging/tests/bindings.py
@@ -52,6 +52,6 @@ class MessagingTests(TestCase):
client_ctx = self.get_context((0, 2))
msg_pong = client_ctx.register(pong_callback)
- client_ctx.send((0,1), msg_ping, "testing")
- client_ctx.send((0,1), msg_ping, "")
+ client_ctx.send((0, 1), msg_ping, "testing")
+ client_ctx.send((0, 1), msg_ping, "")