Setting it always as the hostname.
---
plugins/wifi.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 9afff4e..7efaa33 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -54,6 +54,7 @@
#include <connman/storage.h>
#include <include/setting.h>
#include <connman/provision.h>
+#include <connman/utsname.h>
#include <gsupplicant/gsupplicant.h>
@@ -1892,13 +1893,23 @@ static void interface_removed(GSupplicantInterface
*interface)
static void p2p_support(GSupplicantInterface *interface)
{
+ const char *hostname;
+
DBG("");
if (!g_supplicant_interface_has_p2p(interface))
return;
- if (connman_technology_driver_register(&p2p_tech_driver) < 0)
+ if (connman_technology_driver_register(&p2p_tech_driver) < 0) {
DBG("Could not register P2P technology driver");
+ return;
+ }
+
+ hostname = connman_utsname_get_hostname();
+ if (!hostname)
+ hostname = "ConnMan";
+
+ g_supplicant_interface_set_p2p_device_config(interface, hostname);
}
static void scan_started(GSupplicantInterface *interface)
--
1.8.5.5
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman