diff options
Diffstat (limited to 'pacredir.c')
-rw-r--r-- | pacredir.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ /* - * (C) 2013-2024 by Christian Hesse <mail@eworm.de> + * (C) 2013-2025 by Christian Hesse <mail@eworm.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -184,10 +184,10 @@ static void resolve_callback(AvahiServiceResolver *r, avahi_address_snprint(ipaddress, AVAHI_ADDRESS_STR_MAX, address); if (verbose > 0) - write_log(stdout, "Found service %s on host %s (%s) on interface %s\n", - type, host, ipaddress, intname); + write_log(stdout, "Found service %s (port %d) on host %s (%s) on interface %s\n", + type, port, host, ipaddress, intname); - add_host(host, protocol, ipaddress, PORT_PACSERVE, type); + add_host(host, protocol, ipaddress, port, type); break; } @@ -487,7 +487,7 @@ static mhd_result ahc_echo(void * cls, request->last_modified = 0; if (verbose > 0) - write_log(stdout, "Trying %s: %s\n", request->host, request->url); + write_log(stdout, "Trying %s: %s\n", request->host->host, request->url); if ((error = pthread_create(&tid[req_count], NULL, get_http_code, (void *)request)) != 0) write_log(stderr, "Could not run thread number %d, errno %d\n", req_count, error); @@ -776,7 +776,7 @@ int main(int argc, char ** argv) { /* prepare struct to make microhttpd listen on localhost only */ address.sin_family = AF_INET; address.sin_port = htons(PORT_PACREDIR); - address.sin_addr.s_addr = htonl(0x7f000001); + address.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* start http server */ if ((mhd = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION | MHD_USE_TCP_FASTOPEN, PORT_PACREDIR, |