1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

lib/util: change tevent_req_nterror() to a macro

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
This commit is contained in:
Stefan Metzmacher 2010-09-26 11:14:19 +02:00
parent a40dcd161c
commit f9ba8f5d8a
2 changed files with 10 additions and 3 deletions

View File

@ -20,9 +20,12 @@
#include "../replace/replace.h" #include "../replace/replace.h"
#include "tevent_ntstatus.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)

View File

@ -25,7 +25,11 @@
#include "../libcli/util/ntstatus.h" #include "../libcli/util/ntstatus.h"
#include <tevent.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); bool tevent_req_is_nterror(struct tevent_req *req, NTSTATUS *pstatus);
NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req); NTSTATUS tevent_req_simple_recv_ntstatus(struct tevent_req *req);