- fixed bug in windows UDP socket implementation (WSA was not started)

(LIB61850-360)
v1.6_develop_rgoose_sntp
Michael Zillgith 3 years ago
parent 6836063414
commit e0e1e3b6f4

@ -96,6 +96,9 @@ main(int argc, char **argv)
LinkedList_destroyDeep(dataSetValues, (LinkedListValueDeleteFunction) MmsValue_delete); LinkedList_destroyDeep(dataSetValues, (LinkedListValueDeleteFunction) MmsValue_delete);
} }
else {
printf("Failed to create RSession instance\n");
}
return 0; return 0;
} }

@ -21,6 +21,8 @@
#include "hal_socket.h" #include "hal_socket.h"
#include "stack_config.h" #include "stack_config.h"
#define DEBUG_SOCKET 1
#ifndef __MINGW64_VERSION_MAJOR #ifndef __MINGW64_VERSION_MAJOR
struct tcp_keepalive { struct tcp_keepalive {
u_long onoff; u_long onoff;
@ -671,6 +673,9 @@ Socket_destroy(Socket self)
static UdpSocket static UdpSocket
UdpSocket_createUsingNamespace(int ns) UdpSocket_createUsingNamespace(int ns)
{ {
if (wsaStartUp() == false)
return NULL;
UdpSocket self = NULL; UdpSocket self = NULL;
SOCKET sock = socket(AF_INET, SOCK_DGRAM, 0); SOCKET sock = socket(AF_INET, SOCK_DGRAM, 0);

Loading…
Cancel
Save