hotspot: Use storage_get_hotspot_path to get storage directory

This commit is contained in:
Marcel Holtmann 2019-09-08 19:20:37 +02:00
parent 8706be6698
commit 58d5fdf6c4
1 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,6 @@
#include "src/storage.h"
static struct l_dir_watch *hs20_dir_watch;
static const char *hs20_dir = DAEMON_STORAGEDIR "/hotspot";
static struct l_queue *hs20_settings;
struct hs20_config {
@ -354,7 +353,7 @@ static void hs20_dir_watch_cb(const char *filename,
if (!filename)
return;
full_path = l_strdup_printf("%s/%s", hs20_dir, filename);
full_path = storage_get_hotspot_path("%s", filename);
switch (event) {
case L_DIR_WATCH_EVENT_CREATED:
@ -438,6 +437,8 @@ static int hotspot_init(void)
DIR *dir;
struct dirent *dirent;
L_AUTO_FREE_VAR(char *, hs20_dir) = storage_get_hotspot_path(NULL);
dir = opendir(hs20_dir);
if (!dir)
return -ENOENT;