예제 #1
0
파일: camera.cpp 프로젝트: AndresPozo/phd2
void GuideCamera::DisconnectWithAlert(const wxString& msg, ReconnectType reconnect)
{
    Disconnect();

    pFrame->UpdateStateLabels();

    if (reconnect == RECONNECT)
    {
        pFrame->Alert(msg + "\n" + _("PHD will make several attempts to re-connect the camera."));
        InitiateReconnect();
    }
    else
    {
        pFrame->Alert(msg + "\n" + _("The camera has been disconnected. Please resolve the problem and re-connect the camera."));
    }
}
예제 #2
0
void CWaveSession::ProcessChannelResponse()
{
	ASSERT(m_lpChannelRequest != NULL);

	CWaveReader * lpReader = (CWaveReader *)m_lpChannelRequest->GetReader();

	ASSERT(lpReader != NULL);
	
	BOOL fSuccess = FALSE;

	fSuccess =
		m_nState == WSS_ONLINE &&
		(
			m_lpChannelRequest->GetResult() == CURLE_OK ||
			m_lpChannelRequest->GetResult() == CURLE_OPERATION_TIMEOUTED
		);

	if (fSuccess)
	{
		SetCookies(m_lpChannelRequest->GetCookies());
	}
	
	delete lpReader;
	delete m_lpChannelRequest;

	m_lpChannelRequest = NULL;
	m_nRequesting = WSR_NONE;

	if (fSuccess)
	{
		// Continue the channel by posting the next request.

		PostChannelRequest();
	}
	else if (m_nState == WSS_ONLINE)
	{
		// Only automatically reconnect when we're online.

		InitiateReconnect();
	}
}