Android-x86
Fork
Spenden

  • R/O
  • HTTP
  • SSH
  • HTTPS

system-netd: Commit

system/netd


Commit MetaInfo

Revisionb2d5c79be85102296325e77d757d7aa6e0bbf805 (tree)
Zeit2017-07-27 01:09:07
AutorNalla Kartheek <karthe@code...>
CommiterDan Pasanen

Log Message

SoftAp: Fix compilation in netd if LIBWPA_CLIENT_EXISTS undefined.

startSoftap has an additional parameter ifname which is used only when
LIBWPA_CLIENT_EXISTS was defined. This shall result into compilation
issues when LIBWPA_CLIENT_EXISTS undefined. Hence keep hostapd_unix_file
variable independent of flag LIBWPA_CLIENT_EXISTS

CRs-Fixed: 1098883
Change-Id: I5577fb171d2d62dbf4c7a9ba945378e0c17d11d4

Ändern Zusammenfassung

Diff

--- a/server/SoftapController.cpp
+++ b/server/SoftapController.cpp
@@ -53,8 +53,8 @@ using android::base::WriteStringToFile;
5353 #include "wpa_ctrl.h"
5454 #endif
5555
56-#ifdef LIBWPA_CLIENT_EXISTS
5756 std:: string hostapd_unix_file(StringPrintf("/data/misc/wifi/hostapd/wlan0"));
57+#ifdef LIBWPA_CLIENT_EXISTS
5858 static const char HOSTAPD_DHCP_DIR[] = "/data/misc/dhcp";
5959 #endif
6060 static const char HOSTAPD_CONF_FILE[] = "/data/misc/wifi/hostapd.conf";
@@ -208,12 +208,12 @@ int SoftapController::startSoftap(bool global_ctrl_iface, SocketClient *socketCl
208208 ALOGE("Cant open %s , check permissions ", HOSTAPD_SOCKETS_DIR);
209209 }
210210 }
211-#ifdef LIBWPA_CLIENT_EXISTS
212- mHostapdFlag = true;
213211 if (ifname != NULL) {
214212 std:: string wbuf(StringPrintf("/data/misc/wifi/hostapd/%s",ifname));
215213 hostapd_unix_file = wbuf;
216214 }
215+#ifdef LIBWPA_CLIENT_EXISTS
216+ mHostapdFlag = true;
217217 if (mSocketClient != NULL) {
218218 if ((mThreadErr = pthread_create(&mThread, NULL, SoftapController::threadStart, this)) != 0) {
219219 ALOGE("pthread_create failed for hostapd listen socket (%s)", strerror(errno));
Show on old repository browser