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>
|
||||
|
||||
* build.sh: Added to repository. Pandora Agent installer build script.
|
||||
|
|
|
@ -232,7 +232,7 @@ Pandora_Windows_Service::copyTentacleDataFile (string host,
|
|||
string pass,
|
||||
string opts)
|
||||
{
|
||||
bool rc = false;
|
||||
DWORD rc;
|
||||
string var, filepath;
|
||||
string tentacle_cmd, working_dir;
|
||||
PROCESS_INFORMATION pi;
|
||||
|
@ -273,16 +273,19 @@ Pandora_Windows_Service::copyTentacleDataFile (string host,
|
|||
|
||||
ZeroMemory (&si, sizeof (si));
|
||||
ZeroMemory (&pi, sizeof (pi));
|
||||
rc = CreateProcess (NULL , (CHAR *)tentacle_cmd.c_str (), NULL, NULL, FALSE, CREATE_NO_WINDOW,
|
||||
NULL, NULL, &si, &pi);
|
||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
if (rc == true) {
|
||||
return 0;
|
||||
if (CreateProcess (NULL , (CHAR *)tentacle_cmd.c_str (), NULL, NULL, FALSE,
|
||||
CREATE_NO_WINDOW, NULL, NULL, &si, &pi) == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
pandoraDebug ("Tentacle client was unable to copy %s",
|
||||
filename.c_str ());
|
||||
return -1;
|
||||
/* Get the return code of the tentacle client*/
|
||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
GetExitCodeProcess (pi.hProcess, &rc);
|
||||
if (rc != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue