mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 01:30:16 +01:00
libnm/vpn-editor-plugin: add a comment on a design blunder
VPN plugin factory can never fail, it always returns an object, much like g_object_new(). If the (GUI) editor is unavailable, it might be okay for some use cases, notably import()/export(). In such case, the absence of GUI editor is indicated via capability flags.
This commit is contained in:
parent
a1a9a6509e
commit
ecf1e8716c
1 changed files with 3 additions and 0 deletions
|
|
@ -299,6 +299,9 @@ _nm_vpn_editor_plugin_load(const char *plugin_name,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Note that factory() shouldn't be returning errors or failing.
|
||||
* We can't change its prototype as it would consistute an ABI break,
|
||||
* however it returning a failure would indicate a bug in the plugin. */
|
||||
editor_plugin = factory(&factory_error);
|
||||
|
||||
if (loaded_before) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue