[CORE] Improve logging error in ogs_gtp_sendto() (#1591)
This commit is contained in:
parent
cfe21c61da
commit
5238771295
|
@ -116,8 +116,12 @@ int ogs_gtp_sendto(ogs_gtp_node_t *gnode, ogs_pkbuf_t *pkbuf)
|
||||||
sent = ogs_sendto(sock->fd, pkbuf->data, pkbuf->len, 0, addr);
|
sent = ogs_sendto(sock->fd, pkbuf->data, pkbuf->len, 0, addr);
|
||||||
if (sent < 0 || sent != pkbuf->len) {
|
if (sent < 0 || sent != pkbuf->len) {
|
||||||
if (ogs_socket_errno != OGS_EAGAIN) {
|
if (ogs_socket_errno != OGS_EAGAIN) {
|
||||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
char buf[OGS_ADDRSTRLEN];
|
||||||
"ogs_gtp_sendto() failed");
|
int err = ogs_socket_errno;
|
||||||
|
ogs_log_message(OGS_LOG_ERROR, err,
|
||||||
|
"ogs_gtp_sendto(%u, %p, %u, 0, %s:%u) failed",
|
||||||
|
sock->fd, pkbuf->data, pkbuf->len,
|
||||||
|
OGS_ADDR(addr, buf), OGS_PORT(addr));
|
||||||
}
|
}
|
||||||
return OGS_ERROR;
|
return OGS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue