mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2010-05-13 Ramon Novoa <rnovoa@artica.es>
* pandora_windows_service.cc: Check the return codee of the tentacle client. Fixes bug #2972399. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2722 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d66340b9df
commit
d4611dc1cd
@ -1,3 +1,8 @@
|
|||||||
|
2010-05-13 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* pandora_windows_service.cc: Check the return codee of the tentacle
|
||||||
|
client. Fixes bug #2972399.
|
||||||
|
|
||||||
2010-05-12 Ramon Novoa <rnovoa@artica.es>
|
2010-05-12 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* build.sh: Added to repository. Pandora Agent installer build script.
|
* build.sh: Added to repository. Pandora Agent installer build script.
|
||||||
|
@ -232,7 +232,7 @@ Pandora_Windows_Service::copyTentacleDataFile (string host,
|
|||||||
string pass,
|
string pass,
|
||||||
string opts)
|
string opts)
|
||||||
{
|
{
|
||||||
bool rc = false;
|
DWORD rc;
|
||||||
string var, filepath;
|
string var, filepath;
|
||||||
string tentacle_cmd, working_dir;
|
string tentacle_cmd, working_dir;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
@ -273,18 +273,21 @@ Pandora_Windows_Service::copyTentacleDataFile (string host,
|
|||||||
|
|
||||||
ZeroMemory (&si, sizeof (si));
|
ZeroMemory (&si, sizeof (si));
|
||||||
ZeroMemory (&pi, sizeof (pi));
|
ZeroMemory (&pi, sizeof (pi));
|
||||||
rc = CreateProcess (NULL , (CHAR *)tentacle_cmd.c_str (), NULL, NULL, FALSE, CREATE_NO_WINDOW,
|
if (CreateProcess (NULL , (CHAR *)tentacle_cmd.c_str (), NULL, NULL, FALSE,
|
||||||
NULL, NULL, &si, &pi);
|
CREATE_NO_WINDOW, NULL, NULL, &si, &pi) == 0) {
|
||||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
return -1;
|
||||||
if (rc == true) {
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pandoraDebug ("Tentacle client was unable to copy %s",
|
/* Get the return code of the tentacle client*/
|
||||||
filename.c_str ());
|
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||||
|
GetExitCodeProcess (pi.hProcess, &rc);
|
||||||
|
if (rc != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Pandora_Windows_Service::copyScpDataFile (string host,
|
Pandora_Windows_Service::copyScpDataFile (string host,
|
||||||
string remote_path,
|
string remote_path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user