[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2026-gc6f39b4

Volker Lendecke vlendec at samba.org
Thu Jun 4 15:30:26 GMT 2009


The branch, master has been updated
       via  c6f39b46a7b0505331612a1bee15a82f97009f0d (commit)
      from  9dad0536d6e91cb993edd636f7659d2351d98000 (commit)

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


- Log -----------------------------------------------------------------
commit c6f39b46a7b0505331612a1bee15a82f97009f0d
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jun 4 17:26:23 2009 +0200

    Add tevent_req_notify_callback
    
    This is necessary for requests that have multiple results. Examples would be
    SMBEcho and ldap_search.

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

Summary of changes:
 lib/tevent/tevent.h     |    4 ++++
 lib/tevent/tevent_req.c |   13 +++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 6c5df63..2cbd175 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -252,6 +252,10 @@ bool tevent_req_set_endtime(struct tevent_req *req,
 			    struct tevent_context *ev,
 			    struct timeval endtime);
 
+void _tevent_req_notify_callback(struct tevent_req *req, const char *location);
+#define tevent_req_notify_callback(req)		\
+	_tevent_req_notify_callback(req, __location__)
+
 void _tevent_req_done(struct tevent_req *req,
 		      const char *location);
 #define tevent_req_done(req) \
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 0170000..541f93f 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -117,17 +117,22 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
 	return req;
 }
 
-static void tevent_req_finish(struct tevent_req *req,
-			      enum tevent_req_state state,
-			      const char *location)
+void _tevent_req_notify_callback(struct tevent_req *req, const char *location)
 {
-	req->internal.state = state;
 	req->internal.finish_location = location;
 	if (req->async.fn != NULL) {
 		req->async.fn(req);
 	}
 }
 
+static void tevent_req_finish(struct tevent_req *req,
+			      enum tevent_req_state state,
+			      const char *location)
+{
+	req->internal.state = state;
+	_tevent_req_notify_callback(req, location);
+}
+
 /**
  * @brief An async request has successfully finished
  * @param[in] req	The finished request


-- 
Samba Shared Repository


More information about the samba-cvs mailing list