mirror of
https://github.com/matrix-construct/construct
synced 2024-09-30 12:48:54 +02:00
ircd:Ⓜ️ Fix various inconsistent format strings; minor cleanup.
This commit is contained in:
parent
5fb1a6633d
commit
04c81a41ed
9 changed files with 39 additions and 26 deletions
|
@ -371,7 +371,7 @@ catch(const std::exception &e)
|
||||||
{
|
{
|
||||||
log::critical
|
log::critical
|
||||||
{
|
{
|
||||||
log, "request_cleanup(): %s",
|
log, "request_cleanup() :%s",
|
||||||
e.what(),
|
e.what(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ catch(const json::print_error &e)
|
||||||
throw m::error
|
throw m::error
|
||||||
{
|
{
|
||||||
http::INTERNAL_SERVER_ERROR, "M_NOT_JSON",
|
http::INTERNAL_SERVER_ERROR, "M_NOT_JSON",
|
||||||
"Generator Protection: %s",
|
"Generator Protection :%s",
|
||||||
e.what()
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,7 @@ catch(const json::not_found &e)
|
||||||
throw m::error
|
throw m::error
|
||||||
{
|
{
|
||||||
http::BAD_REQUEST, "M_BAD_JSON",
|
http::BAD_REQUEST, "M_BAD_JSON",
|
||||||
"Required JSON field: %s",
|
"Required JSON field :%s",
|
||||||
e.what()
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -491,7 +491,7 @@ try
|
||||||
throw m::error
|
throw m::error
|
||||||
{
|
{
|
||||||
http::UNAUTHORIZED, "M_MISSING_AUTHORIZATION",
|
http::UNAUTHORIZED, "M_MISSING_AUTHORIZATION",
|
||||||
"Required X-Matrix Authorization was not supplied"
|
"Required X-Matrix Authorization was not supplied."
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto supplied_dest
|
const auto supplied_dest
|
||||||
|
@ -539,7 +539,7 @@ catch(const std::exception &e)
|
||||||
thread_local char rembuf[128];
|
thread_local char rembuf[128];
|
||||||
log::derror
|
log::derror
|
||||||
{
|
{
|
||||||
resource::log, "X-Matrix Authorization from %s: %s",
|
resource::log, "X-Matrix Authorization from %s :%s",
|
||||||
string(rembuf, remote(client)),
|
string(rembuf, remote(client)),
|
||||||
e.what()
|
e.what()
|
||||||
};
|
};
|
||||||
|
@ -547,7 +547,7 @@ catch(const std::exception &e)
|
||||||
throw m::error
|
throw m::error
|
||||||
{
|
{
|
||||||
http::UNAUTHORIZED, "M_UNKNOWN_ERROR",
|
http::UNAUTHORIZED, "M_UNKNOWN_ERROR",
|
||||||
"An error has prevented authorization: %s",
|
"An error has prevented authorization :%s",
|
||||||
e.what()
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set power_levels: %s", e.what()
|
errors, room_id, creator, "Failed to set power_levels :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +155,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set room_alias_name: %s", e.what()
|
errors, room_id, creator, "Failed to set room_alias_name :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +182,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set join_rules: %s", e.what()
|
errors, room_id, creator, "Failed to set join_rules :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +208,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set history_visibility: %s", e.what()
|
errors, room_id, creator, "Failed to set history_visibility :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,7 +234,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set guest_access: %s", e.what()
|
errors, room_id, creator, "Failed to set guest_access :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +257,7 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set initial_state event @%zu: %s",
|
errors, room_id, creator, "Failed to set initial_state event @%zu :%s",
|
||||||
i++,
|
i++,
|
||||||
e.what()
|
e.what()
|
||||||
};
|
};
|
||||||
|
@ -282,7 +287,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set room name: %s", e.what()
|
errors, room_id, creator, "Failed to set room name :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,7 +305,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set room topic: %s", e.what()
|
errors, room_id, creator, "Failed to set room topic :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +365,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set guest_access: %s", e.what()
|
errors, room_id, creator, "Failed to set guest_access :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,7 +383,8 @@ try
|
||||||
{
|
{
|
||||||
report_error
|
report_error
|
||||||
{
|
{
|
||||||
errors, room_id, creator, "Failed to set public visibility: %s", e.what()
|
errors, room_id, creator, "Failed to set public visibility :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -353,7 +353,7 @@ catch(const std::exception &e)
|
||||||
{
|
{
|
||||||
log::critical
|
log::critical
|
||||||
{
|
{
|
||||||
"is_password__user(): %s %s",
|
"is_password__user() :%s %s",
|
||||||
string_view{user_id},
|
string_view{user_id},
|
||||||
e.what()
|
e.what()
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,7 +76,8 @@ ircd::m::vm::conform_check_origin
|
||||||
if(unlikely(eval.copts && !my_host(at<"origin"_>(event))))
|
if(unlikely(eval.copts && !my_host(at<"origin"_>(event))))
|
||||||
throw error
|
throw error
|
||||||
{
|
{
|
||||||
fault::INVALID, "Issuing event for origin: %s", at<"origin"_>(event)
|
fault::INVALID, "Issuing event for origin :%s",
|
||||||
|
at<"origin"_>(event)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -186,7 +187,7 @@ ircd::m::vm::conform_report
|
||||||
if(!report.clean())
|
if(!report.clean())
|
||||||
throw error
|
throw error
|
||||||
{
|
{
|
||||||
fault::INVALID, "Non-conforming event: %s",
|
fault::INVALID, "Non-conforming event :%s",
|
||||||
string(report)
|
string(report)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -430,7 +430,7 @@ ircd::m::vm::inject1(eval &eval,
|
||||||
if(opts.debuglog_precommit)
|
if(opts.debuglog_precommit)
|
||||||
log::debug
|
log::debug
|
||||||
{
|
{
|
||||||
log, "Issuing: %s", pretty_oneline(event_tuple)
|
log, "Issuing :%s", pretty_oneline(event_tuple)
|
||||||
};
|
};
|
||||||
|
|
||||||
const vector_view events
|
const vector_view events
|
||||||
|
@ -525,7 +525,7 @@ ircd::m::vm::inject3(eval &eval,
|
||||||
if(opts.debuglog_precommit)
|
if(opts.debuglog_precommit)
|
||||||
log::debug
|
log::debug
|
||||||
{
|
{
|
||||||
log, "Issuing: %s", pretty_oneline(event_tuple)
|
log, "Issuing :%s", pretty_oneline(event_tuple)
|
||||||
};
|
};
|
||||||
|
|
||||||
const vector_view events
|
const vector_view events
|
||||||
|
|
|
@ -234,7 +234,7 @@ check_event(const m::resource::request &request,
|
||||||
throw m::error
|
throw m::error
|
||||||
{
|
{
|
||||||
http::NOT_MODIFIED, "M_INVALID_EVENT",
|
http::NOT_MODIFIED, "M_INVALID_EVENT",
|
||||||
"Proffered event has the following problems: %s",
|
"Proffered event has the following problems :%s",
|
||||||
string(report)
|
string(report)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ put__invite2(client &client,
|
||||||
throw m::error
|
throw m::error
|
||||||
{
|
{
|
||||||
http::NOT_MODIFIED, "M_INVALID_EVENT",
|
http::NOT_MODIFIED, "M_INVALID_EVENT",
|
||||||
"Proffered event has the following problems: %s",
|
"Proffered event has the following problems :%s",
|
||||||
string(report)
|
string(report)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,8 @@ send_worker()
|
||||||
{
|
{
|
||||||
log::error
|
log::error
|
||||||
{
|
{
|
||||||
"sender worker: %s", e.what()
|
m::log, "sender worker :%s",
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -491,7 +492,9 @@ catch(const std::exception &e)
|
||||||
{
|
{
|
||||||
log::error
|
log::error
|
||||||
{
|
{
|
||||||
"flush error to %s :%s", remote, e.what()
|
"flush error to %s :%s",
|
||||||
|
remote,
|
||||||
|
e.what()
|
||||||
};
|
};
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -86,7 +86,7 @@ post__upload(client &client,
|
||||||
|
|
||||||
log::debug
|
log::debug
|
||||||
{
|
{
|
||||||
m::media::log, "%s uploaded %zu bytes uri: `%s' file_room: %s :%s",
|
m::media::log, "%s uploaded %zu bytes uri: `%s' file_room %s :%s",
|
||||||
request.user_id,
|
request.user_id,
|
||||||
request.head.content_length,
|
request.head.content_length,
|
||||||
content_uri,
|
content_uri,
|
||||||
|
|
Loading…
Reference in a new issue