Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento :implementato lo stopper di authoriz git-svn-id: svn://10.65.10.50/trunk@16123 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b54d366af7
commit
f22bfba23f
@ -296,7 +296,27 @@ bool CampoSetup::CreateIcon(unsigned int csidl, const wxFileName& strExeFile, co
|
|||||||
//-------------------------------------------
|
//-------------------------------------------
|
||||||
bool CampoSetup::StopLurch() const
|
bool CampoSetup::StopLurch() const
|
||||||
{
|
{
|
||||||
bool ok = true;
|
bool ok = false;
|
||||||
|
|
||||||
|
//cerca e ferma authoriz e lurch come processi
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
wxHTTP scServer;
|
||||||
|
if (scServer.Connect("127.0.0.1", i == 0 ? 10000 : 1883))
|
||||||
|
{
|
||||||
|
//if (scServer.BuildRequest("/stop.cgi", 0))
|
||||||
|
wxInputStream* isIs = scServer.GetInputStream("/stop.cgi");
|
||||||
|
if (isIs)
|
||||||
|
{
|
||||||
|
delete isIs;
|
||||||
|
wxSleep(3);
|
||||||
|
ok = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//se lurch e' un servizio lo stoppa
|
||||||
const wxString strValue = ReadLocalMachineRegistryKey("SYSTEM\\CurrentControlSet\\Services\\Lurch\\Parameters\\Application");
|
const wxString strValue = ReadLocalMachineRegistryKey("SYSTEM\\CurrentControlSet\\Services\\Lurch\\Parameters\\Application");
|
||||||
if (!strValue.IsEmpty())
|
if (!strValue.IsEmpty())
|
||||||
{
|
{
|
||||||
@ -304,22 +324,7 @@ bool CampoSetup::StopLurch() const
|
|||||||
strExecService += "\\NET STOP Lurch";
|
strExecService += "\\NET STOP Lurch";
|
||||||
wxExecute(strExecService, wxEXEC_SYNC);
|
wxExecute(strExecService, wxEXEC_SYNC);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 2; i++)
|
|
||||||
{
|
|
||||||
wxHTTP scServer;
|
|
||||||
if (scServer.Connect("127.0.0.1", i == 0 ? 10000 : 1883))
|
|
||||||
{
|
|
||||||
wxString strResponse = scServer.GetHeader("/stop.cgi");
|
|
||||||
if (strResponse.Find("200") > 0)
|
|
||||||
{
|
|
||||||
wxSleep(3);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user