Jacek Caban : mshtml: Added nsIURI::GetPort implementation.
Alexandre Julliard
julliard at winehq.org
Tue Sep 28 11:13:40 CDT 2010
Module: wine
Branch: master
Commit: cb85bad7a931e10e035653df57234e99b2cd27b3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cb85bad7a931e10e035653df57234e99b2cd27b3
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Sep 28 13:25:40 2010 +0200
mshtml: Added nsIURI::GetPort implementation.
---
dlls/mshtml/nsio.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index 019c612..bc377cf 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -1892,14 +1892,25 @@ static nsresult NSAPI nsURI_SetHost(nsIURL *iface, const nsACString *aHost)
static nsresult NSAPI nsURI_GetPort(nsIURL *iface, PRInt32 *aPort)
{
nsWineURI *This = NSURI_THIS(iface);
+ DWORD port;
+ HRESULT hres;
TRACE("(%p)->(%p)\n", This, aPort);
if(This->nsuri)
return nsIURI_GetPort(This->nsuri, aPort);
- FIXME("default action not implemented\n");
- return NS_ERROR_NOT_IMPLEMENTED;
+ if(!ensure_uri(This))
+ return NS_ERROR_UNEXPECTED;
+
+ hres = IUri_GetPort(This->uri, &port);
+ if(FAILED(hres)) {
+ WARN("GetPort failed: %08x\n", hres);
+ return NS_ERROR_UNEXPECTED;
+ }
+
+ *aPort = port ? port : -1;
+ return NS_OK;
}
static nsresult NSAPI nsURI_SetPort(nsIURL *iface, PRInt32 aPort)
More information about the wine-cvs
mailing list