docs: correct function and statistic names the modules do not export - #4250
Open
denys-i-didww wants to merge 1 commit into
Open
docs: correct function and statistic names the modules do not export#4250denys-i-didww wants to merge 1 commit into
denys-i-didww wants to merge 1 commit into
Conversation
…[skip ci] The same defect as OpenSIPS#4241 in the sections it did not cover. Three names, three modules: janus documents janus_send_requeest() while the module exports janus_send_request(); event_sqs documents sqs_publish_message(), which is the static C function behind the script command, exported as sqs_send_message(); registrar documents the statistic defaults_expires while stat_export_t declares default_expire. Documentation only, no behaviour change. The code is right in all three.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#4241 corrected five parameter names the modules do not export, and its Scope section
said the same class in the Exported Functions, MI Commands and Statistics sections was
left for a separate change. This is that change. Three names in three modules; the code is
right in each and the page is wrong.
janusjanus_send_requeest()janus_send_request—janus_mod.c:67event_sqssqs_publish_message()sqs_send_message—event_sqs.c:65registrardefaults_expiresdefault_expire—reg_mod.c:233A script calling a function the module does not export does not load, and an MI query for
a statistic that does not exist returns Statistics Not Found.
Details
janusis a plain misspelling — requeest — and only in the heading,README.md:163.Two lines below, the example's title and the example itself already read
janus_send_request(), so the page contradicts itself and the heading is the odd one out.event_sqsdocuments the name of the C function rather than the name of the scriptcommand.
event_sqs.c:65reads{"sqs_send_message", (cmd_function)sqs_publish_message, {so
sqs_publish_messageis the static implementation (:48,:425) andsqs_send_messageis what a script may call. The README uses the implementation's name inall four places — the prose at
:77, the heading at:112, the example title at:130and the example line at
:134— and nothing on the page corrects the reader.registrardocuments the statistic asdefaults_expires, whilestat_export_tdeclares
default_expire. The documented name is one letter away from the parameterdefault_expires, which does exist (reg_mod.c:203), and the description under theheading — "The value of default_expires parameter" — correctly describes that parameter;
the statistic does mirror it (
reg_mod.c:405). Only the heading changes. The module'sother four documented statistics match
stat_export_texactly and are left alone.Reproduced
opensips 4.1.0-dev, Debian 12, built from source.The function name fails when the script is loaded, not at
modparamparsing — a differentfailure point from #4241, which is part of why this is a separate PR:
The statistic fails at the MI query, a third failure point.
registrarrunning withusrloc,signaling,tmandmi_http:Listing every statistic on that instance returns
registrar:default_expireand nodefaults_expires.event_sqsis the one row not run. It links againstlibaws-cpp-sdk-sqs, which Debiandoes not package, so the module cannot be built without building the AWS SDK first.
Compiling
event_sqs.con its own does work, andnmon the object showssqs_publish_messageas a local text symbol — the static function — whilesqs_send_messageis the name incmds[]. That is source-level evidence, not a run, andI would rather say so than imply otherwise.
Scope
Three renames, nothing else. The same sweep, re-run against 08e7f1c over every
module's Exported Functions, Asynchronous Functions, MI Functions, Statistics and
Pseudo-Variables sections, turns up two more documented names —
presence_callinfo'ssca_set_calling_line()andratelimit'srl_bin_status— that are not renames at all:neither has an implementation anywhere in the tree, so there is nothing to point the
documentation at and the fix is yours to choose. They need an issue, not a patch, and are
not in this PR.
Everything else that looked like a mismatch is not one, and is recorded here so it is not
re-reported: MI command names come from
#defines (usrloc,rtpengine,pikeandothers),
callops'sE_CALL_TRANSFERandE_CALL_HOLDare built by token pasting from"E_CALL_" #_name,registrarandmid_registrar'spn_process_purr()comes from amacro in
lib/reg, andcall_center,janusandrrhave####sub-headings wheretheir siblings use
###, which a heading scan reads as names.Compatibility
Documentation only, no behaviour change. Nothing that works today stops working: none of
the three documented names could ever have been used.
AI assistance disclosure. The defect list and the wording of this change were produced
with AI assistance. Every item was checked against the source before submission:
janus_mod.c:67(
cmd_export_t),event_sqs.c:65(cmd_export_t),reg_mod.c:233(stat_export_t);grep over
*.c,*.hand*.cpp, which is what distinguishes these three from themacro-defined names listed under Scope;
— one in
janus, four inevent_sqs, one inregistrar;registrar's other four statistics were checked againststat_export_tand left alone,and the parameter
default_expiresit is confused with is real —reg_mod.c:203;above, on a build of this branch;
event_sqswas not run, and the reason and the weaker evidence are stated in place;grep before being excluded from this PR.