#define DISCONNECT_TIMER 2
#define DISCOVERY_TIMER 2
-#define INFO_PATH STORAGEDIR "/%s/%s/info"
-#define CACHE_PATH STORAGEDIR "/%s/cache/%s"
-
struct btd_disconnect_data {
guint id;
disconnect_watch watch;
ba2str(adapter_get_address(device->adapter), adapter_addr);
ba2str(&device->bdaddr, device_addr);
- snprintf(filename, PATH_MAX, INFO_PATH, adapter_addr, device_addr);
+ snprintf(filename, PATH_MAX, STORAGEDIR "/%s/%s/info", adapter_addr,
+ device_addr);
filename[PATH_MAX] = '\0';
create_file(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
char *str = NULL;
int len;
- snprintf(filename, PATH_MAX, CACHE_PATH, local, peer);
+ snprintf(filename, PATH_MAX, STORAGEDIR "/%s/cache/%s", local, peer);
filename[PATH_MAX] = '\0';
key_file = g_key_file_new();
char *str;
gboolean store_needed = FALSE;
- snprintf(filename, PATH_MAX, INFO_PATH, local, peer);
+ snprintf(filename, PATH_MAX, STORAGEDIR "/%s/%s/info", local, peer);
filename[PATH_MAX] = '\0';
key_file = g_key_file_new();