فهرست منبع

iwinfo: adjust for changed wpa_supplicant control socket path

Signed-off-by: Jo-Philipp Wich <[email protected]>

SVN-Revision: 40747
Jo-Philipp Wich 12 سال پیش
والد
کامیت
735a03be62
2فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 2 2
      package/network/utils/iwinfo/Makefile
  2. 7 1
      package/network/utils/iwinfo/src/iwinfo_nl80211.c

+ 2 - 2
package/network/utils/iwinfo/Makefile

@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2013 Jo-Philipp Wich <[email protected]>
+# Copyright (C) 2010-2014 Jo-Philipp Wich <[email protected]>
 #
 # This is free software, licensed under the GPL 2 license.
 #
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=47
+PKG_RELEASE:=48
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 PKG_CONFIG_DEPENDS := \

+ 7 - 1
package/network/utils/iwinfo/src/iwinfo_nl80211.c

@@ -526,7 +526,13 @@ static char * nl80211_wpactl_info(const char *ifname, const char *cmd,
 		goto out;
 
 	if (connect(sock, (struct sockaddr *) &remote, remote_length))
-		goto out;
+	{
+		remote_length = sizeof(remote.sun_family) + sprintf(remote.sun_path,
+			"/var/run/wpa_supplicant/%s", ifname);
+
+		if (connect(sock, (struct sockaddr *) &remote, remote_length))
+			goto out;
+	}
 
 	local.sun_family = AF_UNIX;
 	local_length = sizeof(local.sun_family) +