Merge pull request #686 from grandpaul/refine-ext

Refine the extension loading code.
This commit is contained in:
Marc-André Moreau 2012-08-03 08:56:29 -07:00
commit 211a95602b
4 changed files with 10 additions and 5 deletions

View File

@ -194,6 +194,12 @@ int extension_post_connect(rdpExtension* ext)
return 0;
}
void extension_load_and_init_plugins(rdpExtension* extension)
{
extension_load_plugins(extension);
extension_init_plugins(extension);
}
rdpExtension* extension_new(freerdp* instance)
{
rdpExtension* extension = NULL;
@ -203,9 +209,6 @@ rdpExtension* extension_new(freerdp* instance)
extension = xnew(rdpExtension);
extension->instance = instance;
extension_load_plugins(extension);
extension_init_plugins(extension);
}
return extension;

View File

@ -48,6 +48,7 @@ FREERDP_API int extension_post_connect(rdpExtension* extension);
FREERDP_API rdpExtension* extension_new(freerdp* instance);
FREERDP_API void extension_free(rdpExtension* extension);
FREERDP_API void extension_load_and_init_plugins(rdpExtension* extension);
#endif /* __EXTENSION_H */

View File

@ -54,7 +54,7 @@ boolean freerdp_connect(freerdp* instance)
IFCALLRET(instance->PreConnect, status, instance);
rdp->extension = extension_new(instance);
extension_load_and_init_plugins(rdp->extension);
extension_pre_connect(rdp->extension);
if (status != true)

View File

@ -915,7 +915,8 @@ rdpRdp* rdp_new(freerdp* instance)
if (instance != NULL)
instance->settings = rdp->settings;
rdp->extension = extension_new(instance);
rdp->transport = transport_new(rdp->settings);
rdp->license = license_new(rdp);
rdp->input = input_new(rdp);