plist_fetch: add some debugging printfs to know when network access is working.
This commit is contained in:
parent
20c36d73ef
commit
b2840a3f16
@ -32,7 +32,6 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "xbps_api_impl.h"
|
#include "xbps_api_impl.h"
|
||||||
#include "fetch.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file lib/plist_fetch.c
|
* @file lib/plist_fetch.c
|
||||||
@ -53,6 +52,8 @@ fetch_archive_open(struct archive *a, void *client_data)
|
|||||||
|
|
||||||
(void)a;
|
(void)a;
|
||||||
|
|
||||||
|
xbps_dbg_printf("%s: establishing connection to `%s'...\n",
|
||||||
|
__func__, f->url->host);
|
||||||
f->fetch = fetchGet(f->url, NULL);
|
f->fetch = fetchGet(f->url, NULL);
|
||||||
if (f->fetch == NULL)
|
if (f->fetch == NULL)
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
@ -68,6 +69,9 @@ fetch_archive_read(struct archive *a, void *client_data, const void **buf)
|
|||||||
(void)a;
|
(void)a;
|
||||||
*buf = f->buffer;
|
*buf = f->buffer;
|
||||||
|
|
||||||
|
xbps_dbg_printf("%s: fetching data from `%s'...\n",
|
||||||
|
__func__, f->url->doc);
|
||||||
|
|
||||||
return fetchIO_read(f->fetch, f->buffer, sizeof(f->buffer));
|
return fetchIO_read(f->fetch, f->buffer, sizeof(f->buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,8 +82,11 @@ fetch_archive_close(struct archive *a, void *client_data)
|
|||||||
|
|
||||||
(void)a;
|
(void)a;
|
||||||
|
|
||||||
if (f->fetch != NULL)
|
if (f->fetch != NULL) {
|
||||||
|
xbps_dbg_printf("%s: closing connection to `%s'...\n",
|
||||||
|
__func__, f->url->host);
|
||||||
fetchIO_close(f->fetch);
|
fetchIO_close(f->fetch);
|
||||||
|
}
|
||||||
free(f);
|
free(f);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user