The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 075b3220 authored by Axel Auweter's avatar Axel Auweter
Browse files

Save intermediate state to continue wfh.

parent 07fced38
......@@ -101,7 +101,7 @@ void SimpleMQTTServer::initSockets(void)
freeaddrinfo(ainfo_head);
#ifdef SimpleMQTTVerbose
cout << "Opened " << listenSockets.size() << " network sockets for MQTT connections.\n";
cout << "Opened " << listenSockets.size() << " network socket(s) for MQTT connections.\n";
#endif
}
......
......@@ -54,6 +54,13 @@
#define SimpleMQTTPollTimeout 100
#endif
/*
* Define the standard size for the buffer used in read() calls.
*/
#ifndef SimpleMQTTReadBufferSize
#define SimpleMQTTReadBufferSize 1024
#endif
/*
* Enable verbose output of the MQTT server.
*/
......
......@@ -167,6 +167,7 @@ void SimpleMQTTServerMessageThread::run()
#endif
int numfds = -1;
char inbuf[SimpleMQTTReadBufferSize];
while (!terminate) {
/*
......@@ -185,13 +186,11 @@ void SimpleMQTTServerMessageThread::run()
if (fds[connectionId].fd) {
if (fds[connectionId].revents & POLLIN) {
int nbytes;
char buf[8];
cout << "Data ready on fd: " << fds[connectionId].fd << "\n";
nbytes = read(fds[connectionId].fd, buf, 7);
buf[7] = 0;
nbytes = read(fds[connectionId].fd, inbuf, SimpleMQTTReadBufferSize);
/*
* If read() returns 0, the conncetion was closed on the
* If read() returns 0, the connection was closed on the
* remote side. In this case, release it from our list.
*/
if (nbytes == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment