diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-03-11 07:58:42 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-03-11 07:58:42 +1100 |
commit | 3d0a727f575942b767e396b694f6529259528a17 (patch) | |
tree | 8ea6acdfe1b043abe06a0f3d78dcbc1b55d6f146 /lib/tevent/tevent_req.c | |
parent | c218d3e1173355acf025471a10b4b6425b9c086b (diff) | |
parent | 3d280639c4652d6cd35577e333bcd46c2517754c (diff) | |
download | samba-3d0a727f575942b767e396b694f6529259528a17.tar.gz samba-3d0a727f575942b767e396b694f6529259528a17.tar.bz2 samba-3d0a727f575942b767e396b694f6529259528a17.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema
Diffstat (limited to 'lib/tevent/tevent_req.c')
-rw-r--r-- | lib/tevent/tevent_req.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c index 9b3e00ec8f..3832088b34 100644 --- a/lib/tevent/tevent_req.c +++ b/lib/tevent/tevent_req.c @@ -256,6 +256,27 @@ bool tevent_req_is_in_progress(struct tevent_req *req) return false; } +/** + * @brief This function destroys the attached private data + * @param[in] req The finished request + * + * This function can be called as last action of a _recv() + * function, it destroys the data attached to the tevent_req. + */ +void tevent_req_received(struct tevent_req *req) +{ + talloc_free(req->data); + req->data = NULL; + req->private_print = NULL; + + talloc_free(req->internal.trigger); + req->internal.trigger = NULL; + talloc_free(req->internal.timer); + req->internal.timer = NULL; + + req->internal.state = TEVENT_REQ_RECEIVED; +} + bool tevent_req_poll(struct tevent_req *req, struct tevent_context *ev) { |