The following commit has been merged in the master branch: commit 0037c3ae2c0cc756d70d4a4a84e2b257e06709b9 Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Nov 6 21:32:22 2006 +0100
check for running firewall
diff --git a/posix.c b/posix.c index 7620832..fde3c28 100644 --- a/posix.c +++ b/posix.c @@ -526,12 +526,14 @@ int receive_packet(unsigned char *packet_buff, int packet_buff_len, unsigned cha int send_packet(unsigned char *buff, int len, struct sockaddr_in *broad, int sock) {
- if (sendto(sock, buff, len, 0, (struct sockaddr *)broad, sizeof (struct sockaddr_in)) < 0) - { + char log_str[200]; + + if ( sendto( sock, buff, len, 0, (struct sockaddr *)broad, sizeof (struct sockaddr_in) ) < 0 ) {
if ( errno == 1 ) {
- do_log( "Error - can't send packet: %s.\nDoes your Firewall allow outgoing UDP packets on port 1966 ?\n", strerror(errno) ); + snprintf( log_str, sizeof( log_str ), "Error - can't send packet: %s.\nDoes your firewall allow outgoing packets on port %i ?\n", strerror(errno), ntohs(broad->sin_port ) ); + do_log( log_str, strerror(errno) );
} else {