summaryrefslogtreecommitdiff
path: root/common/async-resolver.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2007-05-28 19:40:57 +0000
committerStef Walter <stef@memberwebs.com>2007-05-28 19:40:57 +0000
commitc4a0c63f0dd25390d765b5fc52a7e91743641adf (patch)
treec701546505bb7ef0998abd9dab2ff43917a7c2c9 /common/async-resolver.c
parent49c5561aaff716614952c1d7e1185b1ee4d0cf5a (diff)
Use 'Stef' instead of 'Nate'
Diffstat (limited to 'common/async-resolver.c')
-rw-r--r--common/async-resolver.c12
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)
{