diff options
author | Steve Block <steveblock@google.com> | 2012-01-06 14:13:42 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2012-01-08 11:03:26 +0000 |
commit | 01dda204cd28fe181691b4a44a51be7e5666d0c8 (patch) | |
tree | 99ef6d14b55ebf4e2752cd182052caad6eddc20a /nexus | |
parent | 36afde3387fff9eac0e6d54854b8d43fe1ebb0cc (diff) | |
download | system_core-01dda204cd28fe181691b4a44a51be7e5666d0c8.zip system_core-01dda204cd28fe181691b4a44a51be7e5666d0c8.tar.gz system_core-01dda204cd28fe181691b4a44a51be7e5666d0c8.tar.bz2 |
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
Bug: 5449033
Change-Id: Ibcffdcf620ebae1c389446ce8e9d908f11ac039c
Diffstat (limited to 'nexus')
-rw-r--r-- | nexus/CommandListener.cpp | 2 | ||||
-rw-r--r-- | nexus/Controller.cpp | 2 | ||||
-rw-r--r-- | nexus/DhcpClient.cpp | 8 | ||||
-rw-r--r-- | nexus/NetworkManager.cpp | 2 | ||||
-rw-r--r-- | nexus/OpenVpnController.cpp | 2 | ||||
-rw-r--r-- | nexus/Property.cpp | 24 | ||||
-rw-r--r-- | nexus/PropertyManager.cpp | 18 | ||||
-rw-r--r-- | nexus/Supplicant.cpp | 28 | ||||
-rw-r--r-- | nexus/SupplicantAssociatingEvent.cpp | 6 | ||||
-rw-r--r-- | nexus/SupplicantConnectedEvent.cpp | 4 | ||||
-rw-r--r-- | nexus/SupplicantListener.cpp | 2 | ||||
-rw-r--r-- | nexus/SupplicantStatus.cpp | 2 | ||||
-rw-r--r-- | nexus/TiwlanEventListener.cpp | 4 | ||||
-rw-r--r-- | nexus/TiwlanWifiController.cpp | 12 | ||||
-rw-r--r-- | nexus/WifiController.cpp | 28 | ||||
-rw-r--r-- | nexus/WifiNetwork.cpp | 24 | ||||
-rw-r--r-- | nexus/WifiScanner.cpp | 6 | ||||
-rw-r--r-- | nexus/WifiStatusPoller.cpp | 6 | ||||
-rw-r--r-- | nexus/main.cpp | 6 |
19 files changed, 93 insertions, 93 deletions
diff --git a/nexus/CommandListener.cpp b/nexus/CommandListener.cpp index 5c50acc..7c934a7 100644 --- a/nexus/CommandListener.cpp +++ b/nexus/CommandListener.cpp @@ -218,7 +218,7 @@ int CommandListener::ListCmd::runCommand(SocketClient *cli, int argc, char **arg char *buf; if (asprintf(&buf, "%s %s", (*it), p_v) < 0) { - LOGE("Failed to allocate memory"); + ALOGE("Failed to allocate memory"); free((*it)); continue; } diff --git a/nexus/Controller.cpp b/nexus/Controller.cpp index 4f4c473..dae8783 100644 --- a/nexus/Controller.cpp +++ b/nexus/Controller.cpp @@ -96,7 +96,7 @@ bool Controller::isKernelModuleLoaded(const char *modtag) { FILE *fp = fopen("/proc/modules", "r"); if (!fp) { - LOGE("Unable to open /proc/modules (%s)", strerror(errno)); + ALOGE("Unable to open /proc/modules (%s)", strerror(errno)); return false; } diff --git a/nexus/DhcpClient.cpp b/nexus/DhcpClient.cpp index 02adf91..81fdf47 100644 --- a/nexus/DhcpClient.cpp +++ b/nexus/DhcpClient.cpp @@ -72,7 +72,7 @@ int DhcpClient::start(Controller *c) { sockaddr_in addr; if ((mListenerSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { - LOGE("Failed to create DHCP listener socket"); + ALOGE("Failed to create DHCP listener socket"); pthread_mutex_unlock(&mLock); return -1; } @@ -82,7 +82,7 @@ int DhcpClient::start(Controller *c) { addr.sin_port = htons(DhcpClient::STATUS_MONITOR_PORT); if (bind(mListenerSocket, (struct sockaddr *) &addr, sizeof(addr))) { - LOGE("Failed to bind DHCP listener socket"); + ALOGE("Failed to bind DHCP listener socket"); close(mListenerSocket); mListenerSocket = -1; pthread_mutex_unlock(&mLock); @@ -90,14 +90,14 @@ int DhcpClient::start(Controller *c) { } if (mServiceManager->start(svc)) { - LOGE("Failed to start dhcp service"); + ALOGE("Failed to start dhcp service"); pthread_mutex_unlock(&mLock); return -1; } mListener = new DhcpListener(mController, mListenerSocket, mHandlers); if (mListener->startListener()) { - LOGE("Failed to start listener"); + ALOGE("Failed to start listener"); #if 0 mServiceManager->stop("dhcpcd"); return -1; diff --git a/nexus/NetworkManager.cpp b/nexus/NetworkManager.cpp index 78ccbd8..d4285bf 100644 --- a/nexus/NetworkManager.cpp +++ b/nexus/NetworkManager.cpp @@ -110,7 +110,7 @@ void NetworkManager::onInterfaceConnected(Controller *c) { ALOGD("Controller %s interface %s connected", c->getName(), c->getBoundInterface()); if (mDhcp->start(c)) { - LOGE("Failed to start DHCP (%s)", strerror(errno)); + ALOGE("Failed to start DHCP (%s)", strerror(errno)); return; } } diff --git a/nexus/OpenVpnController.cpp b/nexus/OpenVpnController.cpp index f1ea510..6b6d892 100644 --- a/nexus/OpenVpnController.cpp +++ b/nexus/OpenVpnController.cpp @@ -53,7 +53,7 @@ int OpenVpnController::enable() { char tmp[64]; if (!mPropMngr->get("vpn.gateway", tmp, sizeof(tmp))) { - LOGE("Error reading property 'vpn.gateway' (%s)", strerror(errno)); + ALOGE("Error reading property 'vpn.gateway' (%s)", strerror(errno)); return -1; } snprintf(svc, sizeof(svc), "openvpn:--remote %s 1194", tmp); diff --git a/nexus/Property.cpp b/nexus/Property.cpp index 821d22f..6cfa955 100644 --- a/nexus/Property.cpp +++ b/nexus/Property.cpp @@ -38,22 +38,22 @@ StringProperty::StringProperty(const char *name, bool ro, int elements) : Property(name, ro, Property::Type_STRING, elements) { } int StringProperty::set(int idx, int value) { - LOGE("Integer 'set' called on string property!"); + ALOGE("Integer 'set' called on string property!"); errno = EINVAL; return -1; } int StringProperty::set(int idx, struct in_addr *value) { - LOGE("IpAddr 'set' called on string property!"); + ALOGE("IpAddr 'set' called on string property!"); errno = EINVAL; return -1; } int StringProperty::get(int idx, int *buffer) { - LOGE("Integer 'get' called on string property!"); + ALOGE("Integer 'get' called on string property!"); errno = EINVAL; return -1; } int StringProperty::get(int idx, struct in_addr *buffer) { - LOGE("IpAddr 'get' called on string property!"); + ALOGE("IpAddr 'get' called on string property!"); errno = EINVAL; return -1; } @@ -90,22 +90,22 @@ IntegerProperty::IntegerProperty(const char *name, bool ro, int elements) : } int IntegerProperty::set(int idx, const char *value) { - LOGE("String 'set' called on integer property!"); + ALOGE("String 'set' called on integer property!"); errno = EINVAL; return -1; } int IntegerProperty::set(int idx, struct in_addr *value) { - LOGE("IpAddr 'set' called on integer property!"); + ALOGE("IpAddr 'set' called on integer property!"); errno = EINVAL; return -1; } int IntegerProperty::get(int idx, char *buffer, size_t max) { - LOGE("String 'get' called on integer property!"); + ALOGE("String 'get' called on integer property!"); errno = EINVAL; return -1; } int IntegerProperty::get(int idx, struct in_addr *buffer) { - LOGE("IpAddr 'get' called on integer property!"); + ALOGE("IpAddr 'get' called on integer property!"); errno = EINVAL; return -1; } @@ -141,22 +141,22 @@ IPV4AddressProperty::IPV4AddressProperty(const char *name, bool ro, int elements } int IPV4AddressProperty::set(int idx, const char *value) { - LOGE("String 'set' called on ipv4 property!"); + ALOGE("String 'set' called on ipv4 property!"); errno = EINVAL; return -1; } int IPV4AddressProperty::set(int idx, int value) { - LOGE("Integer 'set' called on ipv4 property!"); + ALOGE("Integer 'set' called on ipv4 property!"); errno = EINVAL; return -1; } int IPV4AddressProperty::get(int idx, char *buffer, size_t max) { - LOGE("String 'get' called on ipv4 property!"); + ALOGE("String 'get' called on ipv4 property!"); errno = EINVAL; return -1; } int IPV4AddressProperty::get(int idx, int *buffer) { - LOGE("Integer 'get' called on ipv4 property!"); + ALOGE("Integer 'get' called on ipv4 property!"); errno = EINVAL; return -1; } diff --git a/nexus/PropertyManager.cpp b/nexus/PropertyManager.cpp index 1caaba6..41cdb41 100644 --- a/nexus/PropertyManager.cpp +++ b/nexus/PropertyManager.cpp @@ -77,7 +77,7 @@ int PropertyManager::attachProperty(const char *ns_name, Property *p) { if (lookupProperty_UNLOCKED(ns, p->getName())) { errno = EADDRINUSE; pthread_mutex_unlock(&mLock); - LOGE("Failed to register property %s.%s (%s)", + ALOGE("Failed to register property %s.%s (%s)", ns_name, p->getName(), strerror(errno)); return -1; } @@ -94,7 +94,7 @@ int PropertyManager::detachProperty(const char *ns_name, Property *p) { pthread_mutex_lock(&mLock); if (!(ns = lookupNamespace_UNLOCKED(ns_name))) { pthread_mutex_unlock(&mLock); - LOGE("Namespace '%s' not found", ns_name); + ALOGE("Namespace '%s' not found", ns_name); return -1; } @@ -110,7 +110,7 @@ int PropertyManager::detachProperty(const char *ns_name, Property *p) { } } - LOGE("Property %s.%s not found", ns_name, p->getName()); + ALOGE("Property %s.%s not found", ns_name, p->getName()); pthread_mutex_unlock(&mLock); errno = ENOENT; return -1; @@ -130,7 +130,7 @@ int PropertyManager::doSet(Property *p, int idx, const char *value) { errno = 0; tmp = strtol(value, (char **) NULL, 10); if (errno) { - LOGE("Failed to convert '%s' to int", value); + ALOGE("Failed to convert '%s' to int", value); errno = EINVAL; return -1; } @@ -138,13 +138,13 @@ int PropertyManager::doSet(Property *p, int idx, const char *value) { } else if (p->getType() == Property::Type_IPV4) { struct in_addr tmp; if (!inet_aton(value, &tmp)) { - LOGE("Failed to convert '%s' to ipv4", value); + ALOGE("Failed to convert '%s' to ipv4", value); errno = EINVAL; return -1; } return p->set(idx, &tmp); } else { - LOGE("Property '%s' has an unknown type (%d)", p->getName(), + ALOGE("Property '%s' has an unknown type (%d)", p->getName(), p->getType()); errno = EINVAL; return -1; @@ -179,7 +179,7 @@ int PropertyManager::doGet(Property *p, int idx, char *buffer, size_t max) { } strncpy(buffer, inet_ntoa(tmp), max); } else { - LOGE("Property '%s' has an unknown type (%d)", p->getName(), + ALOGE("Property '%s' has an unknown type (%d)", p->getName(), p->getType()); errno = EINVAL; return -1; @@ -215,7 +215,7 @@ int PropertyManager::set(const char *name, const char *value) { } } - LOGE("Property %s not found", name); + ALOGE("Property %s not found", name); pthread_mutex_unlock(&mLock); errno = ENOENT; return -1; @@ -246,7 +246,7 @@ const char *PropertyManager::get(const char *name, char *buffer, size_t max) { } } - LOGE("Property %s not found", name); + ALOGE("Property %s not found", name); pthread_mutex_unlock(&mLock); errno = ENOENT; return NULL; diff --git a/nexus/Supplicant.cpp b/nexus/Supplicant.cpp index f5298f7..b604698 100644 --- a/nexus/Supplicant.cpp +++ b/nexus/Supplicant.cpp @@ -68,18 +68,18 @@ int Supplicant::start() { } if (mServiceManager->start(SUPPLICANT_SERVICE_NAME)) { - LOGE("Error starting supplicant (%s)", strerror(errno)); + ALOGE("Error starting supplicant (%s)", strerror(errno)); return -1; } wpa_ctrl_cleanup(); if (connectToSupplicant()) { - LOGE("Error connecting to supplicant (%s)\n", strerror(errno)); + ALOGE("Error connecting to supplicant (%s)\n", strerror(errno)); return -1; } if (retrieveInterfaceName()) { - LOGE("Error retrieving interface name (%s)\n", strerror(errno)); + ALOGE("Error retrieving interface name (%s)\n", strerror(errno)); return -1; } @@ -247,7 +247,7 @@ int Supplicant::connectToSupplicant() { mCtrl = wpa_ctrl_open("tiwlan0"); // XXX: if (mCtrl == NULL) { - LOGE("Unable to open connection to supplicant on \"%s\": %s", + ALOGE("Unable to open connection to supplicant on \"%s\": %s", "tiwlan0", strerror(errno)); return -1; } @@ -267,7 +267,7 @@ int Supplicant::connectToSupplicant() { mListener = new SupplicantListener(mHandlers, mMonitor); if (mListener->startListener()) { - LOGE("Error - unable to start supplicant listener"); + ALOGE("Error - unable to start supplicant listener"); stop(); return -1; } @@ -311,7 +311,7 @@ int Supplicant::getRssi(int *buffer) { char *s; for (int i = 0; i < 3; i++) { if (!(s = strsep(&next, " "))) { - LOGE("Error parsing RSSI"); + ALOGE("Error parsing RSSI"); errno = EIO; return -1; } @@ -333,13 +333,13 @@ int Supplicant::getLinkSpeed() { char *s; if (!(s = strsep(&next, " "))) { - LOGE("Error parsing LINKSPEED"); + ALOGE("Error parsing LINKSPEED"); errno = EIO; return -1; } if (!(s = strsep(&next, " "))) { - LOGE("Error parsing LINKSPEED"); + ALOGE("Error parsing LINKSPEED"); errno = EIO; return -1; } @@ -452,26 +452,26 @@ int Supplicant::setupConfig() { if (access(SUPP_CONFIG_FILE, R_OK|W_OK) == 0) { return 0; } else if (errno != ENOENT) { - LOGE("Cannot access \"%s\": %s", SUPP_CONFIG_FILE, strerror(errno)); + ALOGE("Cannot access \"%s\": %s", SUPP_CONFIG_FILE, strerror(errno)); return -1; } srcfd = open(SUPP_CONFIG_TEMPLATE, O_RDONLY); if (srcfd < 0) { - LOGE("Cannot open \"%s\": %s", SUPP_CONFIG_TEMPLATE, strerror(errno)); + ALOGE("Cannot open \"%s\": %s", SUPP_CONFIG_TEMPLATE, strerror(errno)); return -1; } destfd = open(SUPP_CONFIG_FILE, O_CREAT|O_WRONLY, 0660); if (destfd < 0) { close(srcfd); - LOGE("Cannot create \"%s\": %s", SUPP_CONFIG_FILE, strerror(errno)); + ALOGE("Cannot create \"%s\": %s", SUPP_CONFIG_FILE, strerror(errno)); return -1; } while ((nread = read(srcfd, buf, sizeof(buf))) != 0) { if (nread < 0) { - LOGE("Error reading \"%s\": %s", SUPP_CONFIG_TEMPLATE, strerror(errno)); + ALOGE("Error reading \"%s\": %s", SUPP_CONFIG_TEMPLATE, strerror(errno)); close(srcfd); close(destfd); unlink(SUPP_CONFIG_FILE); @@ -484,7 +484,7 @@ int Supplicant::setupConfig() { close(srcfd); if (chown(SUPP_CONFIG_FILE, AID_SYSTEM, AID_WIFI) < 0) { - LOGE("Error changing group ownership of %s to %d: %s", + ALOGE("Error changing group ownership of %s to %d: %s", SUPP_CONFIG_FILE, AID_WIFI, strerror(errno)); unlink(SUPP_CONFIG_FILE); return -1; @@ -507,7 +507,7 @@ int Supplicant::setNetworkVar(int networkId, const char *var, const char *val) { len = sizeof(reply) -1; if (sendCommand("SAVE_CONFIG", reply, &len)) { - LOGE("Error saving config after %s = %s", var, val); + ALOGE("Error saving config after %s = %s", var, val); return -1; } return 0; diff --git a/nexus/SupplicantAssociatingEvent.cpp b/nexus/SupplicantAssociatingEvent.cpp index c6e9fe3..8fe502e 100644 --- a/nexus/SupplicantAssociatingEvent.cpp +++ b/nexus/SupplicantAssociatingEvent.cpp @@ -46,7 +46,7 @@ SupplicantAssociatingEvent::SupplicantAssociatingEvent(int level, char *event, // p char *q = index(p, '\''); if (!q) { - LOGE("Unable to decode SSID (p = {%s})\n", p); + ALOGE("Unable to decode SSID (p = {%s})\n", p); return; } mSsid = (char *) malloc((q - p) +1); @@ -59,7 +59,7 @@ SupplicantAssociatingEvent::SupplicantAssociatingEvent(int level, char *event, // ^ // p if (!(q = index(p, ' '))) { - LOGE("Unable to decode frequency\n"); + ALOGE("Unable to decode frequency\n"); return; } *q = '\0'; @@ -73,7 +73,7 @@ SupplicantAssociatingEvent::SupplicantAssociatingEvent(int level, char *event, char *q = index(p, '\''); if (!q) { - LOGE("Unable to decode SSID (p = {%s})\n", p); + ALOGE("Unable to decode SSID (p = {%s})\n", p); return; } mSsid = (char *) malloc((q - p) +1); diff --git a/nexus/SupplicantConnectedEvent.cpp b/nexus/SupplicantConnectedEvent.cpp index e58bab2..107c766 100644 --- a/nexus/SupplicantConnectedEvent.cpp +++ b/nexus/SupplicantConnectedEvent.cpp @@ -42,9 +42,9 @@ SupplicantConnectedEvent::SupplicantConnectedEvent(int level, char *event, else mReassociated = true; } else - LOGE("Unable to decode re-assocation"); + ALOGE("Unable to decode re-assocation"); } else - LOGE("Unable to decode event"); + ALOGE("Unable to decode event"); } SupplicantConnectedEvent::SupplicantConnectedEvent(const char *bssid, diff --git a/nexus/SupplicantListener.cpp b/nexus/SupplicantListener.cpp index b59a7a8..421d84d 100644 --- a/nexus/SupplicantListener.cpp +++ b/nexus/SupplicantListener.cpp @@ -48,7 +48,7 @@ bool SupplicantListener::onDataAvailable(SocketClient *cli) { size_t nread = buflen - 1; if ((rc = wpa_ctrl_recv(mMonitor, buf, &nread))) { - LOGE("wpa_ctrl_recv failed (%s)", strerror(errno)); + ALOGE("wpa_ctrl_recv failed (%s)", strerror(errno)); return false; } diff --git a/nexus/SupplicantStatus.cpp b/nexus/SupplicantStatus.cpp index 7868264..8f28abe 100644 --- a/nexus/SupplicantStatus.cpp +++ b/nexus/SupplicantStatus.cpp @@ -81,7 +81,7 @@ SupplicantStatus *SupplicantStatus::createStatus(char *data, int len) { else if (!strcmp(value, "IDLE")) state = SupplicantState::IDLE; else - LOGE("Unknown supplicant state '%s'", value); + ALOGE("Unknown supplicant state '%s'", value); } else ALOGD("Ignoring unsupported status token '%s'", token); } diff --git a/nexus/TiwlanEventListener.cpp b/nexus/TiwlanEventListener.cpp index 4851e28..fde3a44 100644 --- a/nexus/TiwlanEventListener.cpp +++ b/nexus/TiwlanEventListener.cpp @@ -33,12 +33,12 @@ bool TiwlanEventListener::onDataAvailable(SocketClient *cli) { struct ipc_ev_data *data; if (!(data = (struct ipc_ev_data *) malloc(sizeof(struct ipc_ev_data)))) { - LOGE("Failed to allocate packet (out of memory)"); + ALOGE("Failed to allocate packet (out of memory)"); return true; } if (recv(cli->getSocket(), data, sizeof(struct ipc_ev_data), 0) < 0) { - LOGE("recv failed (%s)", strerror(errno)); + ALOGE("recv failed (%s)", strerror(errno)); goto out; } diff --git a/nexus/TiwlanWifiController.cpp b/nexus/TiwlanWifiController.cpp index 311bf16..76b6a2e 100644 --- a/nexus/TiwlanWifiController.cpp +++ b/nexus/TiwlanWifiController.cpp @@ -84,14 +84,14 @@ int TiwlanWifiController::loadFirmware() { return 0; } else if (!strcmp(DRIVER_PROP_NAME, "failed")) { - LOGE("Firmware load failed"); + ALOGE("Firmware load failed"); return -1; } } usleep(200000); } property_set(DRIVER_PROP_NAME, "timeout"); - LOGE("Firmware load timed out"); + ALOGE("Firmware load timed out"); return -1; } @@ -99,13 +99,13 @@ int TiwlanWifiController::startDriverEventListener() { struct sockaddr_in addr; if (mListenerSock != -1) { - LOGE("Listener already started!"); + ALOGE("Listener already started!"); errno = EBUSY; return -1; } if ((mListenerSock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { - LOGE("socket failed (%s)", strerror(errno)); + ALOGE("socket failed (%s)", strerror(errno)); return -1; } @@ -117,14 +117,14 @@ int TiwlanWifiController::startDriverEventListener() { if (bind(mListenerSock, (struct sockaddr *) &addr, sizeof(addr)) < 0) { - LOGE("bind failed (%s)", strerror(errno)); + ALOGE("bind failed (%s)", strerror(errno)); goto out_err; } mEventListener = new TiwlanEventListener(mListenerSock); if (mEventListener->startListener()) { - LOGE("Error starting driver listener (%s)", strerror(errno)); + ALOGE("Error starting driver listener (%s)", strerror(errno)); goto out_err; } return 0; diff --git a/nexus/WifiController.cpp b/nexus/WifiController.cpp index e11f668..cedd013 100644 --- a/nexus/WifiController.cpp +++ b/nexus/WifiController.cpp @@ -111,7 +111,7 @@ int WifiController::enable() { ALOGI("Powering up"); sendStatusBroadcast("Powering up WiFi hardware"); if (powerUp()) { - LOGE("Powerup failed (%s)", strerror(errno)); + ALOGE("Powerup failed (%s)", strerror(errno)); return -1; } } @@ -120,7 +120,7 @@ int WifiController::enable() { ALOGI("Loading driver"); sendStatusBroadcast("Loading WiFi driver"); if (loadKernelModule(mModulePath, mModuleArgs)) { - LOGE("Kernel module load failed (%s)", strerror(errno)); + ALOGE("Kernel module load failed (%s)", strerror(errno)); goto out_powerdown; } } @@ -129,7 +129,7 @@ int WifiController::enable() { ALOGI("Loading firmware"); sendStatusBroadcast("Loading WiFI firmware"); if (loadFirmware()) { - LOGE("Firmware load failed (%s)", strerror(errno)); + ALOGE("Firmware load failed (%s)", strerror(errno)); goto out_powerdown; } } @@ -138,13 +138,13 @@ int WifiController::enable() { ALOGI("Starting WPA Supplicant"); sendStatusBroadcast("Starting WPA Supplicant"); if (mSupplicant->start()) { - LOGE("Supplicant start failed (%s)", strerror(errno)); + ALOGE("Supplicant start failed (%s)", strerror(errno)); goto out_unloadmodule; } } if (Controller::bindInterface(mSupplicant->getInterfaceName())) { - LOGE("Error binding interface (%s)", strerror(errno)); + ALOGE("Error binding interface (%s)", strerror(errno)); goto out_unloadmodule; } @@ -173,13 +173,13 @@ int WifiController::enable() { out_unloadmodule: if (mModuleName[0] != '\0' && !isKernelModuleLoaded(mModuleName)) { if (unloadKernelModule(mModuleName)) { - LOGE("Unable to unload module after failure!"); + ALOGE("Unable to unload module after failure!"); } } out_powerdown: if (powerDown()) { - LOGE("Unable to powerdown after failure!"); + ALOGE("Unable to powerdown after failure!"); } return -1; } @@ -218,7 +218,7 @@ int WifiController::setSuspend(bool suspend) { ALOGD("Stopping Supplicant driver"); if (mSupplicant->stopDriver()) { - LOGE("Error stopping driver (%s)", strerror(errno)); + ALOGE("Error stopping driver (%s)", strerror(errno)); pthread_mutex_unlock(&mLock); return -1; } @@ -226,7 +226,7 @@ int WifiController::setSuspend(bool suspend) { ALOGD("Resuming"); if (mSupplicant->startDriver()) { - LOGE("Error resuming driver (%s)", strerror(errno)); + ALOGE("Error resuming driver (%s)", strerror(errno)); pthread_mutex_unlock(&mLock); return -1; } @@ -269,7 +269,7 @@ int WifiController::disable() { if (mSupplicant->isStarted()) { sendStatusBroadcast("Stopping WPA Supplicant"); if (mSupplicant->stop()) { - LOGE("Supplicant stop failed (%s)", strerror(errno)); + ALOGE("Supplicant stop failed (%s)", strerror(errno)); return -1; } } else @@ -278,7 +278,7 @@ int WifiController::disable() { if (mModuleName[0] != '\0' && isKernelModuleLoaded(mModuleName)) { sendStatusBroadcast("Unloading WiFi driver"); if (unloadKernelModule(mModuleName)) { - LOGE("Unable to unload module (%s)", strerror(errno)); + ALOGE("Unable to unload module (%s)", strerror(errno)); return -1; } } @@ -286,7 +286,7 @@ int WifiController::disable() { if (isPoweredUp()) { sendStatusBroadcast("Powering down WiFi hardware"); if (powerDown()) { - LOGE("Powerdown failed (%s)", strerror(errno)); + ALOGE("Powerdown failed (%s)", strerror(errno)); return -1; } } @@ -470,7 +470,7 @@ void WifiController::onScanResultsEvent(SupplicantScanResultsEvent *evt) { char *reply; if (!(reply = (char *) malloc(4096))) { - LOGE("Out of memory"); + ALOGE("Out of memory"); return; } @@ -609,7 +609,7 @@ void WifiController::onStatusPollInterval() { pthread_mutex_lock(&mLock); int rssi; if (mSupplicant->getRssi(&rssi)) { - LOGE("Failed to get rssi (%s)", strerror(errno)); + ALOGE("Failed to get rssi (%s)", strerror(errno)); pthread_mutex_unlock(&mLock); return; } diff --git a/nexus/WifiNetwork.cpp b/nexus/WifiNetwork.cpp index 346c7c2..0197b64 100644 --- a/nexus/WifiNetwork.cpp +++ b/nexus/WifiNetwork.cpp @@ -43,13 +43,13 @@ WifiNetwork::WifiNetwork(WifiController *c, Supplicant *suppl, const char *data) char *flags; if (!(id = strsep(&next, "\t"))) - LOGE("Failed to extract network id"); + ALOGE("Failed to extract network id"); if (!(ssid = strsep(&next, "\t"))) - LOGE("Failed to extract ssid"); + ALOGE("Failed to extract ssid"); if (!(bssid = strsep(&next, "\t"))) - LOGE("Failed to extract bssid"); + ALOGE("Failed to extract bssid"); if (!(flags = strsep(&next, "\t"))) - LOGE("Failed to extract flags"); + ALOGE("Failed to extract flags"); // ALOGD("id '%s', ssid '%s', bssid '%s', flags '%s'", id, ssid, bssid, // flags ? flags :"null"); @@ -215,7 +215,7 @@ int WifiNetwork::refresh() { len = sizeof(buffer); if (mSuppl->getNetworkVar(mNetid, "key_mgmt", buffer, len)) { if (WifiNetwork::parseKeyManagementMask(buffer, &mask)) { - LOGE("Error parsing key_mgmt (%s)", strerror(errno)); + ALOGE("Error parsing key_mgmt (%s)", strerror(errno)); } else { mKeyManagement = mask; } @@ -224,7 +224,7 @@ int WifiNetwork::refresh() { len = sizeof(buffer); if (mSuppl->getNetworkVar(mNetid, "proto", buffer, len)) { if (WifiNetwork::parseProtocolsMask(buffer, &mask)) { - LOGE("Error parsing proto (%s)", strerror(errno)); + ALOGE("Error parsing proto (%s)", strerror(errno)); } else { mProtocols = mask; } @@ -233,7 +233,7 @@ int WifiNetwork::refresh() { len = sizeof(buffer); if (mSuppl->getNetworkVar(mNetid, "auth_alg", buffer, len)) { if (WifiNetwork::parseAuthAlgorithmsMask(buffer, &mask)) { - LOGE("Error parsing auth_alg (%s)", strerror(errno)); + ALOGE("Error parsing auth_alg (%s)", strerror(errno)); } else { mAuthAlgorithms = mask; } @@ -242,7 +242,7 @@ int WifiNetwork::refresh() { len = sizeof(buffer); if (mSuppl->getNetworkVar(mNetid, "pairwise", buffer, len)) { if (WifiNetwork::parsePairwiseCiphersMask(buffer, &mask)) { - LOGE("Error parsing pairwise (%s)", strerror(errno)); + ALOGE("Error parsing pairwise (%s)", strerror(errno)); } else { mPairwiseCiphers = mask; } @@ -251,7 +251,7 @@ int WifiNetwork::refresh() { len = sizeof(buffer); if (mSuppl->getNetworkVar(mNetid, "group", buffer, len)) { if (WifiNetwork::parseGroupCiphersMask(buffer, &mask)) { - LOGE("Error parsing group (%s)", strerror(errno)); + ALOGE("Error parsing group (%s)", strerror(errno)); } else { mGroupCiphers = mask; } @@ -259,7 +259,7 @@ int WifiNetwork::refresh() { return 0; out_err: - LOGE("Refresh failed (%s)",strerror(errno)); + ALOGE("Refresh failed (%s)",strerror(errno)); return -1; } @@ -453,12 +453,12 @@ int WifiNetwork::setEnabled(bool enabled) { if (enabled) { if (getPriority() == -1) { - LOGE("Cannot enable network when priority is not set"); + ALOGE("Cannot enable network when priority is not set"); errno = EAGAIN; return -1; } if (getKeyManagement() == KeyManagementMask::UNKNOWN) { - LOGE("Cannot enable network when KeyManagement is not set"); + ALOGE("Cannot enable network when KeyManagement is not set"); errno = EAGAIN; return -1; } diff --git a/nexus/WifiScanner.cpp b/nexus/WifiScanner.cpp index 9854ddc..4c956ac 100644 --- a/nexus/WifiScanner.cpp +++ b/nexus/WifiScanner.cpp @@ -58,13 +58,13 @@ int WifiScanner::stop() { char c = 0; if (write(mCtrlPipe[1], &c, 1) != 1) { - LOGE("Error writing to control pipe (%s)", strerror(errno)); + ALOGE("Error writing to control pipe (%s)", strerror(errno)); return -1; } void *ret; if (pthread_join(mThread, &ret)) { - LOGE("Error joining to scanner thread (%s)", strerror(errno)); + ALOGE("Error joining to scanner thread (%s)", strerror(errno)); return -1; } @@ -92,7 +92,7 @@ void WifiScanner::run() { } if ((rc = select(mCtrlPipe[0] + 1, &read_fds, NULL, NULL, &to)) < 0) { - LOGE("select failed (%s) - sleeping for one scanner period", strerror(errno)); + ALOGE("select failed (%s) - sleeping for one scanner period", strerror(errno)); sleep(mPeriod); continue; } else if (!rc) { diff --git a/nexus/WifiStatusPoller.cpp b/nexus/WifiStatusPoller.cpp index e938fd0..015af5d 100644 --- a/nexus/WifiStatusPoller.cpp +++ b/nexus/WifiStatusPoller.cpp @@ -50,13 +50,13 @@ int WifiStatusPoller::stop() { char c = 0; if (write(mCtrlPipe[1], &c, 1) != 1) { - LOGE("Error writing to control pipe (%s)", strerror(errno)); + ALOGE("Error writing to control pipe (%s)", strerror(errno)); return -1; } void *ret; if (pthread_join(mThread, &ret)) { - LOGE("Error joining to listener thread (%s)", strerror(errno)); + ALOGE("Error joining to listener thread (%s)", strerror(errno)); return -1; } close(mCtrlPipe[0]); @@ -92,7 +92,7 @@ void WifiStatusPoller::run() { max = mCtrlPipe[0]; if ((rc = select(max + 1, &read_fds, NULL, NULL, &to)) < 0) { - LOGE("select failed (%s)", strerror(errno)); + ALOGE("select failed (%s)", strerror(errno)); sleep(1); continue; } else if (!rc) { diff --git a/nexus/main.cpp b/nexus/main.cpp index 5d21067..7d2af02 100644 --- a/nexus/main.cpp +++ b/nexus/main.cpp @@ -34,7 +34,7 @@ int main() { NetworkManager *nm; if (!(nm = NetworkManager::Instance())) { - LOGE("Unable to create NetworkManager"); + ALOGE("Unable to create NetworkManager"); exit (-1); }; @@ -47,12 +47,12 @@ int main() { if (NetworkManager::Instance()->run()) { - LOGE("Unable to Run NetworkManager (%s)", strerror(errno)); + ALOGE("Unable to Run NetworkManager (%s)", strerror(errno)); exit (1); } if (cl->startListener()) { - LOGE("Unable to start CommandListener (%s)", strerror(errno)); + ALOGE("Unable to start CommandListener (%s)", strerror(errno)); exit (1); } |