diff options
| author | 2025-01-17 12:12:01 -0500 | |
|---|---|---|
| committer | 2025-01-17 12:12:01 -0500 | |
| commit | 37684729283f62fd7f1e74bc2b318dc9ad2cb695 (patch) | |
| tree | 2f5be73bf64ac6573e35e8f499515659472a14c9 /src/cache | |
| parent | d1f1eb9b3713a450c0736caad17febae0721af4d (diff) | |
| download | camu-37684729283f62fd7f1e74bc2b318dc9ad2cb695.tar.gz camu-37684729283f62fd7f1e74bc2b318dc9ad2cb695.tar.bz2 camu-37684729283f62fd7f1e74bc2b318dc9ad2cb695.zip | |
Account for dependency changes, platform testing
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/cache')
| -rw-r--r-- | src/cache/backings/file_common.c | 2 | ||||
| -rw-r--r-- | src/cache/handlers/cdio.c | 2 | ||||
| -rw-r--r-- | src/cache/handlers/http.c | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/cache/backings/file_common.c b/src/cache/backings/file_common.c index 3914f95..0ee2574 100644 --- a/src/cache/backings/file_common.c +++ b/src/cache/backings/file_common.c @@ -9,7 +9,7 @@ static off_t file_backing_get_size_estimate(struct cch_backing *backing) static bool file_open_internal(struct cch_backing_file *file, str *path, size_t size) { - s32 flags = size != 0 ? NNWT_FILE_CREATE : 0; + s32 flags = size != 0 ? NNWT_FILE_CREATE : NNWT_FILE_READONLY; if (!nn_file_open(&file->file, path, flags)) return false; file->filesize = nn_file_get_filesize(&file->file); if (!size) { diff --git a/src/cache/handlers/cdio.c b/src/cache/handlers/cdio.c index ffaaa62..ac90c03 100644 --- a/src/cache/handlers/cdio.c +++ b/src/cache/handlers/cdio.c @@ -184,7 +184,7 @@ static bool open_cd_drive(struct cch_handler_cdio *cdio) struct cch_entry *cch_handler_cdio_create(void) { - struct cch_backing *backing = cch_backing_file_create(al_str_c("/tmp/camu_cd_data"), 4096); + struct cch_backing *backing = cch_backing_file_create(&al_str_c("/tmp/camu_cd_data"), 4096); if (!backing) return NULL; struct cch_handler_cdio *cdio = al_alloc_object(struct cch_handler_cdio); cdio->backing = backing; diff --git a/src/cache/handlers/http.c b/src/cache/handlers/http.c index b5f2504..3bbb751 100644 --- a/src/cache/handlers/http.c +++ b/src/cache/handlers/http.c @@ -8,7 +8,7 @@ #include "http.h" -#define USER_AGENT al_str_c("Mozilla/5.0 (Windows NT 10.0; rv:122.0) Gecko/20100101 Firefox/122.0") +static str USER_AGENT = al_str_c("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0"); static bool handler_http_can_seek(struct cch_handler *handler) { @@ -70,8 +70,9 @@ static void handler_http_maybe_spawn_worker(struct cch_handler *handler, size_t struct nn_http *request = &al_array_last(http->requests); nn_http_init(request); nn_http_set_url(request, &http->url); - nn_http_set_user_agent(request, USER_AGENT); + nn_http_set_user_agent(request, &USER_AGENT); nn_http_request_stream(request, NNWT_HTTP_GET, http->loop, http_callback, http); + al_log_debug("cache_handler_http", "Spawning worker for %.*s.", al_str_fmt(&http->url)); } static bool handler_http_wait_for_range(struct cch_handler *handler, struct cch_handler_wait *wait) |