tevent: Add tevent_req_reset_endtime
authorVolker Lendecke <vl@samba.org>
Mon, 12 Sep 2016 11:02:26 +0000 (13:02 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 4 Oct 2016 22:06:22 +0000 (00:06 +0200)
We might decide at some point that we don't want a request to
time out

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tevent/ABI/tevent-0.9.30.sigs
lib/tevent/tevent.h
lib/tevent/tevent_req.c

index ea179a0d63fb497f3a017729a45c3749fb5a13d5..7a6a23689a40733c643f0e885cc9764e52bfd5e4 100644 (file)
@@ -69,6 +69,7 @@ tevent_req_poll: bool (struct tevent_req *, struct tevent_context *)
 tevent_req_post: struct tevent_req *(struct tevent_req *, struct tevent_context *)
 tevent_req_print: char *(TALLOC_CTX *, struct tevent_req *)
 tevent_req_received: void (struct tevent_req *)
+tevent_req_reset_endtime: void (struct tevent_req *)
 tevent_req_set_callback: void (struct tevent_req *, tevent_req_fn, void *)
 tevent_req_set_cancel_fn: void (struct tevent_req *, tevent_req_cancel_fn)
 tevent_req_set_cleanup_fn: void (struct tevent_req *, tevent_req_cleanup_fn)
index bb23257a9656ae74e3342024729316ad2b69d534..ba4bb4da9173f8b80699b60623a131367b1edf89 100644 (file)
@@ -1040,6 +1040,13 @@ bool tevent_req_set_endtime(struct tevent_req *req,
                            struct tevent_context *ev,
                            struct timeval endtime);
 
+/**
+ * @brief Reset the timer set by tevent_req_set_endtime.
+ *
+ * @param[in]  req      The request to reset the timeout for
+ */
+void tevent_req_reset_endtime(struct tevent_req *req);
+
 #ifdef DOXYGEN
 /**
  * @brief Call the notify callback of the given tevent request manually.
index e2b7104d16a2f3802b2b4013d1374dac9f2ebf6c..e309c3d9ca3fceb85aa4a29206be117be2dccd26 100644 (file)
@@ -313,6 +313,11 @@ bool tevent_req_set_endtime(struct tevent_req *req,
        return true;
 }
 
+void tevent_req_reset_endtime(struct tevent_req *req)
+{
+       TALLOC_FREE(req->internal.timer);
+}
+
 void tevent_req_set_callback(struct tevent_req *req, tevent_req_fn fn, void *pvt)
 {
        req->async.fn = fn;