modified the BACnet/IP init code for the win32 platform to make it work on my system. It seems that something else is intercepting the packets when the bind was set to INADDR_ANY, so I just bind to the host default adapter.
This commit is contained in:
@@ -123,7 +123,7 @@ bool bip_init(void)
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
sin.sin_port = htons(bip_get_port());
|
||||
memset(&(sin.sin_zero), '\0', 8);
|
||||
memset(&(sin.sin_zero), '\0', sizeof(sin.sin_zero));
|
||||
status = bind(sock_fd,
|
||||
(const struct sockaddr*)&sin, sizeof(struct sockaddr));
|
||||
if (status < 0)
|
||||
|
||||
Reference in New Issue
Block a user