From 17037b06948e5b4e710b53cd225e53ba11f72cf2 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 25 Feb 2026 14:51:00 +0100 Subject: [PATCH] Fix build failing if DNS is not working. Building UnrealIRCd should never fail because it has no internet access, like when fetching the repository (modules.list file) of 3rd party modules. Previously I had.. url_start_async(request); synchronous_http_request_in_progress = 1; .. which worked fine for the "cannot connect case", like port blocked or timeout connecting. But if DNS fails then the step of setting synchronous_http_request_in_progress = -1 (so failed) already happens during the url_start_async(request); call, and then the line after it sets 'synchronous_http_request_in_progress = 1;' so we miss that it failed and wait in the I/O loop forever. Simply swapping the two lines of code fixes this. The other change is that when running the ModuleManager in "make" we should ignore the exit code. I probably broke that while refactoring and adding non-zero exit codes in de modulemanager past few months for this release. --- src/misc.c | 2 +- src/modules/third/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc.c b/src/misc.c index a9112ae4c..d03da4fff 100644 --- a/src/misc.c +++ b/src/misc.c @@ -3050,8 +3050,8 @@ const char *synchronous_http_request(const char *url, int max_redirects, int con request->keep_file = 1; request->connect_timeout = connect_timeout; request->transfer_timeout = transfer_timeout; - url_start_async(request); synchronous_http_request_in_progress = 1; + url_start_async(request); while (synchronous_http_request_in_progress == 1) { diff --git a/src/modules/third/Makefile.in b/src/modules/third/Makefile.in index c9ea25ebb..3afa9fcbd 100644 --- a/src/modules/third/Makefile.in +++ b/src/modules/third/Makefile.in @@ -40,7 +40,7 @@ RM=@RM@ all: build build: - ../../../src/ircd -m upgrade --no-install + -../../../src/ircd -m upgrade --no-install ../../../src/ircd -m compile-all custommodule: $(MODULEFILE).c