search for: msg_to_discard

Displaying 1 result from an estimated 1 matches for "msg_to_discard".

2006 Sep 06
7
[RFC PATCH] allow connecting to xenconsole from remote hosts
...har* prefix, int fd, const char *data, size_t len) +{ + dbg("%s: %u bytes on %d:\n", prefix, len, fd); + dbg("msg: `%s''\n", data); +} + +static int handle_read_fd(int fd, struct queue* q, struct queue* discard) +{ + int ret; + ssize_t len; + char *msg; + struct message *msg_to_discard; + + msg = malloc(MSG_SIZE); + if (!msg) + return -ENOMEM; + + len = read(fd, msg, MSG_SIZE); + if (len == 1 && msg[0] == ESCAPE_CHARACTER) { + ret = ECONNRESET; + goto free_msg; + } + + if (len == -1) { + if (errno == EINTR || errno == EAGAIN) + ret = EINTR; + else + ret = -errno;...