while(1) {
while(!ipr->exit) {
static void* listenerUdpIpv4(void* ipfixReceiver_) {	IpfixReceiver* ipfixReceiver = (IpfixReceiver*)ipfixReceiver_;		struct sockaddr_in clientAddress;	socklen_t clientAddressLen;	byte* data = (byte*)malloc(sizeof(byte)*MAX_MSG_LEN);	int n;		while(1) {			//static uint16_t packets = 0;		//if (packets++ >= 10000) break;				clientAddressLen = sizeof(struct sockaddr_in);		n = recvfrom(ipfixReceiver->socket, data, MAX_MSG_LEN, 0, (struct sockaddr*)&clientAddress, &clientAddressLen);		if(n < 0) {			msg(MSG_DEBUG, "recvfrom returned with error, terminating UDP/IPv4 listener thread");			break;		}      		pthread_mutex_lock(&ipfixReceiver->mutex);		processMessage(ipfixReceiver, data, n);		pthread_mutex_unlock(&ipfixReceiver->mutex);	}	free(data);	return 0;}