Commit 6135b38d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi: Avoid connecting to the RPC server more than once.

This is a no-op as is, but is necessary as of the next patch in the case of nested custom actions. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarHans Leidekker <hans@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7908d6ee
......@@ -522,19 +522,22 @@ UINT CDECL __wine_msi_call_dll_function(const GUID *guid)
TRACE("%s\n", debugstr_guid( guid ));
status = RpcStringBindingComposeW(NULL, ncalrpcW, NULL, endpoint_lrpcW, NULL, &binding_str);
if (status != RPC_S_OK)
if (!rpc_handle)
{
ERR("RpcStringBindingCompose failed: %#x\n", status);
return status;
}
status = RpcBindingFromStringBindingW(binding_str, &rpc_handle);
if (status != RPC_S_OK)
{
ERR("RpcBindingFromStringBinding failed: %#x\n", status);
return status;
status = RpcStringBindingComposeW(NULL, ncalrpcW, NULL, endpoint_lrpcW, NULL, &binding_str);
if (status != RPC_S_OK)
{
ERR("RpcStringBindingCompose failed: %#x\n", status);
return status;
}
status = RpcBindingFromStringBindingW(binding_str, &rpc_handle);
if (status != RPC_S_OK)
{
ERR("RpcBindingFromStringBinding failed: %#x\n", status);
return status;
}
RpcStringFreeW(&binding_str);
}
RpcStringFreeW(&binding_str);
r = remote_GetActionInfo(guid, &type, &dll, &proc, &remote_package);
if (r != ERROR_SUCCESS)
......@@ -582,8 +585,6 @@ UINT CDECL __wine_msi_call_dll_function(const GUID *guid)
midl_user_free(dll);
midl_user_free(proc);
RpcBindingFree(&rpc_handle);
return r;
}
......
......@@ -344,6 +344,8 @@ static void MSI_FreePackage( MSIOBJECTHDR *arg)
CloseHandle( package->log_file );
if (package->rpc_server_started)
RpcServerUnregisterIf(s_IWineMsiRemote_v0_0_s_ifspec, NULL, FALSE);
if (rpc_handle)
RpcBindingFree(&rpc_handle);
if (package->delete_on_close) DeleteFileW( package->localfile );
msi_free( package->localfile );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment