MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / net_read_static

Function net_read_static

modules/xmpp/network.c:162–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162char *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}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected