Lines Matching refs:req

83   uv_getaddrinfo_t* req;  in uv__getaddrinfo_work()  local
87 req = container_of(w, uv_getaddrinfo_t, work_req); in uv__getaddrinfo_work()
88 hints = req->addrinfow; in uv__getaddrinfo_work()
89 req->addrinfow = NULL; in uv__getaddrinfo_work()
90 err = GetAddrInfoW(req->node, req->service, hints, &req->addrinfow); in uv__getaddrinfo_work()
91 req->retcode = uv__getaddrinfo_translate_error(err); in uv__getaddrinfo_work()
105 uv_getaddrinfo_t* req = container_of(w, uv_getaddrinfo_t, work_req); in uv__getaddrinfo_done() local
108 uv__free(req->alloc); in uv__getaddrinfo_done()
109 req->alloc = NULL; in uv__getaddrinfo_done()
112 assert(req->retcode == 0); in uv__getaddrinfo_done()
113 req->retcode = UV_EAI_CANCELED; in uv__getaddrinfo_done()
117 if (req->retcode == 0) { in uv__getaddrinfo_done()
122 struct addrinfoW* addrinfow_ptr = req->addrinfow; in uv__getaddrinfo_done()
134 req->retcode = name_len; in uv__getaddrinfo_done()
150 addrinfow_ptr = req->addrinfow; in uv__getaddrinfo_done()
198 req->addrinfo = (struct addrinfo*)alloc_ptr; in uv__getaddrinfo_done()
200 req->retcode = UV_EAI_MEMORY; in uv__getaddrinfo_done()
205 if (req->addrinfow != NULL) { in uv__getaddrinfo_done()
206 FreeAddrInfoW(req->addrinfow); in uv__getaddrinfo_done()
207 req->addrinfow = NULL; in uv__getaddrinfo_done()
211 uv__req_unregister(req->loop); in uv__getaddrinfo_done()
214 if (req->getaddrinfo_cb) in uv__getaddrinfo_done()
215 req->getaddrinfo_cb(req, req->retcode, req->addrinfo); in uv__getaddrinfo_done()
241 uv_getaddrinfo_t* req, in uv_getaddrinfo() argument
255 if (req == NULL || (node == NULL && service == NULL)) { in uv_getaddrinfo()
259 UV_REQ_INIT(req, UV_GETADDRINFO); in uv_getaddrinfo()
260 req->getaddrinfo_cb = getaddrinfo_cb; in uv_getaddrinfo()
261 req->addrinfo = NULL; in uv_getaddrinfo()
262 req->loop = loop; in uv_getaddrinfo()
263 req->retcode = 0; in uv_getaddrinfo()
296 req->alloc = uv__malloc(off); in uv_getaddrinfo()
297 if (!req->alloc) in uv_getaddrinfo()
303 req->node = (WCHAR*) req->alloc; in uv_getaddrinfo()
304 uv_wtf8_to_utf16(node, req->node, nodesize); in uv_getaddrinfo()
306 req->node = NULL; in uv_getaddrinfo()
312 req->service = (WCHAR*) ((char*) req->alloc + serviceoff); in uv_getaddrinfo()
313 uv_wtf8_to_utf16(service, req->service, servicesize); in uv_getaddrinfo()
315 req->service = NULL; in uv_getaddrinfo()
320 req->addrinfow = (struct addrinfoW*) ((char*) req->alloc + hintoff); in uv_getaddrinfo()
321 req->addrinfow->ai_family = hints->ai_family; in uv_getaddrinfo()
322 req->addrinfow->ai_socktype = hints->ai_socktype; in uv_getaddrinfo()
323 req->addrinfow->ai_protocol = hints->ai_protocol; in uv_getaddrinfo()
324 req->addrinfow->ai_flags = hints->ai_flags; in uv_getaddrinfo()
325 req->addrinfow->ai_addrlen = 0; in uv_getaddrinfo()
326 req->addrinfow->ai_canonname = NULL; in uv_getaddrinfo()
327 req->addrinfow->ai_addr = NULL; in uv_getaddrinfo()
328 req->addrinfow->ai_next = NULL; in uv_getaddrinfo()
330 req->addrinfow = NULL; in uv_getaddrinfo()
337 &req->work_req, in uv_getaddrinfo()
343 uv__getaddrinfo_work(&req->work_req); in uv_getaddrinfo()
344 uv__getaddrinfo_done(&req->work_req, 0); in uv_getaddrinfo()
345 return req->retcode; in uv_getaddrinfo()