sipcapture: fix modparam typo (promiscious_on) - #4248
Open
denys-i-didww wants to merge 1 commit into
Open
Conversation
The module registers "promiscious_on" while its README documents "promiscuous_on". Both spellings arrived in the same commit in 2011, so the documented name has never worked. Following 36a09ee (dispatcher: Fix modparam typo), the correct name is registered against the same variable and the old one is kept, so existing configurations keep working. The variable itself is already spelled correctly, promisc_on, and is untouched. No documentation change is needed - the README already documents the correct name, and after this it is true. The module's own example config, which used the misspelling, now uses the documented name.
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
sipcaptureregisterspromiscious_on; its README documentspromiscuous_on. Unlike#4243, where the two sides had agreed for seventeen years and diverged last month, both
spellings arrived here in the same commit —
c259878f1e, 18 November 2011 — so thedocumented name has never worked. A configuration written from the page does not start.
This is the last member of the class announced in #4241's Scope section: a parameter
where the code carries the misspelling and the page is the one spelled correctly. A fresh
sweep of all 193 modules against
08e7f1c37afinds no others.Why the code and not the documentation
spelled correctly —
promisc_on,sipcapture.c:443— and is used under that name at:1019and:2365;sipcapturecame to both projects from the Homer Project,and Kamailio carried the same typo through its 3.2, 3.3, 4.0, 4.4, 5.0 and 5.1 branches.
From 5.2 onwards it registers
promiscuous_on, with the old spelling dropped rather thankept. Two forks of one file, arriving independently at the same conclusion about which
name was intended;
doc/sipcapture_admin.xmlfromthe 2011 commit already reads
promiscuous_on, in the heading, the example title andthe example line — all three survive into today's
README.md:272,:282and:284.What this changes
params[]registers both names against the same variable:The old name is kept, unlike Kamailio: it is the only name that has ever worked in
OpenSIPS, so every configuration setting it in the field is setting the misspelling.
The module's own sample,
modules/sipcapture/examples/opensips.cfg:49, is switched to thedocumented name — it was the one file in the tree teaching the misspelling. The comment
directly above it, in the same hunk, said Promiscious mode; that word is corrected too.
No documentation change is needed: the README already documents the correct name, and
after this it is true.
Reproduced
Debian 12,
opensips 4.1.0-devbuilt from source,sipcaptureloaded withdb_textandthe UDP transport. A temporary probe at the top of
mod_init()printed the variable, andwas thrown away afterwards:
promisc_onmodparampromiscious_on= 42promiscuous_on= 7The last row is the point: the two names write to one variable, so the later assignment
wins. On stock
masterthe third row does not get that far:Two controls after the change:
promiscuos_onandpromiscuous_offare still refusedwith that same message, so the module gained exactly the one name and not a loose match.
The module compiles with no new warning.
Compatibility
None broken. A configuration setting
promiscious_onkeeps working and keeps writing thesame variable. The parameter is not set anywhere else in the repository, and the one
sample that did set it is updated in this commit — it works either way now.
This is a functional change, so CI runs on it — no
[skip ci].AI assistance disclosure. This change and its wording were produced with AI assistance.
Every item was checked against the source before submission:
sipcapture.c:600and:443, the variable usedat
:1019and:2365;git log -Sover the full history returns onlyc259878f1efor either, and that commit'sdoc/sipcapture_admin.xmlis quoted above;README.md:272,:282,:284;sipcapture.cserved for each of 3.2, 3.3, 4.0,4.4, 5.0, 5.1 and 5.2. I could not pin the commit that changed it: blame stops at a 2024
reformat and the change is not in the file's history between the 5.1 and 5.2 branch
points, so this says "from 5.2 onwards" and no more;
08e7f1c37aover everymodule's Exported Parameters section, each candidate confirmed by a repository-wide grep
for the literal;
36a09ee7ab, and our own db_virtual: fix modparam typo (db_max_consec_retrys) #4243;and the failing case against a build of
master— the output is quoted above.