comparison cli-agentfwd.c @ 1323:83d85b28b353

upgrade atomicio in order to remove K&R code in atomicio.c now, vwrite comes from atomicio.h
author Francois Perrad <francois.perrad@gadz.org>
date Fri, 25 Mar 2016 12:05:17 +0100
parents 750ec4ec4cbe
children 06d52bcb8094
comparison
equal deleted inserted replaced
1322:826a3293fe5a 1323:83d85b28b353
128 if (data) { 128 if (data) {
129 buf_putbytes(payload, data->data, data->len); 129 buf_putbytes(payload, data->data, data->len);
130 } 130 }
131 buf_setpos(payload, 0); 131 buf_setpos(payload, 0);
132 132
133 ret = atomicio(write, fd, buf_getptr(payload, payload->len), payload->len); 133 ret = atomicio(vwrite, fd, buf_getptr(payload, payload->len), payload->len);
134 if ((size_t)ret != payload->len) { 134 if ((size_t)ret != payload->len) {
135 TRACE(("write failed fd %d for agent_request, %s", fd, strerror(errno))) 135 TRACE(("write failed fd %d for agent_request, %s", fd, strerror(errno)))
136 goto out; 136 goto out;
137 } 137 }
138 138