|
From: Daniel G. <go...@b1...> - 2009-11-01 14:07:46
|
On Sunday 01 November 2009 01:39:24 am Graham Cobb wrote: > I have a first cut of the external plugin config file ready to check in > (http://opensync.pastebin.com/m38d98a95). But I have a couple of > questions: > ------8<----- @@ -69,9 +71,8 @@ env->plugins = osync_list_remove(env->plugins, env- >plugins->data); } - /* Unload all modules */ + /* Unref (and so unload) all modules */ while (env->modules) { - osync_module_unload(env->modules->data); osync_module_unref(env->modules->data); env->modules = osync_list_remove(env->modules, env- >modules->data); } ----->8---- Is the drop of osync_module_unload() intended? ---------8<---------- @@ -117,6 +119,31 @@ [...] + if (!osync_plugin_env_load_module_xml(env, filename, error)) { + osync_trace(TRACE_ERROR, "Unable to load module: %s", osync_error_print(error)); + } + + osync_free(filename); [...] ---------->8-------------- You ignore the error, like it was done for the loading the shared-module plugins - right? Or is there any specific reason for that? We should place here (and for the same place for shared-modules loading) a FIXME .. since we're leaking here a OSyncError-struct if an error get set. And also problems of loading a plugin is not visible as long you don't look into trace-files ... but that shouldn't block to apply your patch. I'll create a ticket for that issue ... Beside that this looks pretty perfect to me. I'll write a XSD (XML-Schema) for your XML file. Best Regards, Daniel -- Daniel Gollub Geschaeftsfuehrer: Ralph Dehner FOSS Developer Unternehmenssitz: Vohburg B1 Systems GmbH Amtsgericht: Ingolstadt Mobil: +49-(0)-160 47 73 970 Handelsregister: HRB 3537 EMail: go...@b1... http://www.b1-systems.de Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D |