mirror of https://github.com/FreeRDP/FreeRDP
Merge pull request #686 from grandpaul/refine-ext
Refine the extension loading code.
This commit is contained in:
commit
211a95602b
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue