int server_fd, client_fd;
int server_to_client_buffer[2]; /* a pipe */
int client_to_server_buffer[2]; /* a pipe */
int server_fd, client_fd;
int server_to_client_buffer[2]; /* a pipe */
int client_to_server_buffer[2]; /* a pipe */
strncpy(sa->un.sun_path, arg_remote_host, sizeof(sa->un.sun_path)-1);
sa->un.sun_path[sizeof(sa->un.sun_path)-1] = 0;
strncpy(sa->un.sun_path, arg_remote_host, sizeof(sa->un.sun_path)-1);
sa->un.sun_path[sizeof(sa->un.sun_path)-1] = 0;
strncpy(sa->un.sun_path+1, arg_remote_host+1, sizeof(sa->un.sun_path)-2);
sa->un.sun_path[sizeof(sa->un.sun_path)-1] = 0;
strncpy(sa->un.sun_path+1, arg_remote_host+1, sizeof(sa->un.sun_path)-2);
sa->un.sun_path[sizeof(sa->un.sun_path)-1] = 0;
c->server_fd = fd;
c->client_fd = -1;
c->server_to_client_buffer[0] = c->server_to_client_buffer[1] = -1;
c->client_to_server_buffer[0] = c->client_to_server_buffer[1] = -1;
c->server_fd = fd;
c->client_fd = -1;
c->server_to_client_buffer[0] = c->server_to_client_buffer[1] = -1;
c->client_to_server_buffer[0] = c->client_to_server_buffer[1] = -1;
}
static int accept_cb(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
}
static int accept_cb(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
assert(context);
nfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC);
assert(context);
nfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC);
getpeername_pretty(nfd, &peer);
log_debug("New connection from %s", strna(peer));
getpeername_pretty(nfd, &peer);
log_debug("New connection from %s", strna(peer));
- log_error("Error %d while re-enabling listener with ONESHOT: %s", r, strerror(-r));
+ log_error("Error while re-enabling listener with ONESHOT: %s", strerror(-r));
+ sd_event_exit(sd_event_source_get_event(s), r);