Removed whitespace after line end, accoring to Google style guidelines "whitespace/end_of_line"
This commit is contained in:
parent
e38eb0f72d
commit
fb79664508
6 changed files with 53 additions and 57 deletions
|
|
@ -59,7 +59,6 @@ void EventHandler::signal(Event *event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EventHandler::waitForAny() {
|
bool EventHandler::waitForAny() {
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
int result = WaitForMultipleObjects(d->eventCount, d->eventArray, FALSE, 1000);
|
int result = WaitForMultipleObjects(d->eventCount, d->eventArray, FALSE, 1000);
|
||||||
if (result == WAIT_TIMEOUT) {
|
if (result == WAIT_TIMEOUT) {
|
||||||
|
|
|
||||||
|
|
@ -53,25 +53,25 @@ void Socket::connect(const std::wstring &server) {
|
||||||
|
|
||||||
std::wstring name(L"\\\\.\\pipe\\" + server);
|
std::wstring name(L"\\\\.\\pipe\\" + server);
|
||||||
d->hPipe = CreateFile(
|
d->hPipe = CreateFile(
|
||||||
(const wchar_t *)name.c_str(), // pipe name
|
(const wchar_t *)name.c_str(), // pipe name
|
||||||
GENERIC_READ | // read and write access
|
GENERIC_READ | // read and write access
|
||||||
GENERIC_WRITE,
|
GENERIC_WRITE,
|
||||||
0, // no sharing
|
0, // no sharing
|
||||||
NULL, // default security attributes
|
NULL, // default security attributes
|
||||||
OPEN_EXISTING, // opens existing pipe
|
OPEN_EXISTING, // opens existing pipe
|
||||||
FILE_FLAG_OVERLAPPED, // default attributes
|
FILE_FLAG_OVERLAPPED, // default attributes
|
||||||
NULL); // no template file
|
NULL); // no template file
|
||||||
|
|
||||||
if (d->hPipe == INVALID_HANDLE_VALUE) {
|
if (d->hPipe == INVALID_HANDLE_VALUE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD dwMode = PIPE_READMODE_MESSAGE;
|
DWORD dwMode = PIPE_READMODE_MESSAGE;
|
||||||
fSuccess = SetNamedPipeHandleState(
|
fSuccess = SetNamedPipeHandleState(
|
||||||
d->hPipe, // pipe handle
|
d->hPipe, // pipe handle
|
||||||
&dwMode, // new pipe mode
|
&dwMode, // new pipe mode
|
||||||
NULL, // don't set maximum bytes
|
NULL, // don't set maximum bytes
|
||||||
NULL); // don't set maximum time
|
NULL); // don't set maximum time
|
||||||
|
|
||||||
if (!fSuccess) {
|
if (!fSuccess) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -92,8 +92,8 @@ std::wstring Socket::read(int timeout) {
|
||||||
wchar_t buf[BUFSIZE];
|
wchar_t buf[BUFSIZE];
|
||||||
int result;
|
int result;
|
||||||
DWORD cbBytesRead = 0;
|
DWORD cbBytesRead = 0;
|
||||||
OVERLAPPED oOverlap;
|
OVERLAPPED oOverlap;
|
||||||
|
|
||||||
memset(&oOverlap, 0, sizeof(OVERLAPPED));
|
memset(&oOverlap, 0, sizeof(OVERLAPPED));
|
||||||
|
|
||||||
d->readEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
d->readEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||||
|
|
@ -101,15 +101,15 @@ std::wstring Socket::read(int timeout) {
|
||||||
BOOL fSuccess = false;
|
BOOL fSuccess = false;
|
||||||
std::wstring returnString;
|
std::wstring returnString;
|
||||||
bool moreData = true;
|
bool moreData = true;
|
||||||
|
|
||||||
while(moreData) {
|
while(moreData) {
|
||||||
moreData = false;
|
moreData = false;
|
||||||
memset(&buf, 0, sizeof(buf));
|
memset(&buf, 0, sizeof(buf));
|
||||||
|
|
||||||
ReadFile( d->hPipe, &buf, sizeof(buf)-sizeof(wchar_t), &cbBytesRead, &oOverlap);
|
ReadFile( d->hPipe, &buf, sizeof(buf)-sizeof(wchar_t), &cbBytesRead, &oOverlap);
|
||||||
|
|
||||||
result = WaitForSingleObject(oOverlap.hEvent, timeout);
|
result = WaitForSingleObject(oOverlap.hEvent, timeout);
|
||||||
|
|
||||||
if(!d->running) {
|
if(!d->running) {
|
||||||
CancelIo(d->hPipe);
|
CancelIo(d->hPipe);
|
||||||
WaitForSingleObject(oOverlap.hEvent, INFINITE);
|
WaitForSingleObject(oOverlap.hEvent, INFINITE);
|
||||||
|
|
@ -123,7 +123,7 @@ std::wstring Socket::read(int timeout) {
|
||||||
// Cancel, we still need to cleanup
|
// Cancel, we still need to cleanup
|
||||||
}
|
}
|
||||||
fSuccess = GetOverlappedResult(d->hPipe, &oOverlap, &cbBytesRead, true);
|
fSuccess = GetOverlappedResult(d->hPipe, &oOverlap, &cbBytesRead, true);
|
||||||
|
|
||||||
if (!fSuccess) {
|
if (!fSuccess) {
|
||||||
DWORD err = GetLastError();
|
DWORD err = GetLastError();
|
||||||
debuglog(static_cast<int>(err), "Something read error");
|
debuglog(static_cast<int>(err), "Something read error");
|
||||||
|
|
@ -151,7 +151,7 @@ std::wstring Socket::read(int timeout) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Socket::write(const std::wstring &msg) {
|
void Socket::write(const std::wstring &msg) {
|
||||||
|
|
||||||
OVERLAPPED oOverlap;
|
OVERLAPPED oOverlap;
|
||||||
DWORD bytesWritten = 0;
|
DWORD bytesWritten = 0;
|
||||||
int result;
|
int result;
|
||||||
|
|
@ -161,7 +161,7 @@ void Socket::write(const std::wstring &msg) {
|
||||||
|
|
||||||
HANDLE writeEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
HANDLE writeEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||||
oOverlap.hEvent = writeEvent;
|
oOverlap.hEvent = writeEvent;
|
||||||
|
|
||||||
BOOL writeSuccess = WriteFile(d->hPipe, msg.data(), (DWORD)msg.length()*sizeof(wchar_t), &bytesWritten, &oOverlap);
|
BOOL writeSuccess = WriteFile(d->hPipe, msg.data(), (DWORD)msg.length()*sizeof(wchar_t), &bytesWritten, &oOverlap);
|
||||||
result = GetLastError();
|
result = GetLastError();
|
||||||
if (writeSuccess || result == ERROR_IO_PENDING) {
|
if (writeSuccess || result == ERROR_IO_PENDING) {
|
||||||
|
|
@ -189,7 +189,7 @@ void Socket::write(const std::wstring &msg) {
|
||||||
d->hPipe = 0;
|
d->hPipe = 0;
|
||||||
debuglog(result, "Error in write event, closing socket");
|
debuglog(result, "Error in write event, closing socket");
|
||||||
d->connected = false;
|
d->connected = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,12 @@ ConnectionListener::ConnectionListener(const std::wstring &name, TelldusCore::Ev
|
||||||
PSID pEveryoneSID = NULL;
|
PSID pEveryoneSID = NULL;
|
||||||
SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
|
SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
|
||||||
|
|
||||||
pSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH);
|
pSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH);
|
||||||
if (pSD == NULL) {
|
if (pSD == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)) {
|
if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)) {
|
||||||
LocalFree(pSD);
|
LocalFree(pSD);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -60,12 +60,11 @@ ConnectionListener::ConnectionListener(const std::wstring &name, TelldusCore::Ev
|
||||||
ea.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
|
ea.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
|
||||||
ea.Trustee.ptstrName = (LPTSTR) pEveryoneSID;
|
ea.Trustee.ptstrName = (LPTSTR) pEveryoneSID;
|
||||||
|
|
||||||
|
// Add the ACL to the security descriptor.
|
||||||
// Add the ACL to the security descriptor.
|
if (!SetSecurityDescriptorDacl(pSD,
|
||||||
if (!SetSecurityDescriptorDacl(pSD,
|
TRUE, // bDaclPresent flag
|
||||||
TRUE, // bDaclPresent flag
|
pACL,
|
||||||
pACL,
|
FALSE)) { // not a default DACL
|
||||||
FALSE)) { // not a default DACL
|
|
||||||
LocalFree(pSD);
|
LocalFree(pSD);
|
||||||
FreeSid(pEveryoneSID);
|
FreeSid(pEveryoneSID);
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +96,7 @@ void ConnectionListener::run() {
|
||||||
d->hEvent = CreateEvent(NULL, true, false, NULL);
|
d->hEvent = CreateEvent(NULL, true, false, NULL);
|
||||||
oOverlap.hEvent = d->hEvent;
|
oOverlap.hEvent = d->hEvent;
|
||||||
bool recreate = true;
|
bool recreate = true;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
BOOL alreadyConnected = false;
|
BOOL alreadyConnected = false;
|
||||||
if (recreate) {
|
if (recreate) {
|
||||||
|
|
@ -129,7 +128,7 @@ void ConnectionListener::run() {
|
||||||
WaitForSingleObject(oOverlap.hEvent, INFINITE);
|
WaitForSingleObject(oOverlap.hEvent, INFINITE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(result == WAIT_TIMEOUT) {
|
if(result == WAIT_TIMEOUT) {
|
||||||
//CloseHandle(hPipe);
|
//CloseHandle(hPipe);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
@ -58,15 +58,15 @@ int Settings::getNumberOfNodes(Node type) const {
|
||||||
|
|
||||||
int intNumberOfNodes = 0;
|
int intNumberOfNodes = 0;
|
||||||
HKEY hk;
|
HKEY hk;
|
||||||
|
|
||||||
long lnExists = RegOpenKeyEx(d->rootKey, d->getNodePath(type).c_str(), 0, KEY_QUERY_VALUE, &hk);
|
long lnExists = RegOpenKeyEx(d->rootKey, d->getNodePath(type).c_str(), 0, KEY_QUERY_VALUE, &hk);
|
||||||
|
|
||||||
if(lnExists == ERROR_SUCCESS) {
|
if(lnExists == ERROR_SUCCESS) {
|
||||||
|
|
||||||
std::wstring strNumSubKeys;
|
std::wstring strNumSubKeys;
|
||||||
DWORD dNumSubKeys;
|
DWORD dNumSubKeys;
|
||||||
RegQueryInfoKey(hk, NULL, NULL, NULL, &dNumSubKeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
RegQueryInfoKey(hk, NULL, NULL, NULL, &dNumSubKeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
intNumberOfNodes = static_cast<int>(dNumSubKeys);
|
intNumberOfNodes = static_cast<int>(dNumSubKeys);
|
||||||
|
|
||||||
RegCloseKey(hk);
|
RegCloseKey(hk);
|
||||||
|
|
@ -80,11 +80,11 @@ int Settings::getNodeId(Node type, int intNodeIndex) const {
|
||||||
|
|
||||||
int intReturn = -1;
|
int intReturn = -1;
|
||||||
HKEY hk;
|
HKEY hk;
|
||||||
|
|
||||||
long lnExists = RegOpenKeyEx(d->rootKey, d->getNodePath(type).c_str(), 0, KEY_READ, &hk);
|
long lnExists = RegOpenKeyEx(d->rootKey, d->getNodePath(type).c_str(), 0, KEY_READ, &hk);
|
||||||
|
|
||||||
if(lnExists == ERROR_SUCCESS) {
|
if(lnExists == ERROR_SUCCESS) {
|
||||||
|
|
||||||
wchar_t* Buff = new wchar_t[intMaxRegValueLength];
|
wchar_t* Buff = new wchar_t[intMaxRegValueLength];
|
||||||
DWORD size = intMaxRegValueLength;
|
DWORD size = intMaxRegValueLength;
|
||||||
if (RegEnumKeyEx(hk, intNodeIndex, (LPWSTR)Buff, &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
|
if (RegEnumKeyEx(hk, intNodeIndex, (LPWSTR)Buff, &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
|
||||||
|
|
@ -111,7 +111,7 @@ int Settings::addNode(Node type) {
|
||||||
|
|
||||||
std::wstring strCompleteRegPath = d->getNodePath(type);
|
std::wstring strCompleteRegPath = d->getNodePath(type);
|
||||||
strCompleteRegPath.append(TelldusCore::intToWstring(intNodeId));
|
strCompleteRegPath.append(TelldusCore::intToWstring(intNodeId));
|
||||||
|
|
||||||
if (RegCreateKeyEx(d->rootKey, strCompleteRegPath.c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hk, &dwDisp)) {
|
if (RegCreateKeyEx(d->rootKey, strCompleteRegPath.c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hk, &dwDisp)) {
|
||||||
//fail
|
//fail
|
||||||
intNodeId = -1;
|
intNodeId = -1;
|
||||||
|
|
@ -131,9 +131,8 @@ int Settings::getNextNodeId(Node type) const {
|
||||||
DWORD dwDisp;
|
DWORD dwDisp;
|
||||||
|
|
||||||
long lnExists = RegCreateKeyEx(d->rootKey, d->getNodePath(type).c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hk, &dwDisp); //create or open if already created
|
long lnExists = RegCreateKeyEx(d->rootKey, d->getNodePath(type).c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hk, &dwDisp); //create or open if already created
|
||||||
|
|
||||||
if(lnExists == ERROR_SUCCESS) {
|
if(lnExists == ERROR_SUCCESS) {
|
||||||
|
|
||||||
DWORD dwLength = sizeof(DWORD);
|
DWORD dwLength = sizeof(DWORD);
|
||||||
DWORD nResult(0);
|
DWORD nResult(0);
|
||||||
|
|
||||||
|
|
@ -146,7 +145,6 @@ int Settings::getNextNodeId(Node type) const {
|
||||||
}
|
}
|
||||||
DWORD dwVal = intReturn;
|
DWORD dwVal = intReturn;
|
||||||
RegSetValueEx (hk, L"LastUsedId", 0L, REG_DWORD, (CONST BYTE*) &dwVal, sizeof(DWORD));
|
RegSetValueEx (hk, L"LastUsedId", 0L, REG_DWORD, (CONST BYTE*) &dwVal, sizeof(DWORD));
|
||||||
|
|
||||||
}
|
}
|
||||||
RegCloseKey(hk);
|
RegCloseKey(hk);
|
||||||
return intReturn;
|
return intReturn;
|
||||||
|
|
@ -157,7 +155,7 @@ int Settings::getNextNodeId(Node type) const {
|
||||||
*/
|
*/
|
||||||
int Settings::removeNode(Node type, int intNodeId) {
|
int Settings::removeNode(Node type, int intNodeId) {
|
||||||
TelldusCore::MutexLocker locker(&mutex);
|
TelldusCore::MutexLocker locker(&mutex);
|
||||||
|
|
||||||
std::wstring strCompleteRegPath = d->getNodePath(type);
|
std::wstring strCompleteRegPath = d->getNodePath(type);
|
||||||
strCompleteRegPath.append(TelldusCore::intToWstring(intNodeId));
|
strCompleteRegPath.append(TelldusCore::intToWstring(intNodeId));
|
||||||
|
|
||||||
|
|
@ -177,7 +175,7 @@ std::wstring Settings::getSetting(const std::wstring &strName) const {
|
||||||
|
|
||||||
std::wstring strCompleteRegPath = d->strRegPath;
|
std::wstring strCompleteRegPath = d->strRegPath;
|
||||||
long lnExists = RegOpenKeyEx(d->rootKey, strCompleteRegPath.c_str(), 0, KEY_QUERY_VALUE, &hk);
|
long lnExists = RegOpenKeyEx(d->rootKey, strCompleteRegPath.c_str(), 0, KEY_QUERY_VALUE, &hk);
|
||||||
|
|
||||||
if(lnExists == ERROR_SUCCESS) {
|
if(lnExists == ERROR_SUCCESS) {
|
||||||
wchar_t* Buff = new wchar_t[intMaxRegValueLength];
|
wchar_t* Buff = new wchar_t[intMaxRegValueLength];
|
||||||
DWORD dwLength = sizeof(wchar_t)*intMaxRegValueLength;
|
DWORD dwLength = sizeof(wchar_t)*intMaxRegValueLength;
|
||||||
|
|
@ -205,7 +203,7 @@ std::wstring Settings::getStringSetting(Node type, int intNodeId, const std::wst
|
||||||
std::wstring strCompleteRegPath = d->getNodePath(type);
|
std::wstring strCompleteRegPath = d->getNodePath(type);
|
||||||
strCompleteRegPath.append(TelldusCore::intToWstring(intNodeId));
|
strCompleteRegPath.append(TelldusCore::intToWstring(intNodeId));
|
||||||
long lnExists = RegOpenKeyEx(d->rootKey, strCompleteRegPath.c_str(), 0, KEY_QUERY_VALUE, &hk);
|
long lnExists = RegOpenKeyEx(d->rootKey, strCompleteRegPath.c_str(), 0, KEY_QUERY_VALUE, &hk);
|
||||||
|
|
||||||
if(lnExists == ERROR_SUCCESS) {
|
if(lnExists == ERROR_SUCCESS) {
|
||||||
wchar_t* Buff = new wchar_t[intMaxRegValueLength];
|
wchar_t* Buff = new wchar_t[intMaxRegValueLength];
|
||||||
DWORD dwLength = sizeof(wchar_t)*intMaxRegValueLength;
|
DWORD dwLength = sizeof(wchar_t)*intMaxRegValueLength;
|
||||||
|
|
@ -230,12 +228,12 @@ int Settings::setStringSetting(Node type, int intNodeId, const std::wstring &nam
|
||||||
|
|
||||||
HKEY hk;
|
HKEY hk;
|
||||||
int ret = TELLSTICK_SUCCESS;
|
int ret = TELLSTICK_SUCCESS;
|
||||||
|
|
||||||
std::wstring strNodeId = TelldusCore::intToWstring(intNodeId);
|
std::wstring strNodeId = TelldusCore::intToWstring(intNodeId);
|
||||||
std::wstring strCompleteRegPath = d->getNodePath(type);
|
std::wstring strCompleteRegPath = d->getNodePath(type);
|
||||||
strCompleteRegPath.append(strNodeId);
|
strCompleteRegPath.append(strNodeId);
|
||||||
long lnExists = RegOpenKeyEx(d->rootKey, strCompleteRegPath.c_str(), 0, KEY_WRITE, &hk);
|
long lnExists = RegOpenKeyEx(d->rootKey, strCompleteRegPath.c_str(), 0, KEY_WRITE, &hk);
|
||||||
|
|
||||||
if (lnExists == ERROR_SUCCESS) {
|
if (lnExists == ERROR_SUCCESS) {
|
||||||
int length = static_cast<int>(value.length()) * sizeof(wchar_t);
|
int length = static_cast<int>(value.length()) * sizeof(wchar_t);
|
||||||
RegSetValueEx(hk, name.c_str(), 0, REG_SZ, (LPBYTE)value.c_str(), length+1);
|
RegSetValueEx(hk, name.c_str(), 0, REG_SZ, (LPBYTE)value.c_str(), length+1);
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ DWORD WINAPI TelldusWinService::deviceNotificationHandler( DWORD controlCode, DW
|
||||||
if (dwEventType != DBT_DEVICEARRIVAL && dwEventType != DBT_DEVICEREMOVECOMPLETE) {
|
if (dwEventType != DBT_DEVICEARRIVAL && dwEventType != DBT_DEVICEREMOVECOMPLETE) {
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
PDEV_BROADCAST_DEVICEINTERFACE pDevInf = reinterpret_cast<PDEV_BROADCAST_DEVICEINTERFACE>(lpEventData);
|
PDEV_BROADCAST_DEVICEINTERFACE pDevInf = reinterpret_cast<PDEV_BROADCAST_DEVICEINTERFACE>(lpEventData);
|
||||||
if (!pDevInf) {
|
if (!pDevInf) {
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||||
|
|
@ -101,7 +101,7 @@ DWORD WINAPI TelldusWinService::deviceNotificationHandler( DWORD controlCode, DW
|
||||||
|
|
||||||
long int vid = strtol(std::string(strVID.begin(), strVID.end()).c_str(), NULL, 16);
|
long int vid = strtol(std::string(strVID.begin(), strVID.end()).c_str(), NULL, 16);
|
||||||
long int pid = strtol(std::string(strPID.begin(), strPID.end()).c_str(), NULL, 16);
|
long int pid = strtol(std::string(strPID.begin(), strPID.end()).c_str(), NULL, 16);
|
||||||
|
|
||||||
if (dwEventType == DBT_DEVICEARRIVAL) {
|
if (dwEventType == DBT_DEVICEARRIVAL) {
|
||||||
tm->deviceInsertedOrRemoved(vid, pid, true);
|
tm->deviceInsertedOrRemoved(vid, pid, true);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -170,7 +170,7 @@ void WINAPI TelldusWinService::serviceMain( DWORD argc, TCHAR* argv[] ) {
|
||||||
|
|
||||||
Log::notice("TelldusService stopping");
|
Log::notice("TelldusService stopping");
|
||||||
Log::destroy();
|
Log::destroy();
|
||||||
|
|
||||||
// service was stopped
|
// service was stopped
|
||||||
instance.serviceStatus.dwCurrentState = SERVICE_STOP_PENDING;
|
instance.serviceStatus.dwCurrentState = SERVICE_STOP_PENDING;
|
||||||
SetServiceStatus( instance.serviceStatusHandle, &instance.serviceStatus );
|
SetServiceStatus( instance.serviceStatusHandle, &instance.serviceStatus );
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ public:
|
||||||
~TelldusWinService();
|
~TelldusWinService();
|
||||||
|
|
||||||
static void WINAPI serviceMain( DWORD /*argc*/, TCHAR* /*argv*/[] );
|
static void WINAPI serviceMain( DWORD /*argc*/, TCHAR* /*argv*/[] );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void stop();
|
void stop();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue