initial commit to the debug branch

This commit is contained in:
Fufu Fang 2024-05-02 05:39:07 +01:00
parent f92fe4232a
commit fa2ebbcd63
No known key found for this signature in database
GPG Key ID: 8A4CB08B0A7E27CE
3 changed files with 8 additions and 2 deletions

View File

@ -138,6 +138,9 @@ fs_readdir(const char *path, void *buf, fuse_fill_dir_t dir_add,
(void) fi;
LinkTable *linktbl;
static int j = 0;
lprintf(debug, "\n!!!!Calling fs_readdir for the %d time!!!!\n", j)
j++;
linktbl = path_to_Link_LinkTable_new(path);
if (!linktbl) {
return -ENOENT;

View File

@ -644,6 +644,9 @@ LinkTable *LinkTable_new(const char *url)
curl_free(unescaped_path);
curl_easy_cleanup(c);
static int i = 0;
lprintf(debug, "\n!!!!Calling LinkTable_new for the %d time!!!!\n", i)
i++;
LinkTable_print(linktbl);
return linktbl;
@ -1074,7 +1077,7 @@ long Link_download(Link *link, char *output_buf, size_t req_size, off_t offset)
header.data = NULL;
if (offset + req_size > link->content_length) {
lprintf(error,
lprintf(info,
"requested size too large, req_size: %lu, recv: %ld, content-length: %ld\n",
req_size, recv, link->content_length);
req_size = link->content_length - offset;

View File

@ -20,7 +20,7 @@ typedef enum {
/**
* \brief The default log level
*/
#define DEFAULT_LOG_LEVEL fatal | error | warning | info
#define DEFAULT_LOG_LEVEL fatal | error | warning | info | debug
/**
* \brief Get the log level from the environment.