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 HRESULT WINAPI SMTPTransport_DropConnection(ISMTPTransport2 *iface) { SMTPTransport *This = (SMTPTransport *)iface; TRACE("()\n"); return InternetTransport_DropConnection(&This->InetTransport); }
static ULONG WINAPI IMAPTransport_Release(IIMAPTransport *iface) { IMAPTransport *This = (IMAPTransport *)iface; ULONG refs = InterlockedDecrement((LONG *)&This->refs); if (!refs) { TRACE("destroying %p\n", This); if (This->InetTransport.Status != IXP_DISCONNECTED) InternetTransport_DropConnection(&This->InetTransport); if (This->InetTransport.pCallback) ITransportCallback_Release(This->InetTransport.pCallback); HeapFree(GetProcessHeap(), 0, This); } return refs; }