diff --git a/src/gnss.c b/src/gnss.c index aa1bb6f..2116c18 100644 --- a/src/gnss.c +++ b/src/gnss.c @@ -191,6 +191,8 @@ static void fetch_assistance_data(struct EG25Manager *manager) /* Fetch assistance data with curl */ tmp_file = fdopen(manager->gnss_assistance_fd, "wb+"); + lseek(manager->gnss_assistance_fd, 0, SEEK_SET); + ftruncate(manager->gnss_assistance_fd, 0); url = g_strconcat(manager->gnss_assistance_url, "/", manager->gnss_assistance_file, NULL); curl = curl_easy_init(); diff --git a/src/gnss.h b/src/gnss.h index 1b49403..c3b5553 100644 --- a/src/gnss.h +++ b/src/gnss.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include "manager.h"