summaryrefslogtreecommitdiff
path: root/source3/libsmb/pylibsmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/pylibsmb.c')
-rw-r--r--source3/libsmb/pylibsmb.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c
index 1fab7cf103..00fe2d9726 100644
--- a/source3/libsmb/pylibsmb.c
+++ b/source3/libsmb/pylibsmb.c
@@ -321,6 +321,25 @@ static int py_tevent_req_wait(struct tevent_context *ev,
#endif
+static bool py_tevent_req_wait_exc(struct tevent_context *ev,
+ struct tevent_req *req)
+{
+ int ret;
+
+ if (req == NULL) {
+ PyErr_NoMemory();
+ return false;
+ }
+ ret = py_tevent_req_wait(ev, req);
+ if (ret != 0) {
+ TALLOC_FREE(req);
+ errno = ret;
+ PyErr_SetFromErrno(PyExc_RuntimeError);
+ return false;
+ }
+ return true;
+}
+
static PyObject *py_cli_state_new(PyTypeObject *type, PyObject *args,
PyObject *kwds)
{
@@ -400,25 +419,6 @@ static void py_cli_state_dealloc(struct py_cli_state *self)
self->ob_type->tp_free((PyObject *)self);
}
-static bool py_tevent_req_wait_exc(struct tevent_context *ev,
- struct tevent_req *req)
-{
- int ret;
-
- if (req == NULL) {
- PyErr_NoMemory();
- return false;
- }
- ret = py_tevent_req_wait(ev, req);
- if (ret != 0) {
- TALLOC_FREE(req);
- errno = ret;
- PyErr_SetFromErrno(PyExc_RuntimeError);
- return false;
- }
- return true;
-}
-
static PyObject *py_cli_create(struct py_cli_state *self, PyObject *args,
PyObject *kwds)
{