From fad89150ee8420e83f1ca7450f146c55d257c3a0 Mon Sep 17 00:00:00 2001 From: Akihiro Uchida Date: Thu, 5 Mar 2015 01:44:59 +0900 Subject: [PATCH] Change function name in pandoralog --- pandora_agents/win32/pandora_windows_service.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index d27fc357da..2c5ec01bf6 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -561,7 +561,7 @@ Pandora_Windows_Service::getValueFromCmdExec (string cmd_exec, int timeout) job = CreateJobObject (&attributes, NULL); if (job == NULL) { - pandoraLog ("getCoordinatesFromCmdExec: CreateJobObject failed. Err: %d", GetLastError ()); + pandoraLog ("getValueFromCmdExec: CreateJobObject failed. Err: %d", GetLastError ()); return ""; } @@ -569,7 +569,7 @@ Pandora_Windows_Service::getValueFromCmdExec (string cmd_exec, int timeout) out = GetStdHandle (STD_OUTPUT_HANDLE); if (! CreatePipe (&out_read, &new_stdout, &attributes, 0)) { - pandoraLog ("getCoordinatesFromCmdExec: CreatePipe failed. Err: %d", GetLastError ()); + pandoraLog ("getValueFromCmdExec: CreatePipe failed. Err: %d", GetLastError ()); return ""; } @@ -594,7 +594,7 @@ Pandora_Windows_Service::getValueFromCmdExec (string cmd_exec, int timeout) /* Create the child process. */ if (CreateProcess (NULL , (CHAR *)cmd_exec.c_str (), NULL, NULL, TRUE, CREATE_SUSPENDED | CREATE_NO_WINDOW, NULL, NULL, &si, &pi) == 0) { - pandoraLog ("getCoordinatesFromCmdExec: %s CreateProcess failed. Err: %d", + pandoraLog ("getValueFromCmdExec: %s CreateProcess failed. Err: %d", cmd_exec.c_str (), GetLastError ()); return ""; } else { @@ -602,7 +602,7 @@ Pandora_Windows_Service::getValueFromCmdExec (string cmd_exec, int timeout) unsigned long read, avail; if (! AssignProcessToJobObject (job, pi.hProcess)) { - pandoraLog ("getCoordinatesFromCmdExec: could not assign proccess to job (error %d)", + pandoraLog ("getValueFromCmdExec: could not assign proccess to job (error %d)", GetLastError ()); } ResumeThread (pi.hThread); @@ -622,7 +622,7 @@ Pandora_Windows_Service::getValueFromCmdExec (string cmd_exec, int timeout) } else if(timeout < GetTickCount() - tickbase) { /* STILL_ACTIVE */ TerminateProcess(pi.hThread, STILL_ACTIVE); - pandoraLog ("getCoordinatesFromCmdExec: %s timed out (retcode: %d)", cmd_exec.c_str (), STILL_ACTIVE); + pandoraLog ("getValueFromCmdExec: %s timed out (retcode: %d)", cmd_exec.c_str (), STILL_ACTIVE); break; } } @@ -631,11 +631,11 @@ Pandora_Windows_Service::getValueFromCmdExec (string cmd_exec, int timeout) if (retval != 0) { if (! TerminateJobObject (job, 0)) { - pandoraLog ("getCoordinatesFromCmdExec: TerminateJobObject failed. (error %d)", + pandoraLog ("getValueFromCmdExec: TerminateJobObject failed. (error %d)", GetLastError ()); } if (retval != STILL_ACTIVE) { - pandoraLog ("getCoordinatesFromCmdExec: %s did not executed well (retcode: %d)", + pandoraLog ("getValueFromCmdExec: %s did not executed well (retcode: %d)", cmd_exec.c_str (), retval); } /* Close job, process and thread handles. */