summaryrefslogtreecommitdiffstats
path: root/src/net/tcp
diff options
context:
space:
mode:
authorMichael Brown2007-01-18 23:38:13 +0100
committerMichael Brown2007-01-18 23:38:13 +0100
commit4e3976711dec26ba1f462f19c4b865dea3dbe4d7 (patch)
treefab4b8042cdc2e01adc2b43f5f816611e5978068 /src/net/tcp
parentWhen an async operation dies, orphan its children. (diff)
downloadipxe-4e3976711dec26ba1f462f19c4b865dea3dbe4d7.tar.gz
ipxe-4e3976711dec26ba1f462f19c4b865dea3dbe4d7.tar.xz
ipxe-4e3976711dec26ba1f462f19c4b865dea3dbe4d7.zip
A working name resolution framework
Diffstat (limited to 'src/net/tcp')
-rw-r--r--src/net/tcp/http.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c
index 04e8f9a1..87f6eee2 100644
--- a/src/net/tcp/http.c
+++ b/src/net/tcp/http.c
@@ -35,6 +35,7 @@
#include <gpxe/uri.h>
#include <gpxe/buffer.h>
#include <gpxe/download.h>
+#include <gpxe/resolv.h>
#include <gpxe/http.h>
static struct async_operations http_async_operations;
@@ -391,17 +392,12 @@ int http_get ( struct uri *uri, struct buffer *buffer, struct async *parent ) {
http->buffer = buffer;
async_init ( &http->async, &http_async_operations, parent );
-
-#warning "Quick name resolution hack"
- extern int dns_resolv ( const char *name,
- struct sockaddr *sa,
- struct async *parent );
-
- if ( ( rc = dns_resolv ( uri->host, &http->server,
- &http->async ) ) != 0 )
+ /* Start name resolution. The download proper will start when
+ * name resolution completes.
+ */
+ if ( ( rc = resolv ( uri->host, &http->server, &http->async ) ) != 0 )
goto err;
-
return 0;
err: