From 97191d56f1d585a264c9329c380bf57ef3091001 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 7 Mar 2017 12:01:40 -0600 Subject: [PATCH] wiphy: Make sure path is valid DBus has certain rules on what constitutes a valid path. Since the wiphy name is freeform, it is possible to set it such that the contents do not contain a valid path. We fall back to simply using the wiphy index as the path. --- src/wiphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wiphy.c b/src/wiphy.c index 6a751bda..13faafc5 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -108,7 +108,7 @@ const char *wiphy_get_path(struct wiphy *wiphy) { static char path[15]; - snprintf(path, sizeof(path), "/%s", wiphy->name); + snprintf(path, sizeof(path), "/%d", wiphy->id); return path; }