Lines Matching refs:ret

46     int ret;  in colo_proxy_send()  local
74 ret = sendmsg(cps->sock_fd, &mh, 0); in colo_proxy_send()
75 if (ret <= 0) { in colo_proxy_send()
80 return ret; in colo_proxy_send()
87 int ret = 0; in colo_userspace_proxy_send() local
91 ret = send(cps->sock_fd, (uint8_t *)&len, sizeof(len), 0); in colo_userspace_proxy_send()
92 if (ret != sizeof(len)) { in colo_userspace_proxy_send()
96 ret = send(cps->sock_fd, (uint8_t *)buff, size, 0); in colo_userspace_proxy_send()
97 if (ret != size) { in colo_userspace_proxy_send()
102 return ret; in colo_userspace_proxy_send()
110 int ret; in colo_userspace_proxy_recv() local
119 ret = setsockopt(cps->sock_fd, SOL_SOCKET, SO_RCVTIMEO, &tv, in colo_userspace_proxy_recv()
121 if (ret < 0) { in colo_userspace_proxy_recv()
128 ret = recv(cps->sock_fd, (uint8_t *)&len, sizeof(len), 0); in colo_userspace_proxy_recv()
129 if (ret < 0) { in colo_userspace_proxy_recv()
134 ret = recv(cps->sock_fd, buff, size, 0); in colo_userspace_proxy_recv()
137 return ret; in colo_userspace_proxy_recv()
155 int ret; in colo_proxy_recv() local
169 ret = recvmsg(cps->sock_fd, &mh, 0); in colo_proxy_recv()
170 if (ret <= 0) { in colo_proxy_recv()
176 len += ret; in colo_proxy_recv()
186 ret = len; in colo_proxy_recv()
199 return ret; in colo_proxy_recv()
210 int ret = ERROR_FAIL; in colo_proxy_setup() local
243 ret = colo_userspace_proxy_send(cps, (uint8_t *)sendbuf, strlen(sendbuf)); in colo_proxy_setup()
244 if (ret < 0) in colo_proxy_setup()
247 ret = colo_userspace_proxy_recv(cps, recvbuff, COLO_DEFAULT_WAIT_TIME); in colo_proxy_setup()
248 if (ret < 0) { in colo_proxy_setup()
274 ret = bind(skfd, (struct sockaddr *)&sa, sizeof(sa)); in colo_proxy_setup()
275 if (ret < 0 && errno == EADDRINUSE) { in colo_proxy_setup()
278 } else if (ret < 0) { in colo_proxy_setup()
284 ret = colo_proxy_send(cps, NULL, 0, COLO_PROXY_INIT); in colo_proxy_setup()
285 if (ret < 0) in colo_proxy_setup()
314 ret = 0; in colo_proxy_setup()
318 if (ret) { in colo_proxy_setup()
322 return ret; in colo_proxy_setup()
382 int ret = -1; in colo_proxy_checkpoint() local
396 ret = colo_userspace_proxy_recv(cps, recvbuff, timeout_us); in colo_proxy_checkpoint()
397 if (ret <= 0) { in colo_proxy_checkpoint()
398 ret = 0; in colo_proxy_checkpoint()
403 ret = 1; in colo_proxy_checkpoint()
406 ret = 0; in colo_proxy_checkpoint()
415 ret = 0; in colo_proxy_checkpoint()
433 ret = m->is_checkpoint ? 1 : 0; in colo_proxy_checkpoint()
437 return ret; in colo_proxy_checkpoint()