Jacek Caban : mshtml: Use GetWineURL in before_async_open.
Alexandre Julliard
julliard at winehq.org
Mon Oct 1 07:54:59 CDT 2007
Module: wine
Branch: master
Commit: 47c91d4d18614abda813cb09219722eb2e24fc56
URL: http://source.winehq.org/git/wine.git/?a=commit;h=47c91d4d18614abda813cb09219722eb2e24fc56
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sat Sep 29 03:41:10 2007 +0200
mshtml: Use GetWineURL in before_async_open.
---
dlls/mshtml/nsio.c | 32 ++++++++------------------------
1 files changed, 8 insertions(+), 24 deletions(-)
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index 61a6386..7bccce1 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -93,13 +93,20 @@ static BOOL exec_shldocvw_67(HTMLDocument *doc, LPCWSTR url)
return TRUE;
}
-static BOOL handle_uri(NSContainer *container, nsChannel *channel, LPCWSTR uri)
+static BOOL before_async_open(nsChannel *channel, NSContainer *container)
{
IServiceProvider *service_provider;
HTMLDocument *doc = container->doc;
DWORD hlnf = 0;
+ LPCWSTR uri;
HRESULT hres;
+ nsIWineURI_GetWineURL(channel->uri, &uri);
+ if(!uri) {
+ ERR("GetWineURL returned NULL\n");
+ return TRUE;
+ }
+
if(!doc) {
NSContainer *container_iter = container;
@@ -131,29 +138,6 @@ static BOOL handle_uri(NSContainer *container, nsChannel *channel, LPCWSTR uri)
return TRUE;
}
-static BOOL before_async_open(nsChannel *channel, NSContainer *container)
-{
- nsACString uri_str;
- const char *uria;
- LPWSTR uri;
- DWORD len;
- BOOL ret;
-
- nsACString_Init(&uri_str, NULL);
- nsIWineURI_GetSpec(channel->uri, &uri_str);
- nsACString_GetData(&uri_str, &uria, NULL);
- len = MultiByteToWideChar(CP_ACP, 0, uria, -1, NULL, 0);
- uri = mshtml_alloc(len*sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, uria, -1, uri, len);
- nsACString_Finish(&uri_str);
-
- ret = handle_uri(container, channel, uri);
-
- mshtml_free(uri);
-
- return ret;
-}
-
#define NSCHANNEL_THIS(iface) DEFINE_THIS(nsChannel, HttpChannel, iface)
static nsresult NSAPI nsChannel_QueryInterface(nsIHttpChannel *iface, nsIIDRef riid, nsQIResult result)
More information about the wine-cvs
mailing list