Repository navigation
Conversation
All vendor generators wrote the config to one path per MAC, while each request streams the file and deletes it afterwards (need_delete). With parallel requests for one MAC, one request deleted or truncated the file another one was about to stream: 404, 200 with Content-Length 0, or 422. Add Autoprovision::makeConfigFilename(), which returns a per-request path with the autoprov-cfg- prefix and prunes such files older than an hour (requests whose client went away never stream, and the files hold SIP passwords). The five generators use it.
… hex in the path (#23) The files hold SIP passwords and only need to live until the request streams them, so five minutes is ample. Stripping non-hex characters from the MAC keeps a malformed device record from shaping the path.
fix(provisioning): give every generated config its own temp file (#23)
) The sip-t28p lcd_logo.url had two faults: - path: /pbxcore/api/modules/ModuleAutoprovision/getimg goes through the core's generic module route to moduleRestAPICallback(), which has no getimg action ("Unknown action"); the module's image route is /pbxcore/api/autoprovision/getimg. - port: WEBPort is the admin web listener; like the firmware and PnP config URLs, the logo URL now uses the provisioning port AutoprovisionConf::getHttpPort(), whose nginx block serves getimg.
Since #22, getcfg/getimg go through GetController::streamModuleAction(), which relies on core APIs: BaseController streaming of data.fpassthru (handleFileStreaming(), Core 97719d3cc), Request::getData() (Core 1530e5095) and Request::getRequestTimeout() (Core d30961185). Stable 2024.1.114 has none of them; 2026.1.223 is the first stable core with 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.
No description provided.