| 160 | } |
| 161 | |
| 162 | char *net_read_static(int fd) |
| 163 | { |
| 164 | static char buf[4096]; |
| 165 | int res; |
| 166 | |
| 167 | res = recv(fd, buf, sizeof(buf) - 1, 0); |
| 168 | if (res < 0) { |
| 169 | LM_ERR("recv() failed: %s\n", strerror(errno)); |
| 170 | return NULL; |
| 171 | } |
| 172 | if (!res) |
| 173 | return NULL; |
| 174 | buf[res] = 0; |
| 175 | return buf; |
| 176 | } |
no outgoing calls
no test coverage detected