Win32 socket vs POSIX sockets is not always happy together. Seperated the two to mimic the same behavior we have for /uart/. The code compiles but the socket doesnt work on Proxspace yet. More fixes to be done

This commit is contained in:
iceman1001 committed 2025-07-09 00:20:43 +02:00
1 parent fa59b9cb6b
commit 931e93a11b
3 files changed
+121 -44

No files matched your search

+7
View File
@@ -21,7 +21,12 @@
#include "cliparser.h"
#include "mqtt.h" // MQTT support
//#include "mbedtls_sockets.h" // MQTT networkings examples
#ifndef _WIN32
#include "posix_sockets.h" // MQTT networkings examples
#else
#include "win32_sockets.h" // MQTT networkings examples
#endif
#include "util_posix.h" // time
#include "fileutils.h"
@@ -62,7 +67,9 @@ static int mqtt_exit(int status, int sockfd, pthread_t *client_daemon) {
if (client_daemon != NULL) {
pthread_cancel(*client_daemon);
#ifndef _WIN32
pthread_join(*client_daemon, NULL); // Wait for the thread to finish
#endif
}
return status;
}