summaryrefslogtreecommitdiffstats
path: root/lib/tevent/tevent.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-17 20:13:34 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-17 20:17:01 +0100
commit9eaf53d98eced9ea70f411b9936b475c42e4d490 (patch)
treeb30790640cf66c0474c8e3a40f5ba40eb367c75d /lib/tevent/tevent.h
parent3a831e46204979550dc6ee7652cea6b8296f10c1 (diff)
downloadsamba-9eaf53d98eced9ea70f411b9936b475c42e4d490.tar.gz
samba-9eaf53d98eced9ea70f411b9936b475c42e4d490.tar.xz
samba-9eaf53d98eced9ea70f411b9936b475c42e4d490.zip
tevent: store the location where a request was finished
This is very useful to find bugs. You can use 'p *req' in gdb to show where tevent_req_done(), tevent_req_error() or tevent_req_nomem() was called. metze
Diffstat (limited to 'lib/tevent/tevent.h')
-rw-r--r--lib/tevent/tevent.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 3930092ee59..6c5df6321a5 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -252,13 +252,22 @@ bool tevent_req_set_endtime(struct tevent_req *req,
struct tevent_context *ev,
struct timeval endtime);
-void tevent_req_done(struct tevent_req *req);
-
-bool tevent_req_error(struct tevent_req *req,
- uint64_t error);
-
-bool tevent_req_nomem(const void *p,
- struct tevent_req *req);
+void _tevent_req_done(struct tevent_req *req,
+ const char *location);
+#define tevent_req_done(req) \
+ _tevent_req_done(req, __location__)
+
+bool _tevent_req_error(struct tevent_req *req,
+ uint64_t error,
+ const char *location);
+#define tevent_req_error(req, error) \
+ _tevent_req_error(req, error, __location__)
+
+bool _tevent_req_nomem(const void *p,
+ struct tevent_req *req,
+ const char *location);
+#define tevent_req_nomem(p, req) \
+ _tevent_req_nomem(p, req, __location__)
struct tevent_req *tevent_req_post(struct tevent_req *req,
struct tevent_context *ev);