Lines Matching refs: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;
115 req = container_of(w, uv_getaddrinfo_t, work_req);
118 uv__free(req->alloc);
119 req->alloc = NULL;
122 assert(req->retcode == 0);
123 req->retcode = UV_EAI_CANCELED;
127 if (req->retcode == 0) {
129 addrinfow_ptr = req->addrinfow;
143 req->retcode = uv_translate_sys_error(GetLastError());
157 addrinfow_ptr = req->addrinfow;
215 req->addrinfo = (struct addrinfo*)alloc_ptr;
217 req->retcode = UV_EAI_MEMORY;
222 if (req->addrinfow != NULL) {
223 FreeAddrInfoW(req->addrinfow);
224 req->addrinfow = NULL;
228 uv__req_unregister(req->loop, req);
231 if (req->getaddrinfo_cb)
232 req->getaddrinfo_cb(req, req->retcode, req->addrinfo);
247 * and save the UNICODE string pointers in the req
258 uv_getaddrinfo_t* req,
271 if (req == NULL || (node == NULL && service == NULL)) {
275 UV_REQ_INIT(req, UV_GETADDRINFO);
276 req->getaddrinfo_cb = getaddrinfo_cb;
277 req->addrinfo = NULL;
278 req->loop = loop;
279 req->retcode = 0;
323 req->alloc = (void*)alloc_ptr;
328 req->node = (WCHAR*)alloc_ptr;
340 req->node = NULL;
344 * the req. */
346 req->service = (WCHAR*)alloc_ptr;
358 req->service = NULL;
361 /* copy hints to allocated memory and save pointer in req */
363 req->addrinfow = (struct addrinfoW*)alloc_ptr;
364 req->addrinfow->ai_family = hints->ai_family;
365 req->addrinfow->ai_socktype = hints->ai_socktype;
366 req->addrinfow->ai_protocol = hints->ai_protocol;
367 req->addrinfow->ai_flags = hints->ai_flags;
368 req->addrinfow->ai_addrlen = 0;
369 req->addrinfow->ai_canonname = NULL;
370 req->addrinfow->ai_addr = NULL;
371 req->addrinfow->ai_next = NULL;
373 req->addrinfow = NULL;
376 uv__req_register(loop, req);
380 &req->work_req,
386 uv__getaddrinfo_work(&req->work_req);
387 uv__getaddrinfo_done(&req->work_req, 0);
388 return req->retcode;
392 if (req != NULL) {
393 uv__free(req->alloc);
394 req->alloc = NULL;