Lines Matching defs:req
26 #include "req-inl.h"
84 uv_getaddrinfo_t* req;
88 req = container_of(w, uv_getaddrinfo_t, work_req);
89 hints = req->addrinfow;
90 req->addrinfow = NULL;
91 err = GetAddrInfoW(req->node, req->service, hints, &req->addrinfow);
92 req->retcode = uv__getaddrinfo_translate_error(err);
106 uv_getaddrinfo_t* req;
116 req = container_of(w, uv_getaddrinfo_t, work_req);
119 uv__free(req->alloc);
120 req->alloc = NULL;
123 assert(req->retcode == 0);
124 req->retcode = UV_EAI_CANCELED;
128 if (req->retcode == 0) {
130 addrinfow_ptr = req->addrinfow;
137 req->retcode = name_len;
151 addrinfow_ptr = req->addrinfow;
196 req->addrinfo = (struct addrinfo*)alloc_ptr;
198 req->retcode = UV_EAI_MEMORY;
203 if (req->addrinfow != NULL) {
204 FreeAddrInfoW(req->addrinfow);
205 req->addrinfow = NULL;
209 uv__req_unregister(req->loop, req);
212 if (req->getaddrinfo_cb)
213 req->getaddrinfo_cb(req, req->retcode, req->addrinfo);
228 * and save the UNICODE string pointers in the req
239 uv_getaddrinfo_t* req,
251 if (req == NULL || (node == NULL && service == NULL)) {
255 UV_REQ_INIT(req, UV_GETADDRINFO);
256 req->getaddrinfo_cb = getaddrinfo_cb;
257 req->addrinfo = NULL;
258 req->loop = loop;
259 req->retcode = 0;
291 req->alloc = (void*) alloc_ptr;
296 req->node = (WCHAR*) alloc_ptr;
300 req->node = NULL;
304 * the req. */
306 req->service = (WCHAR*) alloc_ptr;
310 req->service = NULL;
313 /* copy hints to allocated memory and save pointer in req */
315 req->addrinfow = (struct addrinfoW*) alloc_ptr;
316 req->addrinfow->ai_family = hints->ai_family;
317 req->addrinfow->ai_socktype = hints->ai_socktype;
318 req->addrinfow->ai_protocol = hints->ai_protocol;
319 req->addrinfow->ai_flags = hints->ai_flags;
320 req->addrinfow->ai_addrlen = 0;
321 req->addrinfow->ai_canonname = NULL;
322 req->addrinfow->ai_addr = NULL;
323 req->addrinfow->ai_next = NULL;
325 req->addrinfow = NULL;
328 uv__req_register(loop, req);
332 &req->work_req,
338 uv__getaddrinfo_work(&req->work_req);
339 uv__getaddrinfo_done(&req->work_req, 0);
340 return req->retcode;