summaryrefslogtreecommitdiff
path: root/src/sig_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sig_handler.c')
-rw-r--r--src/sig_handler.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sig_handler.c b/src/sig_handler.c
index 68ea911..bdd92e2 100644
--- a/src/sig_handler.c
+++ b/src/sig_handler.c
@@ -1,15 +1,15 @@
/*
* gcsd
*
- * gcsd the generic command sequencer daemon can be used to serialize
+ * gcsd the generic command sequencer daemon can be used to serialize
* commands sent over various paralell communication channels to a
* single command output. It can be seen as a multiplexer for any
* kind of communication between a single resource and various clients
* which want to submit commands to it or query information from it.
- * gcsd is written in C and Lua. The goal is to provide an easy to
+ * gcsd is written in C and Lua. The goal is to provide an easy to
* understand high level API based on Lua which can be used to
* implement the business logic of the so formed multiplexer daemon.
- *
+ *
*
* Copyright (C) 2009-2010 Markus Grueneis <gimpf@spreadspace.org>
* Christian Pointner <equinox@spreadspace.org>
@@ -172,7 +172,7 @@ static SOCKET server_sock;
static DWORD WINAPI signal_connect_thread(void* p)
{
uint16_t port = *((uint16_t*)p);
-
+
SOCKET client;
client = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if(client == INVALID_SOCKET) {
@@ -200,7 +200,7 @@ static DWORD WINAPI signal_connect_thread(void* p)
return -1;
}
- log_printf(DEBUG, "sig_handler connected to port %d", port);
+ log_printf(DEBUG, "sig_handler connected to port %d", port);
sig_sock_fds[1] = client;
@@ -241,7 +241,7 @@ int signal_init()
WSACleanup();
return -1;
}
-
+
struct sockaddr_in hugo;
int hugo_len = sizeof(hugo);
if(getsockname(server_sock, (SOCKADDR*) &hugo, &hugo_len) == SOCKET_ERROR) {
@@ -250,7 +250,7 @@ int signal_init()
WSACleanup();
return -1;
}
-
+
if(listen(server_sock, 1) == SOCKET_ERROR) {
log_printf(ERROR, "listen() failed: 0x%04X", WSAGetLastError());
closesocket(server_sock);
@@ -278,7 +278,7 @@ int signal_init()
}
WaitForSingleObject(t, INFINITE);
-
+
if(!SetConsoleCtrlHandler(signal_ctrl_handler, 1)) {
log_printf(ERROR, "adding console ctrl handler failed: 0x%04X" , GetLastError());
}