0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-23 22:13:55 +01:00

ircd:Ⓜ️ Fix various inconsistent format strings; minor cleanup.

This commit is contained in:
Jason Volk 2023-02-17 17:22:53 -08:00
parent 5fb1a6633d
commit 04c81a41ed
9 changed files with 39 additions and 26 deletions

View file

@ -371,7 +371,7 @@ catch(const std::exception &e)
{
log::critical
{
log, "request_cleanup(): %s",
log, "request_cleanup() :%s",
e.what(),
};

View file

@ -242,7 +242,7 @@ catch(const json::print_error &e)
throw m::error
{
http::INTERNAL_SERVER_ERROR, "M_NOT_JSON",
"Generator Protection: %s",
"Generator Protection :%s",
e.what()
};
}
@ -251,7 +251,7 @@ catch(const json::not_found &e)
throw m::error
{
http::BAD_REQUEST, "M_BAD_JSON",
"Required JSON field: %s",
"Required JSON field :%s",
e.what()
};
}
@ -491,7 +491,7 @@ try
throw m::error
{
http::UNAUTHORIZED, "M_MISSING_AUTHORIZATION",
"Required X-Matrix Authorization was not supplied"
"Required X-Matrix Authorization was not supplied."
};
const auto supplied_dest
@ -539,7 +539,7 @@ catch(const std::exception &e)
thread_local char rembuf[128];
log::derror
{
resource::log, "X-Matrix Authorization from %s: %s",
resource::log, "X-Matrix Authorization from %s :%s",
string(rembuf, remote(client)),
e.what()
};
@ -547,7 +547,7 @@ catch(const std::exception &e)
throw m::error
{
http::UNAUTHORIZED, "M_UNKNOWN_ERROR",
"An error has prevented authorization: %s",
"An error has prevented authorization :%s",
e.what()
};
}

View file

@ -132,7 +132,8 @@ try
{
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
{
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
{
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
{
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
{
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
{
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++,
e.what()
};
@ -282,7 +287,8 @@ try
{
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
{
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
{
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
{
errors, room_id, creator, "Failed to set public visibility: %s", e.what()
errors, room_id, creator, "Failed to set public visibility :%s",
e.what()
};
}

View file

@ -353,7 +353,7 @@ catch(const std::exception &e)
{
log::critical
{
"is_password__user(): %s %s",
"is_password__user() :%s %s",
string_view{user_id},
e.what()
};

View file

@ -76,7 +76,8 @@ ircd::m::vm::conform_check_origin
if(unlikely(eval.copts && !my_host(at<"origin"_>(event))))
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())
throw error
{
fault::INVALID, "Non-conforming event: %s",
fault::INVALID, "Non-conforming event :%s",
string(report)
};
}

View file

@ -430,7 +430,7 @@ ircd::m::vm::inject1(eval &eval,
if(opts.debuglog_precommit)
log::debug
{
log, "Issuing: %s", pretty_oneline(event_tuple)
log, "Issuing :%s", pretty_oneline(event_tuple)
};
const vector_view events
@ -525,7 +525,7 @@ ircd::m::vm::inject3(eval &eval,
if(opts.debuglog_precommit)
log::debug
{
log, "Issuing: %s", pretty_oneline(event_tuple)
log, "Issuing :%s", pretty_oneline(event_tuple)
};
const vector_view events

View file

@ -234,7 +234,7 @@ check_event(const m::resource::request &request,
throw m::error
{
http::NOT_MODIFIED, "M_INVALID_EVENT",
"Proffered event has the following problems: %s",
"Proffered event has the following problems :%s",
string(report)
};
@ -363,7 +363,7 @@ put__invite2(client &client,
throw m::error
{
http::NOT_MODIFIED, "M_INVALID_EVENT",
"Proffered event has the following problems: %s",
"Proffered event has the following problems :%s",
string(report)
};

View file

@ -207,7 +207,8 @@ send_worker()
{
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
{
"flush error to %s :%s", remote, e.what()
"flush error to %s :%s",
remote,
e.what()
};
return false;

View file

@ -86,7 +86,7 @@ post__upload(client &client,
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.head.content_length,
content_uri,