lib/util: change tevent_req_nterror() to a macro
authorStefan Metzmacher <metze@samba.org>
Sun, 26 Sep 2010 09:14:19 +0000 (11:14 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 27 Sep 2010 03:18:14 +0000 (03:18 +0000)
This way we can record where a tevent_req was finished by
tevent_req_nterror().

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Sep 27 03:18:14 UTC 2010 on sn-devel-104

lib/util/tevent_ntstatus.c
lib/util/tevent_ntstatus.h

index 4be45754994fd1eef1a982510cb62131e83ab48d..c4dd0740dc1d9c01220a1d78a30a3018eae005cd 100644 (file)
 #include "../replace/replace.h"
 #include "tevent_ntstatus.h"
 
 #include "../replace/replace.h"
 #include "tevent_ntstatus.h"
 
-bool tevent_req_nterror(struct tevent_req *req,        NTSTATUS status)
+bool _tevent_req_nterror(struct tevent_req *req,
+                        NTSTATUS status,
+                        const char *location)
 {
 {
-       return tevent_req_error(req, NT_STATUS_V(status));
+       return _tevent_req_error(req, NT_STATUS_V(status),
+                                location);
 }
 
 bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *status)
 }
 
 bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *status)
index c10aa36561183eaad98ecfdbab78cbc3dc3d1d42..4ac9243320d534b935e7445082e767a00fa581f0 100644 (file)
 #include "../libcli/util/ntstatus.h"
 #include <tevent.h>
 
 #include "../libcli/util/ntstatus.h"
 #include <tevent.h>
 
-bool tevent_req_nterror(struct tevent_req *req, NTSTATUS status);
+bool _tevent_req_nterror(struct tevent_req *req,
+                        NTSTATUS status,
+                        const char *location);
+#define tevent_req_nterror(req, status) \
+       _tevent_req_nterror(req, status, __location__)
 bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *pstatus);
 NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req);
 
 bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *pstatus);
 NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req);