mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-04 15:53:12 +02:00
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.
This commit is contained in:
+1
-1
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user