[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1210-g13ac0dc

Stefan Metzmacher metze at samba.org
Wed Feb 25 13:09:43 GMT 2009


The branch, master has been updated
       via  13ac0dc4565b1cbdb977b6959562f3f8f9ac5ff8 (commit)
      from  5bab95b58366ff001b4967bdb0674f42dc990a77 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 13ac0dc4565b1cbdb977b6959562f3f8f9ac5ff8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Feb 25 13:53:19 2009 +0100

    tevent: add tevent_req_poll() function
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 lib/tevent/tevent.h     |    3 +++
 lib/tevent/tevent_req.c |   15 +++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index b3d1c6d..b361122 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -296,6 +296,9 @@ struct tevent_req *tevent_req_post(struct tevent_req *req,
 
 bool tevent_req_is_in_progress(struct tevent_req *req);
 
+bool tevent_req_poll(struct tevent_req *req,
+		     struct tevent_context *ev);
+
 bool tevent_req_is_error(struct tevent_req *req,
 			 enum tevent_req_state *state,
 			 uint64_t *error);
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 800e385..c17587b 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -235,6 +235,21 @@ bool tevent_req_is_in_progress(struct tevent_req *req)
 	return false;
 }
 
+bool tevent_req_poll(struct tevent_req *req,
+		     struct tevent_context *ev)
+{
+	while (tevent_req_is_in_progress(req)) {
+		int ret;
+
+		ret = tevent_loop_once(ev);
+		if (ret != 0) {
+			return false;
+		}
+	}
+
+	return true;
+}
+
 bool tevent_req_is_error(struct tevent_req *req, enum tevent_req_state *state,
 			uint64_t *error)
 {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list