Skip to content
Browse files

Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)

Change-Id: Ib10d100087fd0239c075e1dfee9e77a903c00b4a
  • Loading branch information...
1 parent c6f5342 commit 170fbdad83cba7ec4c67873bbafda389d9bec4cb Steve Block committed
View
136 libril/ril.cpp
@@ -335,12 +335,12 @@ processCommandBuffer(void *buffer, size_t buflen) {
status = p.readInt32 (&token);
if (status != NO_ERROR) {
- LOGE("invalid request block");
+ ALOGE("invalid request block");
return 0;
}
if (request < 1 || request >= (int32_t)NUM_ELEMS(s_commands)) {
- LOGE("unsupported request code %d token %d", request, token);
+ ALOGE("unsupported request code %d token %d", request, token);
// FIXME this should perhaps return a response
return 0;
}
@@ -369,7 +369,7 @@ processCommandBuffer(void *buffer, size_t buflen) {
static void
invalidCommandBlock (RequestInfo *pRI) {
- LOGE("invalid command block for token %d request %s",
+ ALOGE("invalid command block for token %d request %s",
pRI->token, requestToString(pRI->pCI->requestNumber));
}
@@ -1236,7 +1236,7 @@ blockingWrite(int fd, const void *buffer, size_t len) {
if (written >= 0) {
writeOffset += written;
} else { // written < 0
- LOGE ("RIL Response: unexpected error on write errno:%d", errno);
+ ALOGE ("RIL Response: unexpected error on write errno:%d", errno);
close(fd);
return -1;
}
@@ -1256,7 +1256,7 @@ sendResponseRaw (const void *data, size_t dataSize) {
}
if (dataSize > MAX_COMMAND_BYTES) {
- LOGE("RIL: packet larger than %u (%u)",
+ ALOGE("RIL: packet larger than %u (%u)",
MAX_COMMAND_BYTES, (unsigned int )dataSize);
return -1;
@@ -1298,11 +1298,11 @@ responseInts(Parcel &p, void *response, size_t responselen) {
int numInts;
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(int) != 0) {
- LOGE("invalid response length %d expected multiple of %d\n",
+ ALOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof(int));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1336,11 +1336,11 @@ static int responseStrings(Parcel &p, void *response, size_t responselen) {
int numStrings;
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(char *) != 0) {
- LOGE("invalid response length %d expected multiple of %d\n",
+ ALOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof(char *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1391,12 +1391,12 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof (RIL_Call *) != 0) {
- LOGE("invalid response length %d expected multiple of %d\n",
+ ALOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_Call *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1459,12 +1459,12 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) {
static int responseSMS(Parcel &p, void *response, size_t responselen) {
if (response == NULL) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_SMS_Response) ) {
- LOGE("invalid response length %d expected %d",
+ ALOGE("invalid response length %d expected %d",
(int)responselen, (int)sizeof (RIL_SMS_Response));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1486,12 +1486,12 @@ static int responseSMS(Parcel &p, void *response, size_t responselen) {
static int responseDataCallListV4(Parcel &p, void *response, size_t responselen)
{
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(RIL_Data_Call_Response_v4) != 0) {
- LOGE("invalid response length %d expected multiple of %d",
+ ALOGE("invalid response length %d expected multiple of %d",
(int)responselen, (int)sizeof(RIL_Data_Call_Response_v4));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1529,12 +1529,12 @@ static int responseDataCallList(Parcel &p, void *response, size_t responselen)
return responseDataCallListV4(p, response, responselen);
} else {
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(RIL_Data_Call_Response_v6) != 0) {
- LOGE("invalid response length %d expected multiple of %d",
+ ALOGE("invalid response length %d expected multiple of %d",
(int)responselen, (int)sizeof(RIL_Data_Call_Response_v6));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1583,7 +1583,7 @@ static int responseSetupDataCall(Parcel &p, void *response, size_t responselen)
static int responseRaw(Parcel &p, void *response, size_t responselen) {
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL with responselen != 0");
+ ALOGE("invalid response: NULL with responselen != 0");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1601,12 +1601,12 @@ static int responseRaw(Parcel &p, void *response, size_t responselen) {
static int responseSIM_IO(Parcel &p, void *response, size_t responselen) {
if (response == NULL) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_SIM_IO_Response) ) {
- LOGE("invalid response length was %d expected %d",
+ ALOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof (RIL_SIM_IO_Response));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1629,12 +1629,12 @@ static int responseCallForwards(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(RIL_CallForwardInfo *) != 0) {
- LOGE("invalid response length %d expected multiple of %d",
+ ALOGE("invalid response length %d expected multiple of %d",
(int)responselen, (int)sizeof(RIL_CallForwardInfo *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1667,12 +1667,12 @@ static int responseCallForwards(Parcel &p, void *response, size_t responselen) {
static int responseSsn(Parcel &p, void *response, size_t responselen) {
if (response == NULL) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof(RIL_SuppSvcNotification)) {
- LOGE("invalid response length was %d expected %d",
+ ALOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof (RIL_SuppSvcNotification));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1698,12 +1698,12 @@ static int responseCellList(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof (RIL_NeighboringCell *) != 0) {
- LOGE("invalid response length %d expected multiple of %d\n",
+ ALOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_NeighboringCell *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1747,12 +1747,12 @@ static int responseCdmaInformationRecords(Parcel &p,
RIL_CDMA_InformationRecord *infoRec;
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_CDMA_InformationRecords)) {
- LOGE("invalid response length %d expected multiple of %d\n",
+ ALOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_CDMA_InformationRecords *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1772,7 +1772,7 @@ static int responseCdmaInformationRecords(Parcel &p,
case RIL_CDMA_EXTENDED_DISPLAY_INFO_REC:
if (infoRec->rec.display.alpha_len >
CDMA_ALPHA_INFO_BUFFER_LENGTH) {
- LOGE("invalid display info response length %d \
+ ALOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.display.alpha_len,
CDMA_ALPHA_INFO_BUFFER_LENGTH);
@@ -1792,7 +1792,7 @@ static int responseCdmaInformationRecords(Parcel &p,
case RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC:
case RIL_CDMA_CONNECTED_NUMBER_INFO_REC:
if (infoRec->rec.number.len > CDMA_NUMBER_INFO_BUFFER_LENGTH) {
- LOGE("invalid display info response length %d \
+ ALOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.number.len,
CDMA_NUMBER_INFO_BUFFER_LENGTH);
@@ -1829,7 +1829,7 @@ static int responseCdmaInformationRecords(Parcel &p,
case RIL_CDMA_REDIRECTING_NUMBER_INFO_REC:
if (infoRec->rec.redir.redirectingNumber.len >
CDMA_NUMBER_INFO_BUFFER_LENGTH) {
- LOGE("invalid display info response length %d \
+ ALOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.redir.redirectingNumber.len,
CDMA_NUMBER_INFO_BUFFER_LENGTH);
@@ -1884,10 +1884,10 @@ static int responseCdmaInformationRecords(Parcel &p,
break;
case RIL_CDMA_T53_RELEASE_INFO_REC:
// TODO(Moto): See David Krause, he has the answer:)
- LOGE("RIL_CDMA_T53_RELEASE_INFO_REC: return INVALID_RESPONSE");
+ ALOGE("RIL_CDMA_T53_RELEASE_INFO_REC: return INVALID_RESPONSE");
return RIL_ERRNO_INVALID_RESPONSE;
default:
- LOGE("Incorrect name value");
+ ALOGE("Incorrect name value");
return RIL_ERRNO_INVALID_RESPONSE;
}
}
@@ -1899,7 +1899,7 @@ static int responseCdmaInformationRecords(Parcel &p,
static int responseRilSignalStrength(Parcel &p,
void *response, size_t responselen) {
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1946,7 +1946,7 @@ static int responseRilSignalStrength(Parcel &p,
closeResponse;
} else {
- LOGE("invalid response length");
+ ALOGE("invalid response length");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1963,12 +1963,12 @@ static int responseCallRing(Parcel &p, void *response, size_t responselen) {
static int responseCdmaSignalInfoRecord(Parcel &p, void *response, size_t responselen) {
if (response == NULL || responselen == 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_CDMA_SignalInfoRecord)) {
- LOGE("invalid response length %d expected sizeof (RIL_CDMA_SignalInfoRecord) of %d\n",
+ ALOGE("invalid response length %d expected sizeof (RIL_CDMA_SignalInfoRecord) of %d\n",
(int)responselen, (int)sizeof (RIL_CDMA_SignalInfoRecord));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1993,7 +1993,7 @@ static int responseCdmaSignalInfoRecord(Parcel &p, void *response, size_t respon
static int responseCdmaCallWaiting(Parcel &p, void *response,
size_t responselen) {
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2083,7 +2083,7 @@ static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
int i;
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2108,7 +2108,7 @@ static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
sendSimStatusAppInfo(p, p_cur->num_applications, p_cur->applications);
} else {
- LOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected\n");
+ ALOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected\n");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2173,12 +2173,12 @@ static int responseCdmaSms(Parcel &p, void *response, size_t responselen) {
ALOGD("Inside responseCdmaSms");
if (response == NULL && responselen != 0) {
- LOGE("invalid response: NULL");
+ ALOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof(RIL_CDMA_SMS_Message)) {
- LOGE("invalid response length was %d expected %d",
+ ALOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof(RIL_CDMA_SMS_Message));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2287,7 +2287,7 @@ static void processCommandsCallback(int fd, short flags, void *param) {
if (ret == 0 || !(errno == EAGAIN || errno == EINTR)) {
/* fatal error or end-of-stream */
if (ret != 0) {
- LOGE("error on reading command socket errno:%d\n", errno);
+ ALOGE("error on reading command socket errno:%d\n", errno);
} else {
ALOGW("EOS. Closing command socket.");
}
@@ -2359,7 +2359,7 @@ static void listenCallback (int fd, short flags, void *param) {
s_fdCommand = accept(s_fdListen, (sockaddr *) &peeraddr, &socklen);
if (s_fdCommand < 0 ) {
- LOGE("Error on accept() errno:%d", errno);
+ ALOGE("Error on accept() errno:%d", errno);
/* start listening for new connections again */
rilEventAddWakeup(&s_listen_event);
return;
@@ -2380,17 +2380,17 @@ static void listenCallback (int fd, short flags, void *param) {
if (strcmp(pwd->pw_name, PHONE_PROCESS) == 0) {
is_phone_socket = 1;
} else {
- LOGE("RILD can't accept socket from process %s", pwd->pw_name);
+ ALOGE("RILD can't accept socket from process %s", pwd->pw_name);
}
} else {
- LOGE("Error on getpwuid() errno: %d", errno);
+ ALOGE("Error on getpwuid() errno: %d", errno);
}
} else {
ALOGD("Error on getsockopt() errno: %d", errno);
}
if ( !is_phone_socket ) {
- LOGE("RILD must accept socket from %s", PHONE_PROCESS);
+ ALOGE("RILD must accept socket from %s", PHONE_PROCESS);
close(s_fdCommand);
s_fdCommand = -1;
@@ -2406,7 +2406,7 @@ static void listenCallback (int fd, short flags, void *param) {
ret = fcntl(s_fdCommand, F_SETFL, O_NONBLOCK);
if (ret < 0) {
- LOGE ("Error setting O_NONBLOCK errno:%d", errno);
+ ALOGE ("Error setting O_NONBLOCK errno:%d", errno);
}
ALOGI("libril: new connection");
@@ -2446,12 +2446,12 @@ static void debugCallback (int fd, short flags, void *param) {
acceptFD = accept (fd, (sockaddr *) &peeraddr, &socklen);
if (acceptFD < 0) {
- LOGE ("error accepting on debug port: %d\n", errno);
+ ALOGE ("error accepting on debug port: %d\n", errno);
return;
}
if (recv(acceptFD, &number, sizeof(int), 0) != sizeof(int)) {
- LOGE ("error reading on socket: number of Args: \n");
+ ALOGE ("error reading on socket: number of Args: \n");
return;
}
args = (char **) malloc(sizeof(char*) * number);
@@ -2459,7 +2459,7 @@ static void debugCallback (int fd, short flags, void *param) {
for (int i = 0; i < number; i++) {
int len;
if (recv(acceptFD, &len, sizeof(int), 0) != sizeof(int)) {
- LOGE ("error reading on socket: Len of Args: \n");
+ ALOGE ("error reading on socket: Len of Args: \n");
freeDebugCallbackArgs(i, args);
return;
}
@@ -2467,7 +2467,7 @@ static void debugCallback (int fd, short flags, void *param) {
args[i] = (char *) malloc((sizeof(char) * len) + 1);
if (recv(acceptFD, args[i], sizeof(char) * len, 0)
!= (int)sizeof(char) * len) {
- LOGE ("error reading on socket: Args[%d] \n", i);
+ ALOGE ("error reading on socket: Args[%d] \n", i);
freeDebugCallbackArgs(i, args);
return;
}
@@ -2550,7 +2550,7 @@ static void debugCallback (int fd, short flags, void *param) {
sizeof(hangupData));
break;
default:
- LOGE ("Invalid request");
+ ALOGE ("Invalid request");
break;
}
freeDebugCallbackArgs(number, args);
@@ -2592,7 +2592,7 @@ eventLoop(void *param) {
ret = pipe(filedes);
if (ret < 0) {
- LOGE("Error in pipe() errno:%d", errno);
+ ALOGE("Error in pipe() errno:%d", errno);
return NULL;
}
@@ -2608,7 +2608,7 @@ eventLoop(void *param) {
// Only returns on error
ril_event_loop();
- LOGE ("error in event_loop_base errno:%d", errno);
+ ALOGE ("error in event_loop_base errno:%d", errno);
// kill self to restart on error
kill(0, SIGKILL);
@@ -2635,7 +2635,7 @@ RIL_startEventLoop(void) {
pthread_mutex_unlock(&s_startupMutex);
if (ret < 0) {
- LOGE("Failed to create dispatch thread errno:%d", errno);
+ ALOGE("Failed to create dispatch thread errno:%d", errno);
return;
}
}
@@ -2651,23 +2651,23 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
int flags;
if (callbacks == NULL) {
- LOGE("RIL_register: RIL_RadioFunctions * null");
+ ALOGE("RIL_register: RIL_RadioFunctions * null");
return;
}
if (callbacks->version < RIL_VERSION_MIN) {
- LOGE("RIL_register: version %d is to old, min version is %d",
+ ALOGE("RIL_register: version %d is to old, min version is %d",
callbacks->version, RIL_VERSION_MIN);
return;
}
if (callbacks->version > RIL_VERSION) {
- LOGE("RIL_register: version %d is too new, max version is %d",
+ ALOGE("RIL_register: version %d is too new, max version is %d",
callbacks->version, RIL_VERSION);
return;
}
- LOGE("RIL_register: RIL version %d", callbacks->version);
+ ALOGE("RIL_register: RIL version %d", callbacks->version);
if (s_registerCalled > 0) {
- LOGE("RIL_register has been called more than once. "
+ ALOGE("RIL_register has been called more than once. "
"Subsequent call ignored");
return;
}
@@ -2701,7 +2701,7 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM);
if (ret < 0) {
- LOGE("Unable to bind socket errno:%d", errno);
+ ALOGE("Unable to bind socket errno:%d", errno);
exit (-1);
}
s_fdListen = ret;
@@ -2709,14 +2709,14 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
#else
s_fdListen = android_get_control_socket(SOCKET_NAME_RIL);
if (s_fdListen < 0) {
- LOGE("Failed to get socket '" SOCKET_NAME_RIL "'");
+ ALOGE("Failed to get socket '" SOCKET_NAME_RIL "'");
exit(-1);
}
ret = listen(s_fdListen, 4);
if (ret < 0) {
- LOGE("Failed to listen on control socket '%d': %s",
+ ALOGE("Failed to listen on control socket '%d': %s",
s_fdListen, strerror(errno));
exit(-1);
}
@@ -2734,14 +2734,14 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
s_fdDebug = android_get_control_socket(SOCKET_NAME_RIL_DEBUG);
if (s_fdDebug < 0) {
- LOGE("Failed to get socket '" SOCKET_NAME_RIL_DEBUG "' errno:%d", errno);
+ ALOGE("Failed to get socket '" SOCKET_NAME_RIL_DEBUG "' errno:%d", errno);
exit(-1);
}
ret = listen(s_fdDebug, 4);
if (ret < 0) {
- LOGE("Failed to listen on ril debug socket '%d': %s",
+ ALOGE("Failed to listen on ril debug socket '%d': %s",
s_fdDebug, strerror(errno));
exit(-1);
}
@@ -2791,7 +2791,7 @@ RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responsel
pRI = (RequestInfo *)t;
if (!checkAndDequeueRequestInfo(pRI)) {
- LOGE ("RIL_onRequestComplete: invalid RIL_Token");
+ ALOGE ("RIL_onRequestComplete: invalid RIL_Token");
return;
}
@@ -2885,7 +2885,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data,
if ((unsolResponseIndex < 0)
|| (unsolResponseIndex >= (int32_t)NUM_ELEMS(s_unsolResponses))) {
- LOGE("unsupported unsolicited response code %d", unsolResponse);
+ ALOGE("unsupported unsolicited response code %d", unsolResponse);
return;
}
View
2 libril/ril_event.cpp
@@ -370,7 +370,7 @@ void ril_event_loop()
if (n < 0) {
if (errno == EINTR) continue;
- LOGE("ril_event: select error (%d)", errno);
+ ALOGE("ril_event: select error (%d)", errno);
// bail?
return;
}
View
18 mock-ril/src/cpp/ctrl_server.cpp
@@ -198,7 +198,7 @@ class CtrlServerThread : public WorkerThread {
server_accept_socket_ = socket_inaddr_any_server(
MOCK_RIL_CONTROL_SERVER_SOCKET, SOCK_STREAM);
if (server_accept_socket_ < 0) {
- LOGE("CtrlServerThread::Run error creating server_accept_socket_ '%s'",
+ ALOGE("CtrlServerThread::Run error creating server_accept_socket_ '%s'",
strerror(errno));
return STATUS_ERR;
}
@@ -207,7 +207,7 @@ class CtrlServerThread : public WorkerThread {
stop_server_fd_ = socket_loopback_server(
MOCK_RIL_CONTROL_SERVER_STOPPING_SOCKET, SOCK_STREAM);
if (stop_server_fd_ < 0) {
- LOGE("CtrlServerThread::Run error creating stop_server_fd_ '%s'",
+ ALOGE("CtrlServerThread::Run error creating stop_server_fd_ '%s'",
strerror(errno));
return STATUS_ERR;
}
@@ -216,7 +216,7 @@ class CtrlServerThread : public WorkerThread {
stop_client_fd_ = socket_loopback_client(
MOCK_RIL_CONTROL_SERVER_STOPPING_SOCKET, SOCK_STREAM);
if (stop_client_fd_ < 0) {
- LOGE("CtrlServerThread::Run error creating stop_client_fd_ '%s'",
+ ALOGE("CtrlServerThread::Run error creating stop_client_fd_ '%s'",
strerror(errno));
return STATUS_ERR;
}
@@ -224,7 +224,7 @@ class CtrlServerThread : public WorkerThread {
// Accept the connection of the stop_client_fd_
stopper_fd_ = accept(stop_server_fd_, NULL, NULL);
if (stopper_fd_ < 0) {
- LOGE("CtrlServerThread::Run error accepting stop_client_fd '%s'",
+ ALOGE("CtrlServerThread::Run error accepting stop_client_fd '%s'",
strerror(errno));
return STATUS_ERR;
}
@@ -241,7 +241,7 @@ class CtrlServerThread : public WorkerThread {
done_ = true;
int rv = send(stop_client_fd_, &done_, sizeof(done_), 0);
if (rv <= 0) {
- LOGE("CtrlServerThread::Stop could not send stop"
+ ALOGE("CtrlServerThread::Stop could not send stop"
"WE WILL PROBABLY HANG");
}
WaitUntilStopped();
@@ -308,7 +308,7 @@ class CtrlServerThread : public WorkerThread {
}
if (status != STATUS_OK) {
- LOGE("sendToCtrlServer Error: status=%d", status);
+ ALOGE("sendToCtrlServer Error: status=%d", status);
// An error report complete now
mh->set_length_data(0);
mh->set_status(ril_proto::CTRL_STATUS_ERR);
@@ -407,7 +407,7 @@ v8::Handle<v8::Value> SendCtrlRequestComplete(const v8::Arguments& args) {
*/
if (args.Length() < 3) {
// Expecting a reqNum, ERROR and token
- LOGE("SendCtrlRequestComplete X %d parameters"
+ ALOGE("SendCtrlRequestComplete X %d parameters"
" expecting at least 3: status, reqNum, and token",
args.Length());
return v8::Undefined();
@@ -448,7 +448,7 @@ void ctrlServerInit(v8::Handle<v8::Context> context) {
g_ctrl_server = new CtrlServerThread(context);
status = g_ctrl_server->Run();
if (status != STATUS_OK) {
- LOGE("mock_ril control server could not start");
+ ALOGE("mock_ril control server could not start");
} else {
ALOGD("CtrlServer started");
}
@@ -465,7 +465,7 @@ void ctrlServerInit(v8::Handle<v8::Context> context) {
g_ctrl_server = new CtrlServerThread(context);
status = g_ctrl_server->Run();
if (status != STATUS_OK) {
- LOGE("mock_ril control server could not start");
+ ALOGE("mock_ril control server could not start");
} else {
DBG("mock_ril control server started");
}
View
4 mock-ril/src/cpp/js_support.cpp
@@ -290,12 +290,12 @@ void runJs(v8::Handle<v8::Context> context, v8::TryCatch *try_catch,
v8::Handle<v8::Script> script = v8::Script::Compile(
v8::String::New(code), v8::String::New(fileName));
if (try_catch->HasCaught()) {
- LOGE("-- Compiling the source failed");
+ ALOGE("-- Compiling the source failed");
} else {
// Run the resulting script
v8::Handle<v8::Value> result = script->Run();
if (try_catch->HasCaught()) {
- LOGE("-- Running the script failed");
+ ALOGE("-- Running the script failed");
}
}
}
View
8 mock-ril/src/cpp/mock_ril.cpp
@@ -280,12 +280,12 @@ void startMockRil(v8::Handle<v8::Context> context) {
v8::Handle<v8::Value> result = start->Call(context->Global(), 0, NULL);
if (try_catch.HasCaught()) {
- LOGE("startMockRil error");
+ ALOGE("startMockRil error");
ReportException(&try_catch);
- LOGE("FATAL ERROR: Unsable to startMockRil.");
+ ALOGE("FATAL ERROR: Unsable to startMockRil.");
} else {
v8::String::Utf8Value result_string(result);
- LOGE("startMockRil result=%s", ToCString(result_string));
+ ALOGE("startMockRil result=%s", ToCString(result_string));
}
}
@@ -326,7 +326,7 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc,
runJs(context, &try_catch, "mock_ril.js", buffer);
if (try_catch.HasCaught()) {
// TODO: Change to event this is fatal
- LOGE("FATAL ERROR: Unable to run mock_ril.js");
+ ALOGE("FATAL ERROR: Unable to run mock_ril.js");
}
}
View
20 mock-ril/src/cpp/requests.cpp
@@ -73,7 +73,7 @@ int ReqEnterSimPin(Buffer **pBuffer,
DBG("ReqEnterSimPin E");
if (datalen < sizeof(int)) {
- LOGE("ReqEnterSimPin: data to small err size < sizeof int");
+ ALOGE("ReqEnterSimPin: data to small err size < sizeof int");
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqEnterSimPin *req = new ril_proto::ReqEnterSimPin();
@@ -101,7 +101,7 @@ int ReqDial(Buffer **pBuffer,
DBG("data=%p datalen=%d t=%p", data, datalen, t);
if (datalen < sizeof(int)) {
- LOGE("ReqDial: data to small err size < sizeof int");
+ ALOGE("ReqDial: data to small err size < sizeof int");
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqDial *req = new ril_proto::ReqDial();
@@ -158,7 +158,7 @@ int ReqHangUp(Buffer **pBuffer,
DBG("ReqHangUp E");
if (datalen < sizeof(int)) {
- LOGE("ReqHangUp: data to small err size < sizeof int");
+ ALOGE("ReqHangUp: data to small err size < sizeof int");
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqHangUp *req = new ril_proto::ReqHangUp();
@@ -185,7 +185,7 @@ int ReqSeparateConnection (Buffer **pBuffer,
DBG("ReqSeparateConnection E");
if (datalen < sizeof(int)) {
- LOGE("ReqSetMute: data to small err size < sizeof int");
+ ALOGE("ReqSetMute: data to small err size < sizeof int");
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqSeparateConnection *req = new ril_proto::ReqSeparateConnection();
@@ -213,7 +213,7 @@ int ReqSetMute(Buffer **pBuffer,
DBG("ReqSetMute E");
if (datalen < sizeof(int)) {
- LOGE("ReqSetMute: data to small err size < sizeof int");
+ ALOGE("ReqSetMute: data to small err size < sizeof int");
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqSetMute *req = new ril_proto::ReqSetMute();
@@ -242,7 +242,7 @@ int ReqScreenState(Buffer **pBuffer,
DBG("ReqScreenState E data=%p datalen=%d t=%p",
data, datalen, t);
if (datalen < sizeof(int)) {
- LOGE("ReqScreenState: data to small err size < sizeof int");
+ ALOGE("ReqScreenState: data to small err size < sizeof int");
status = STATUS_BAD_DATA;
} else {
ril_proto::ReqScreenState *req = new ril_proto::ReqScreenState();
@@ -293,7 +293,7 @@ int callOnRilRequest(v8::Handle<v8::Context> context, int cmd,
v8::Handle<v8::Value> result =
onRilRequestFunction->Call(context->Global(), argc, argv);
if (try_catch.HasCaught()) {
- LOGE("callOnRilRequest error");
+ ALOGE("callOnRilRequest error");
ReportException(&try_catch);
status = STATUS_ERR;
} else {
@@ -350,7 +350,7 @@ void RilRequestWorkerQueue::AddRequest (const int request,
if (itr != rilReqConversionMap.end()) {
status = itr->second(&buffer, data, datalen, token);
} else {
- LOGE("RilRequestWorkerQueue:AddRequest: X unknown request %d", request);
+ ALOGE("RilRequestWorkerQueue:AddRequest: X unknown request %d", request);
status = STATUS_UNSUPPORTED_REQUEST;
}
@@ -452,13 +452,13 @@ void testRilRequest(v8::Handle<v8::Context> context, int request, const void *da
if (itr != rilReqConversionMap.end()) {
status = itr->second(&buffer, data, sizeof(data), (void *)0x12345677);
} else {
- LOGE("testRequests X unknown request %d", request);
+ ALOGE("testRequests X unknown request %d", request);
status = STATUS_UNSUPPORTED_REQUEST;
}
if (status == STATUS_OK) {
callOnRilRequest(context, request, buffer, (void *)0x12345677);
} else {
- LOGE("testRilRequest X, serialize error");
+ ALOGE("testRilRequest X, serialize error");
}
}
View
10 mock-ril/src/cpp/responses.cpp
@@ -346,7 +346,7 @@ RIL_Errno RspOperator(
void UnsolRspSignalStrength(int cmd, Buffer* buffer) {
DBG("UnsolRspSignalStrength E");
- LOGE("unsolicited response command: %d", cmd);
+ ALOGE("unsolicited response command: %d", cmd);
// Retrieve response from response message
ril_proto::RspSignalStrength *rsp = new ril_proto::RspSignalStrength();
rsp->ParseFromArray(buffer->data(), buffer->length());
@@ -395,7 +395,7 @@ v8::Handle<v8::Value> SendRilRequestComplete(const v8::Arguments& args) {
*/
if (args.Length() < REQUEST_COMPLETE_REQUIRED_CMDS) {
// Expecting a cmd, ERROR and token
- LOGE("SendRilRequestComplete X %d parameters"
+ ALOGE("SendRilRequestComplete X %d parameters"
" expecting at least %d: rilErrno, cmd, and token",
args.Length(), REQUEST_COMPLETE_REQUIRED_CMDS);
return v8::Undefined();
@@ -430,7 +430,7 @@ v8::Handle<v8::Value> SendRilRequestComplete(const v8::Arguments& args) {
rilErrno = RIL_E_SUCCESS;
} else {
// There was a buffer but we don't support the resonse yet.
- LOGE("SendRilRequestComplete: No conversion routine for cmd %d,"
+ ALOGE("SendRilRequestComplete: No conversion routine for cmd %d,"
" return RIL_E_REQUEST_NOT_SUPPORTED", cmd);
rilErrno = RIL_E_REQUEST_NOT_SUPPORTED;
}
@@ -462,7 +462,7 @@ v8::Handle<v8::Value> SendRilUnsolicitedResponse(const v8::Arguments& args) {
*/
if (args.Length() < UNSOL_RESPONSE_REQUIRED_CMDS) {
// Expecting a cmd
- LOGE("SendRilUnsolicitedResponse X %d parameters"
+ ALOGE("SendRilUnsolicitedResponse X %d parameters"
" expecting at least a cmd",
args.Length());
return v8::Undefined();
@@ -488,7 +488,7 @@ v8::Handle<v8::Value> SendRilUnsolicitedResponse(const v8::Arguments& args) {
datalen = 0;
} else {
// There was a buffer but we don't support the response yet.
- LOGE("SendRilUnsolicitedResponse: No conversion routine for cmd %d,"
+ ALOGE("SendRilUnsolicitedResponse: No conversion routine for cmd %d,"
" return RIL_E_REQUEST_NOT_SUPPORTED", cmd);
data = NULL;
datalen = 0;
View
6 mock-ril/src/cpp/worker.cpp
@@ -96,19 +96,19 @@ int WorkerThread::Run(void *workerParam) {
ret = pthread_attr_init(&attr_);
if (ret != 0) {
- LOGE("RIL_Init X: pthread_attr_init failed err=%s", strerror(ret));
+ ALOGE("RIL_Init X: pthread_attr_init failed err=%s", strerror(ret));
return STATUS_ERR;
}
ret = pthread_attr_setdetachstate(&attr_, PTHREAD_CREATE_DETACHED);
if (ret != 0) {
- LOGE("RIL_Init X: pthread_attr_setdetachstate failed err=%s",
+ ALOGE("RIL_Init X: pthread_attr_setdetachstate failed err=%s",
strerror(ret));
return STATUS_ERR;
}
ret = pthread_create(&tid_, &attr_,
(void * (*)(void *))&WorkerThread::Work, this);
if (ret != 0) {
- LOGE("RIL_Init X: pthread_create failed err=%s", strerror(ret));
+ ALOGE("RIL_Init X: pthread_create failed err=%s", strerror(ret));
return STATUS_ERR;
}
View
4 reference-ril/atchannel.c
@@ -290,7 +290,7 @@ static void processLine(const char *line)
break;
default: /* this should never be reached */
- LOGE("Unsupported AT command type %d\n", s_type);
+ ALOGE("Unsupported AT command type %d\n", s_type);
handleUnsolicited(line);
break;
}
@@ -371,7 +371,7 @@ static const char *readline()
while (p_eol == NULL) {
if (0 == MAX_AT_RESPONSE - (p_read - s_ATBuffer)) {
- LOGE("ERROR: Input line exceeded buffer\n");
+ ALOGE("ERROR: Input line exceeded buffer\n");
/* ditch buffer and start over again */
s_ATBufferCur = s_ATBuffer;
*s_ATBufferCur = '\0';
View
22 reference-ril/reference-ril.c
@@ -208,7 +208,7 @@ static int callFromCLCCLine(char *line, RIL_Call *p_call)
return 0;
error:
- LOGE("invalid CLCC line\n");
+ ALOGE("invalid CLCC line\n");
return -1;
}
@@ -517,7 +517,7 @@ static void requestQueryNetworkSelectionMode(
return;
error:
at_response_free(p_response);
- LOGE("requestQueryNetworkSelectionMode must never return error when radio is on");
+ ALOGE("requestQueryNetworkSelectionMode must never return error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
}
@@ -757,7 +757,7 @@ static void requestSignalStrength(void *data, size_t datalen, RIL_Token t)
return;
error:
- LOGE("requestSignalStrength must never return an error when radio is on");
+ ALOGE("requestSignalStrength must never return an error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
at_response_free(p_response);
}
@@ -892,7 +892,7 @@ static void requestRegistrationState(int request, void *data,
return;
error:
- LOGE("requestRegistrationState must never return an error when radio is on");
+ ALOGE("requestRegistrationState must never return an error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
at_response_free(p_response);
}
@@ -963,7 +963,7 @@ static void requestOperator(void *data, size_t datalen, RIL_Token t)
return;
error:
- LOGE("requestOperator must not return error when radio is on");
+ ALOGE("requestOperator must not return error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
at_response_free(p_response);
}
@@ -1048,7 +1048,7 @@ static void requestSetupDataCall(void *data, size_t datalen, RIL_Token t)
} while (written < 0 && errno == EINTR);
if (written < 0) {
- LOGE("### ERROR writing to /dev/qmi");
+ ALOGE("### ERROR writing to /dev/qmi");
close(fd);
goto error;
}
@@ -1065,7 +1065,7 @@ static void requestSetupDataCall(void *data, size_t datalen, RIL_Token t)
} while (rlen < 0 && errno == EINTR);
if (rlen < 0) {
- LOGE("### ERROR reading from /dev/qmi");
+ ALOGE("### ERROR reading from /dev/qmi");
close(fd);
goto error;
} else {
@@ -1077,7 +1077,7 @@ static void requestSetupDataCall(void *data, size_t datalen, RIL_Token t)
close(fd);
if (retry == 0) {
- LOGE("### Failed to get data connection up\n");
+ ALOGE("### Failed to get data connection up\n");
goto error;
}
@@ -1143,7 +1143,7 @@ static void requestSMSAcknowledge(void *data, size_t datalen, RIL_Token t)
} else if (ackSuccess == 0) {
err = at_send_command("AT+CNMA=2", NULL);
} else {
- LOGE("unsupported arg to RIL_REQUEST_SMS_ACKNOWLEDGE\n");
+ ALOGE("unsupported arg to RIL_REQUEST_SMS_ACKNOWLEDGE\n");
goto error;
}
@@ -1975,7 +1975,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
err = at_tok_nextstr(&line, &response);
if (err != 0) {
- LOGE("invalid NITZ line %s\n", s);
+ ALOGE("invalid NITZ line %s\n", s);
} else {
RIL_onUnsolicitedResponse (
RIL_UNSOL_NITZ_TIME_RECEIVED,
@@ -2122,7 +2122,7 @@ mainLoop(void *param)
ret = at_open(fd, onUnsolicited);
if (ret < 0) {
- LOGE ("AT error %d on at_open\n", ret);
+ ALOGE ("AT error %d on at_open\n", ret);
return 0;
}
View
2 rild/rild.c
@@ -199,7 +199,7 @@ int main(int argc, char **argv)
break;
}
if (!done) {
- LOGE("could not connect to %s socket (giving up): %s",
+ ALOGE("could not connect to %s socket (giving up): %s",
QEMUD_SOCKET_NAME, strerror(errno));
while(1)
sleep(0x00ffffff);

0 comments on commit 170fbda

Please sign in to comment.
Something went wrong with that request. Please try again.