forked from acouzens/open5gs
[CORE] Improve logging error in PFCP (#1591)
This commit is contained in:
parent
5238771295
commit
b1e7477904
|
@ -114,8 +114,14 @@ int ogs_pfcp_sendto(ogs_pfcp_node_t *node, 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) {
|
||||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
if (ogs_socket_errno != OGS_EAGAIN) {
|
||||||
"ogs_pfcp_sendto() failed");
|
char buf[OGS_ADDRSTRLEN];
|
||||||
|
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