MCPcopy Create free account
hub / github.com/antirez/ds4 / dist_send_error

Function dist_send_error

ds4_distributed.c:1167–1173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1165}
1166
1167static int dist_send_error(int fd, const char *msg) {
1168 if (!msg) msg = "distributed protocol error";
1169 size_t len = strlen(msg);
1170 if (len > UINT32_MAX) len = UINT32_MAX;
1171 if (dist_write_frame_header(fd, DS4_DIST_MSG_ERROR, (uint32_t)len) != 0) return -1;
1172 return dist_write_full(fd, msg, len);
1173}
1174
1175static void dist_peer_name(int fd, char *host, size_t hostlen, char *port, size_t portlen) {
1176 if (hostlen) host[0] = '\0';

Callers 3

dist_worker_read_loopFunction · 0.85

Calls 2

dist_write_frame_headerFunction · 0.85
dist_write_fullFunction · 0.85

Tested by

no test coverage detected