root/tags/omega-1.0.0-rc2/tools/daemon/send_line.c
| Revision 154, 376 bytes (checked in by malte, 2 years ago) |
|---|
| Line | |
|---|---|
| 1 | |
| 2 | #include "send_line.h" |
| 3 | |
| 4 | |
| 5 | int send_line(int fd, char *src, size_t len) |
| 6 | { |
| 7 | int res; |
| 8 | |
| 9 | if ((res = send_data(fd, src, len)) < 0) { |
| 10 | |
| 11 | say(message(MSG_ERROR_SOCKET_WR), strerror(errno)); |
| 12 | |
| 13 | return (-1); |
| 14 | |
| 15 | } else { |
| 16 | /*char *nmb = calloc(10, sizeof(char)); |
| 17 | |
| 18 | sprintf(nmb, "%d", res); |
| 19 | |
| 20 | say(message(MSG_BYTES_WRITTEN), nmb); |
| 21 | |
| 22 | free(nmb);*/ |
| 23 | |
| 24 | return (NO_ERROR); |
| 25 | } |
| 26 | } |
Note: See TracBrowser
for help on using the browser.
