This commit is contained in:
Wolfgang Hottgenroth 2021-02-10 11:20:02 +01:00
parent b0e3033127
commit e87f255974
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -5,11 +5,13 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <string.h>
#include <libconfig.h> #include <libconfig.h>
#include <sinkStruct.h> #include <sinkStruct.h>
#include <logging.h> #include <logging.h>
#include <sha256.h>
config_t cfg; config_t cfg;
@ -66,7 +68,7 @@ int receiveAndVerifyMinuteBuffer(t_minuteBuffer *buf) {
struct sockaddr_in servaddr, cliaddr; struct sockaddr_in servaddr, cliaddr;
socklen_t cliaddrlen = sizeof(cliaddr); socklen_t cliaddrlen = sizeof(cliaddr);
int n = recvfrom(sockfd, buf->b, sizeof(buf->b), MSG_TRUNC, int n = recvfrom(receiveSockFd, buf->b, sizeof(buf->b), MSG_TRUNC,
(struct sockaddr *) &cliaddr, &cliaddrlen); (struct sockaddr *) &cliaddr, &cliaddrlen);
logmsg(LOG_INFO, "received %d octets from %04x", n, cliaddr.sin_addr.s_addr); logmsg(LOG_INFO, "received %d octets from %04x", n, cliaddr.sin_addr.s_addr);