MyQttdModule* myqttd_module_open_and_register ( MyQttdCtx ctx,
const char *  location 
)

High level function that opens the module located at the provided location, checking if the module was registered, calling to init it, and then registering it if the init did not fail.

Parameters
ctxThe context where the load operation will take place.
locationThe location where the module is found.
Returns
A reference to the module loaded (MyQttdModule) or NULL if it fails.

References msg, myqttd_module_exists(), myqttd_module_free(), myqttd_module_get_init(), myqttd_module_name(), myqttd_module_open(), myqttd_module_register(), and wrn.

Referenced by myqttd_run_load_modules_from_path().