summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c33ceb0)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
if (code >= LTTNG_UST_ERR_NR)
code = LTTNG_UST_ERR;
return ustcomm_readable_code[USTCOMM_CODE_OFFSET(code)];
if (code >= LTTNG_UST_ERR_NR)
code = LTTNG_UST_ERR;
return ustcomm_readable_code[USTCOMM_CODE_OFFSET(code)];
* is used in normal execution to detect if sessiond is
* alive.
*/
* is used in normal execution to detect if sessiond is
* alive.
*/
+ if (errno != ECONNREFUSED && errno != ECONNRESET)
+ PERROR("connect");
+ if (ret == -ECONNREFUSED || ret == -ECONNRESET)
+ ret = -EPIPE;
if (ret < 0) {
int shutret;
if (ret < 0) {
int shutret;
- if (errno != EPIPE && errno != ECONNRESET)
+ if (errno != EPIPE && errno != ECONNRESET && errno != ECONNREFUSED)
PERROR("recvmsg");
ret = -errno;
PERROR("recvmsg");
ret = -errno;
- if (ret == -ECONNRESET)
+ if (ret == -ECONNRESET || ret == -ECONNREFUSED)
ret = -EPIPE;
shutret = shutdown(sock, SHUT_RDWR);
ret = -EPIPE;
shutret = shutdown(sock, SHUT_RDWR);
if (errno != EPIPE && errno != ECONNRESET) {
PERROR("recvmsg fds");
}
if (errno != EPIPE && errno != ECONNRESET) {
PERROR("recvmsg fds");
}
- if (errno == EPIPE || errno == ECONNRESET)
- ret = -errno;
if (ret == -ECONNRESET)
ret = -EPIPE;
goto end;
if (ret == -ECONNRESET)
ret = -EPIPE;
goto end;
}
return lur->ret_code;
default:
}
return lur->ret_code;
default:
- if (len < 0) {
- /* Transport level error */
- if (errno == EPIPE || errno == ECONNRESET)
- len = -errno;
- return len;
- } else {
ERR("incorrect message size: %zd\n", len);
ERR("incorrect message size: %zd\n", len);