diff options
Diffstat (limited to 'common/async-resolver.c')
-rw-r--r-- | common/async-resolver.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/common/async-resolver.c b/common/async-resolver.c index 284a486..8485bb2 100644 --- a/common/async-resolver.c +++ b/common/async-resolver.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Nate Nielsen + * Copyright (c) 2006, Stefan Walter * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ * THREAD COMMUNICATION */ -#define TSIGNAL_UNITITIALIZED { -1 -1 } +#define TSIGNAL_UNITITIALIZED { -1, -1 } static int tsignal_init(int* sig) @@ -262,6 +262,14 @@ async_resolver_queue(const char* hostname, const char* servname, resolve_request* r; char* t; + if(!res_thread) + { + /* All errors go to callback */ + errno = ESRCH; + (cb)(EAI_SYSTEM, NULL, arg); + return; + } + req = calloc(1, sizeof(resolve_request)); if(!req) { |