Пример #1
0
int16_t parse_cmd_ht (char *cmd, char *output, uint16_t len) 
{
  if (httplog(cmd)) 
    return ECMD_FINAL_OK;
  return ECMD_FINAL(snprintf_P(cmd, len, PSTR("sending failed")));
}
Пример #2
0
CHttp::~CHttp ()
{
	/* clean up resources */

#ifdef _DEBUG2
    wyString w;

    if(m_url)
    {
        w.SetAs(m_url);
        httplog(w.GetLength());
    }

    if(m_Protocol)
    {
        w.SetAs(m_Protocol);
        httplog(w.GetLength());
    }

    if(m_HostName)
    {
        w.SetAs(m_HostName);
        httplog(w.GetLength());
    }

    if(m_UserName)
    {
        w.SetAs(m_UserName);
        httplog(w.GetLength());
    }

    if(m_Password)
    {
        w.SetAs(m_Password);
        httplog(w.GetLength());
    }

    if(m_FileName)
    {
        w.SetAs(m_FileName);
        httplog(w.GetLength());
    }

    if(m_proxy)
    {
        w.SetAs(m_proxy);
        httplog(w.GetLength());
    }

    if(m_proxyuser)
    {
        w.SetAs(m_proxyuser);
        httplog(w.GetLength());
    }

    if(m_proxypwd)
    {
        w.SetAs(m_proxypwd);
        httplog(w.GetLength());
    }

    if(m_challengename)
    {
        w.SetAs(m_challengename);
        httplog(w.GetLength());
    }

    if(m_challengepwd)
    {
        w.SetAs(m_proxypwd);
        httplog(w.GetLength());
    }


#endif
	if (m_url ) delete[] m_url;
	if (m_Protocol ) delete[] m_Protocol;
	if (m_HostName ) delete[] m_HostName;
	if (m_UserName ) delete[] m_UserName;
	if (m_Password ) delete[] m_Password;
	if (m_FileName ) delete[] m_FileName;

	if(m_contenttype) delete[] m_contenttype;

	if (m_proxy ) delete[] m_proxy;
	if (m_proxyuser ) delete[] m_proxyuser;
	if (m_proxypwd ) delete[] m_proxypwd;

	if (m_challengename ) delete[] m_challengename;
	if (m_challengepwd ) delete[] m_challengepwd;

	
	if (m_HttpOpenRequest ) InternetCloseHandle(m_HttpOpenRequest );
	if (m_InternetConnect ) InternetCloseHandle(m_InternetConnect );
	if (m_InternetSession ) InternetCloseHandle(m_InternetSession );
}