예제 #1
0
/**
 * @brief Immediate event callback
 * @param[in] ev	Event context
 * @param[in] im	The immediate event
 * @param[in] priv	The async request to be finished
 */
static void tevent_req_trigger(struct tevent_context *ev,
			       struct tevent_immediate *im,
			       void *private_data)
{
	struct tevent_req *req = talloc_get_type(private_data,
				 struct tevent_req);

	tevent_req_finish(req, req->internal.state,
			  req->internal.finish_location);
}
예제 #2
0
bool _tevent_req_nomem(const void *p,
		       struct tevent_req *req,
		       const char *location)
{
	if (p != NULL) {
		return false;
	}
	tevent_req_finish(req, TEVENT_REQ_NO_MEMORY, location);
	return true;
}
예제 #3
0
static void tevent_req_timedout(struct tevent_context *ev,
			       struct tevent_timer *te,
			       struct timeval now,
			       void *private_data)
{
	struct tevent_req *req = talloc_get_type(private_data,
				 struct tevent_req);

	TALLOC_FREE(req->internal.timer);

	tevent_req_finish(req, TEVENT_REQ_TIMED_OUT, __FUNCTION__);
}
예제 #4
0
bool _tevent_req_error(struct tevent_req *req,
		       uint64_t error,
		       const char *location)
{
	if (error == 0) {
		return false;
	}

	req->internal.error = error;
	tevent_req_finish(req, TEVENT_REQ_USER_ERROR, location);
	return true;
}
예제 #5
0
void _tevent_req_done(struct tevent_req *req,
		      const char *location)
{
	tevent_req_finish(req, TEVENT_REQ_DONE, location);
}
예제 #6
0
파일: tevent_req.c 프로젝트: Arkhont/samba
void _tevent_req_oom(struct tevent_req *req, const char *location)
{
	tevent_req_finish(req, TEVENT_REQ_NO_MEMORY, location);
}