Ticket #77 (closed defect: fixed)

Opened 3 years ago

Last modified 1 year ago

osync_member_call_plugin() doesn't work anymore

Reported by: ehabkost Assigned to: abauer
Priority: high Component: OpenSync
Version: Severity: major
Keywords: Cc:

Description

real_plugin is not set anymore, then we can't call a custom function for a plugin.

    if (!plugin->real_plugin) {
        osync_debug("OSPLG", 1, "You need to load a plugin before getting a function");
        osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, "You need to load a plugin before getting a function");
        return NULL;
    }

Possible approaches:

  • Associate the functions with modules, not plugins (we would need a different interface)
  • Make osync_plugin_new_info() set real_plugin, but on this case we would need to set some data on OSyncEnv so we can get the real_plugin. This doesn't sounds good
  • Change the interface again so we can get something like OSyncModule as parameter, so we can easily track which loadable modules registered which plugins
  • Let the plugins register its own functions. I like this approach, so the plugin would tell which custom functions will be available. It would be nice if we can set a fallback "call_custom_function" function for the plugin, too. So we can call custom functions on plugins on other languages

Change History

04/18/05 16:28:35 changed by anonymous

  • status changed from new to closed.
  • resolution set to fixed.