summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2012-09-16 11:39:26 -0700
committerVolker Lendecke <vl@samba.org>2012-09-23 07:20:20 -0700
commite0fdeda86cfc75cfe2bdd7dffeef7fc9e173c8aa (patch)
tree27db9fe4578c3a4a69e8d5f11eabe5998f2d3193 /source3/libsmb
parent947520521ed3da2f0787e17a9fe906024fdee7e3 (diff)
downloadsamba-e0fdeda86cfc75cfe2bdd7dffeef7fc9e173c8aa.tar.gz
samba-e0fdeda86cfc75cfe2bdd7dffeef7fc9e173c8aa.tar.bz2
samba-e0fdeda86cfc75cfe2bdd7dffeef7fc9e173c8aa.zip
s3-pylibsmb: move py_tevent_req_wait_exc up in the file
this is needed to be able to use it in other functions and spares the prototype Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/libsmb')
-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)
{