inetcomm: Add an implementation of ISMTPTransport2::CommandQUIT.
This commit is contained in:
parent
01fcce49e1
commit
fe56d3195f
|
@ -212,6 +212,33 @@ static void SMTPTransport_CallbackSendHello(IInternetTransport *iface, char *pBu
|
||||||
HeapFree(GetProcessHeap(), 0, pszCommand);
|
HeapFree(GetProcessHeap(), 0, pszCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SMTPTransport_CallbackDisconnect(IInternetTransport *iface, char *pBuffer, int cbBuffer)
|
||||||
|
{
|
||||||
|
SMTPTransport *This = (SMTPTransport *)iface;
|
||||||
|
SMTPRESPONSE response;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
|
if (pBuffer)
|
||||||
|
{
|
||||||
|
hr = SMTPTransport_ParseResponse(This, pBuffer, &response);
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
/* FIXME: handle error */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(response.rIxpResult.hrServerError))
|
||||||
|
{
|
||||||
|
ERR("server error: %s\n", debugstr_a(pBuffer));
|
||||||
|
/* FIXME: handle error */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
InternetTransport_DropConnection(&This->InetTransport);
|
||||||
|
}
|
||||||
|
|
||||||
static void SMTPTransport_CallbackMessageProcessResponse(IInternetTransport *iface, char *pBuffer, int cbBuffer)
|
static void SMTPTransport_CallbackMessageProcessResponse(IInternetTransport *iface, char *pBuffer, int cbBuffer)
|
||||||
{
|
{
|
||||||
SMTPTransport *This = (SMTPTransport *)iface;
|
SMTPTransport *This = (SMTPTransport *)iface;
|
||||||
|
@ -473,8 +500,8 @@ static HRESULT WINAPI SMTPTransport_HandsOffCallback(ISMTPTransport2 *iface)
|
||||||
|
|
||||||
static HRESULT WINAPI SMTPTransport_Disconnect(ISMTPTransport2 *iface)
|
static HRESULT WINAPI SMTPTransport_Disconnect(ISMTPTransport2 *iface)
|
||||||
{
|
{
|
||||||
FIXME("()\n");
|
TRACE("()\n");
|
||||||
return E_NOTIMPL;
|
return ISMTPTransport2_CommandQUIT(iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI SMTPTransport_DropConnection(ISMTPTransport2 *iface)
|
static HRESULT WINAPI SMTPTransport_DropConnection(ISMTPTransport2 *iface)
|
||||||
|
@ -613,8 +640,13 @@ static HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface,
|
||||||
|
|
||||||
static HRESULT WINAPI SMTPTransport_CommandQUIT(ISMTPTransport2 *iface)
|
static HRESULT WINAPI SMTPTransport_CommandQUIT(ISMTPTransport2 *iface)
|
||||||
{
|
{
|
||||||
FIXME("()\n");
|
SMTPTransport *This = (SMTPTransport *)iface;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("()\n");
|
||||||
|
|
||||||
|
InternetTransport_ChangeStatus(&This->InetTransport, IXP_DISCONNECTING);
|
||||||
|
return InternetTransport_DoCommand(&This->InetTransport, "QUIT\n",
|
||||||
|
SMTPTransport_CallbackDisconnect);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI SMTPTransport_CommandRSET(ISMTPTransport2 *iface)
|
static HRESULT WINAPI SMTPTransport_CommandRSET(ISMTPTransport2 *iface)
|
||||||
|
|
Loading…
Reference in New Issue