diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-06-14 20:57:58 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-06-14 20:57:58 +0200 |
commit | 64f446220da6f567c818d00a650f92d25391d6e5 (patch) | |
tree | 59ebf4f29851e31a192a6287b87690b99c94a417 /src/server.c | |
parent | 4d56d7b74f75a918aaa6fa6ab051a3ef9896ffc6 (diff) | |
download | dns-64f446220da6f567c818d00a650f92d25391d6e5.tar.gz |
fix warnings
Diffstat (limited to 'src/server.c')
-rw-r--r-- | src/server.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server.c b/src/server.c index 6eb54e0..3796b87 100644 --- a/src/server.c +++ b/src/server.c @@ -43,12 +43,10 @@ void server_start ( server_config_t* _config ) server_handle_connection( sock_server, &zone_db ); } } - - exit(0); } void server_handle_connection ( int _socket, database_t* _zone_db ) { - unsigned int i; + int i; char recv_buffer[ UDP_BUFFER_LEN ]; int recv_len = 0; @@ -124,7 +122,7 @@ void server_handle_connection ( int _socket, database_t* _zone_db ) { dns_construct_header( answ_buffer, answ_len, &answ_header ); - sendto( _socket, answ_buffer, answ_cnt, 0, (struct sockaddr*) &sock_client_addr, sock_client_addr_len ); + sendto( _socket, answ_buffer, (size_t)answ_cnt, 0, (struct sockaddr*) &sock_client_addr, sock_client_addr_len ); end: dns_destroy_struct ( &dns_req ); @@ -160,7 +158,7 @@ int server_get_socket ( char* _bind_ip, uint16_t _bind_port ) { return server_socket; } -void signal_term ( ) { +void signal_term ( int _sig ) { LOGPRINTF( _LOG_NOTE, "Server shutting down" ); close( sock_server ); exit(0); |