improve portmap logging
This commit is contained in:
parent
61a923e9b8
commit
95fe4ba3e2
|
@ -1146,7 +1146,7 @@ namespace {
|
|||
|
||||
std::string portmap_log_alert::message() const
|
||||
{
|
||||
char ret[600];
|
||||
char ret[1024];
|
||||
std::snprintf(ret, sizeof(ret), "%s: %s"
|
||||
, nat_type_str[static_cast<int>(map_transport)]
|
||||
, log_message());
|
||||
|
|
|
@ -285,7 +285,9 @@ void natpmp::mapping_log(char const* op, mapping_t const& m) const
|
|||
, m.external_port
|
||||
, m.local_port
|
||||
, to_string(m.act)
|
||||
, total_seconds(m.expires - aux::time_now()));
|
||||
, (m.expires.time_since_epoch() != seconds(0))
|
||||
? total_seconds(m.expires - aux::time_now())
|
||||
: std::int64_t(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue