Skip to content

Commit

Permalink
rtpengine: improve error logs: print # iovec buffers along errno/stre…
Browse files Browse the repository at this point in the history
…rror on writev failure

(cherry picked from commit bd099af)
  • Loading branch information
ovidiusas committed Jun 27, 2020
1 parent 680ddf6 commit 384d521
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/rtpengine/rtpengine.c
Expand Up @@ -2016,8 +2016,8 @@ send_rtpe_command(struct rtpe_node *node, bencode_item_t *dict, int *outlen)
} while (len == -1 && errno == EINTR);
if (len <= 0) {
close(fd);
LM_ERR("can't send command to a RTP proxy (%d:%s)\n",
errno, strerror(errno));
LM_ERR("can't send (#%d iovec buffers) command to a RTP proxy (%d:%s)\n",
vcnt - 1, errno, strerror(errno));
goto badproxy;
}
do {
Expand Down Expand Up @@ -2061,8 +2061,8 @@ send_rtpe_command(struct rtpe_node *node, bencode_item_t *dict, int *outlen)
len = writev(rtpe_socks[node->idx], v, vcnt);
} while (len == -1 && (errno == EINTR || errno == ENOBUFS || errno == EMSGSIZE));
if (len <= 0) {
LM_ERR("can't send command to a RTP proxy (%d:%s)\n",
errno, strerror(errno));
LM_ERR("can't send (#%d iovec buffers) command to a RTP proxy (%d:%s)\n",
vcnt, errno, strerror(errno));
RTPE_IO_ERROR_CLOSE(rtpe_socks[node->idx]);
continue;
}
Expand Down

0 comments on commit 384d521

Please sign in to comment.