s3:pylibsmb: make sure we get tevent debug messages
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Feb 2013 07:29:18 +0000 (08:29 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 28 Feb 2013 13:34:22 +0000 (14:34 +0100)
Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Feb 28 14:34:24 CET 2013 on sn-devel-104

source3/libsmb/pylibsmb.c

index 900d05212c54516110717c86dd807f51f72cb311..4fd5921f23a89a78bc0a7f84a2099b40696cc8e1 100644 (file)
@@ -201,6 +201,7 @@ static bool py_cli_state_setup_ev(struct py_cli_state *self)
        if (self->ev == NULL) {
                goto fail;
        }
+       samba_tevent_set_debug(self->ev, "pylibsmb_tevent_mt");
        tevent_set_trace_callback(self->ev, py_cli_state_trace_callback, self);
 
        self->thread_state = talloc_zero(NULL, struct py_cli_thread);
@@ -336,7 +337,13 @@ static void py_tevent_signalme(struct tevent_req *req)
 static bool py_cli_state_setup_ev(struct py_cli_state *self)
 {
        self->ev = tevent_context_init(NULL);
-       return (self->ev != NULL);
+       if (self->ev == NULL) {
+               return false;
+       }
+
+       samba_tevent_set_debug(self->ev, "pylibsmb_tevent");
+
+       return true;
 }
 
 static int py_tevent_req_wait(struct tevent_context *ev,