summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2012-12-12 08:46:49 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-12-12 08:46:49 -0800
commit939175198fcc818178bd09a46ea976a5ff7d4686 (patch)
treeecf42cdb53d13833956009af5a703de626d585dd
parent989e788f5e51851e320f86cc197e1327d0ec259e (diff)
parent171a192f19a5753e03ef91578430e7a5ee680b7f (diff)
downloadplatform_hardware_ril-939175198fcc818178bd09a46ea976a5ff7d4686.tar.gz
platform_hardware_ril-939175198fcc818178bd09a46ea976a5ff7d4686.tar.bz2
platform_hardware_ril-939175198fcc818178bd09a46ea976a5ff7d4686.zip
am 171a192f: Merge "Add RLOGx"
* commit '171a192f19a5753e03ef91578430e7a5ee680b7f': Add RLOGx
-rw-r--r--libril/ril.cpp198
-rw-r--r--libril/ril_event.cpp4
-rw-r--r--reference-ril/atchannel.c16
-rw-r--r--reference-ril/reference-ril.c134
-rw-r--r--rild/rild.c14
5 files changed, 183 insertions, 183 deletions
diff --git a/libril/ril.cpp b/libril/ril.cpp
index 3e6492e8..1548e62b 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -92,11 +92,11 @@ namespace android {
#define startRequest sprintf(printBuf, "(")
#define closeRequest sprintf(printBuf, "%s)", printBuf)
#define printRequest(token, req) \
- ALOGD("[%04d]> %s %s", token, requestToString(req), printBuf)
+ RLOGD("[%04d]> %s %s", token, requestToString(req), printBuf)
#define startResponse sprintf(printBuf, "%s {", printBuf)
#define closeResponse sprintf(printBuf, "%s}", printBuf)
- #define printResponse ALOGD("%s", printBuf)
+ #define printResponse RLOGD("%s", printBuf)
#define clearPrintBuf printBuf[0] = 0
#define removeLastChar printBuf[strlen(printBuf)-1] = 0
@@ -338,7 +338,7 @@ issueLocalRequest(int request, void *data, int len) {
ret = pthread_mutex_unlock(&s_pendingRequestsMutex);
assert (ret == 0);
- ALOGD("C[locl]> %s", requestToString(request));
+ RLOGD("C[locl]> %s", requestToString(request));
s_callbacks.onRequest(request, data, len, pRI);
}
@@ -361,12 +361,12 @@ processCommandBuffer(void *buffer, size_t buflen) {
status = p.readInt32 (&token);
if (status != NO_ERROR) {
- ALOGE("invalid request block");
+ RLOGE("invalid request block");
return 0;
}
if (request < 1 || request >= (int32_t)NUM_ELEMS(s_commands)) {
- ALOGE("unsupported request code %d token %d", request, token);
+ RLOGE("unsupported request code %d token %d", request, token);
// FIXME this should perhaps return a response
return 0;
}
@@ -395,7 +395,7 @@ processCommandBuffer(void *buffer, size_t buflen) {
static void
invalidCommandBlock (RequestInfo *pRI) {
- ALOGE("invalid command block for token %d request %s",
+ RLOGE("invalid command block for token %d request %s",
pRI->token, requestToString(pRI->pCI->requestNumber));
}
@@ -1320,7 +1320,7 @@ blockingWrite(int fd, const void *buffer, size_t len) {
if (written >= 0) {
writeOffset += written;
} else { // written < 0
- ALOGE ("RIL Response: unexpected error on write errno:%d", errno);
+ RLOGE ("RIL Response: unexpected error on write errno:%d", errno);
close(fd);
return -1;
}
@@ -1340,7 +1340,7 @@ sendResponseRaw (const void *data, size_t dataSize) {
}
if (dataSize > MAX_COMMAND_BYTES) {
- ALOGE("RIL: packet larger than %u (%u)",
+ RLOGE("RIL: packet larger than %u (%u)",
MAX_COMMAND_BYTES, (unsigned int )dataSize);
return -1;
@@ -1382,11 +1382,11 @@ responseInts(Parcel &p, void *response, size_t responselen) {
int numInts;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(int) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof(int));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1420,11 +1420,11 @@ static int responseStrings(Parcel &p, void *response, size_t responselen) {
int numStrings;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(char *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof(char *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1475,12 +1475,12 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof (RIL_Call *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_Call *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1543,12 +1543,12 @@ static int responseCallList(Parcel &p, void *response, size_t responselen) {
static int responseSMS(Parcel &p, void *response, size_t responselen) {
if (response == NULL) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_SMS_Response) ) {
- ALOGE("invalid response length %d expected %d",
+ RLOGE("invalid response length %d expected %d",
(int)responselen, (int)sizeof (RIL_SMS_Response));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1570,12 +1570,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) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(RIL_Data_Call_Response_v4) != 0) {
- ALOGE("invalid response length %d expected multiple of %d",
+ RLOGE("invalid response length %d expected multiple of %d",
(int)responselen, (int)sizeof(RIL_Data_Call_Response_v4));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1613,12 +1613,12 @@ static int responseDataCallList(Parcel &p, void *response, size_t responselen)
return responseDataCallListV4(p, response, responselen);
} else {
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(RIL_Data_Call_Response_v6) != 0) {
- ALOGE("invalid response length %d expected multiple of %d",
+ RLOGE("invalid response length %d expected multiple of %d",
(int)responselen, (int)sizeof(RIL_Data_Call_Response_v6));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1668,7 +1668,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) {
- ALOGE("invalid response: NULL with responselen != 0");
+ RLOGE("invalid response: NULL with responselen != 0");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1686,12 +1686,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) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_SIM_IO_Response) ) {
- ALOGE("invalid response length was %d expected %d",
+ RLOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof (RIL_SIM_IO_Response));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1714,12 +1714,12 @@ static int responseCallForwards(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof(RIL_CallForwardInfo *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d",
+ RLOGE("invalid response length %d expected multiple of %d",
(int)responselen, (int)sizeof(RIL_CallForwardInfo *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1752,12 +1752,12 @@ static int responseCallForwards(Parcel &p, void *response, size_t responselen) {
static int responseSsn(Parcel &p, void *response, size_t responselen) {
if (response == NULL) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof(RIL_SuppSvcNotification)) {
- ALOGE("invalid response length was %d expected %d",
+ RLOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof (RIL_SuppSvcNotification));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1783,12 +1783,12 @@ static int responseCellList(Parcel &p, void *response, size_t responselen) {
int num;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen % sizeof (RIL_NeighboringCell *) != 0) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_NeighboringCell *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1832,12 +1832,12 @@ static int responseCdmaInformationRecords(Parcel &p,
RIL_CDMA_InformationRecord *infoRec;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_CDMA_InformationRecords)) {
- ALOGE("invalid response length %d expected multiple of %d\n",
+ RLOGE("invalid response length %d expected multiple of %d\n",
(int)responselen, (int)sizeof (RIL_CDMA_InformationRecords *));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -1857,7 +1857,7 @@ static int responseCdmaInformationRecords(Parcel &p,
case RIL_CDMA_EXTENDED_DISPLAY_INFO_REC:
if (infoRec->rec.display.alpha_len >
CDMA_ALPHA_INFO_BUFFER_LENGTH) {
- ALOGE("invalid display info response length %d \
+ RLOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.display.alpha_len,
CDMA_ALPHA_INFO_BUFFER_LENGTH);
@@ -1877,7 +1877,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) {
- ALOGE("invalid display info response length %d \
+ RLOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.number.len,
CDMA_NUMBER_INFO_BUFFER_LENGTH);
@@ -1914,7 +1914,7 @@ static int responseCdmaInformationRecords(Parcel &p,
case RIL_CDMA_REDIRECTING_NUMBER_INFO_REC:
if (infoRec->rec.redir.redirectingNumber.len >
CDMA_NUMBER_INFO_BUFFER_LENGTH) {
- ALOGE("invalid display info response length %d \
+ RLOGE("invalid display info response length %d \
expected not more than %d\n",
(int)infoRec->rec.redir.redirectingNumber.len,
CDMA_NUMBER_INFO_BUFFER_LENGTH);
@@ -1969,10 +1969,10 @@ static int responseCdmaInformationRecords(Parcel &p,
break;
case RIL_CDMA_T53_RELEASE_INFO_REC:
// TODO(Moto): See David Krause, he has the answer:)
- ALOGE("RIL_CDMA_T53_RELEASE_INFO_REC: return INVALID_RESPONSE");
+ RLOGE("RIL_CDMA_T53_RELEASE_INFO_REC: return INVALID_RESPONSE");
return RIL_ERRNO_INVALID_RESPONSE;
default:
- ALOGE("Incorrect name value");
+ RLOGE("Incorrect name value");
return RIL_ERRNO_INVALID_RESPONSE;
}
}
@@ -1984,7 +1984,7 @@ static int responseCdmaInformationRecords(Parcel &p,
static int responseRilSignalStrength(Parcel &p,
void *response, size_t responselen) {
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2040,7 +2040,7 @@ static int responseRilSignalStrength(Parcel &p,
closeResponse;
} else {
- ALOGE("invalid response length");
+ RLOGE("invalid response length");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2057,12 +2057,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) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof (RIL_CDMA_SignalInfoRecord)) {
- ALOGE("invalid response length %d expected sizeof (RIL_CDMA_SignalInfoRecord) of %d\n",
+ RLOGE("invalid response length %d expected sizeof (RIL_CDMA_SignalInfoRecord) of %d\n",
(int)responselen, (int)sizeof (RIL_CDMA_SignalInfoRecord));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2087,12 +2087,12 @@ 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) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen < sizeof(RIL_CDMA_CallWaiting_v6)) {
- ALOGW("Upgrade to ril version %d\n", RIL_VERSION);
+ RLOGW("Upgrade to ril version %d\n", RIL_VERSION);
}
RIL_CDMA_CallWaiting_v6 *p_cur = ((RIL_CDMA_CallWaiting_v6 *) response);
@@ -2131,7 +2131,7 @@ static int responseCdmaCallWaiting(Parcel &p, void *response,
static int responseSimRefresh(Parcel &p, void *response, size_t responselen) {
if (response == NULL && responselen != 0) {
- ALOGE("responseSimRefresh: invalid response: NULL");
+ RLOGE("responseSimRefresh: invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2211,7 +2211,7 @@ static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
int i;
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2236,7 +2236,7 @@ static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
sendSimStatusAppInfo(p, p_cur->num_applications, p_cur->applications);
} else {
- ALOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected\n");
+ RLOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected\n");
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2298,15 +2298,15 @@ static int responseCdmaSms(Parcel &p, void *response, size_t responselen) {
uint8_t uct;
void* dest;
- ALOGD("Inside responseCdmaSms");
+ RLOGD("Inside responseCdmaSms");
if (response == NULL && responselen != 0) {
- ALOGE("invalid response: NULL");
+ RLOGE("invalid response: NULL");
return RIL_ERRNO_INVALID_RESPONSE;
}
if (responselen != sizeof(RIL_CDMA_SMS_Message)) {
- ALOGE("invalid response length was %d expected %d",
+ RLOGE("invalid response length was %d expected %d",
(int)responselen, (int)sizeof(RIL_CDMA_SMS_Message));
return RIL_ERRNO_INVALID_RESPONSE;
}
@@ -2358,7 +2358,7 @@ static void processWakeupCallback(int fd, short flags, void *param) {
char buff[16];
int ret;
- ALOGV("processWakeupCallback");
+ RLOGV("processWakeupCallback");
/* empty our wakeup socket out */
do {
@@ -2415,9 +2415,9 @@ 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) {
- ALOGE("error on reading command socket errno:%d\n", errno);
+ RLOGE("error on reading command socket errno:%d\n", errno);
} else {
- ALOGW("EOS. Closing command socket.");
+ RLOGW("EOS. Closing command socket.");
}
close(s_fdCommand);
@@ -2457,11 +2457,11 @@ static void onNewCommandConnect() {
if (s_callbacks.getVersion != NULL) {
const char *version;
version = s_callbacks.getVersion();
- ALOGI("RIL Daemon version: %s\n", version);
+ RLOGI("RIL Daemon version: %s\n", version);
property_set(PROPERTY_RIL_IMPL, version);
} else {
- ALOGI("RIL Daemon version: unavailable\n");
+ RLOGI("RIL Daemon version: unavailable\n");
property_set(PROPERTY_RIL_IMPL, "unavailable");
}
@@ -2487,7 +2487,7 @@ static void listenCallback (int fd, short flags, void *param) {
s_fdCommand = accept(s_fdListen, (sockaddr *) &peeraddr, &socklen);
if (s_fdCommand < 0 ) {
- ALOGE("Error on accept() errno:%d", errno);
+ RLOGE("Error on accept() errno:%d", errno);
/* start listening for new connections again */
rilEventAddWakeup(&s_listen_event);
return;
@@ -2508,17 +2508,17 @@ static void listenCallback (int fd, short flags, void *param) {
if (strcmp(pwd->pw_name, PHONE_PROCESS) == 0) {
is_phone_socket = 1;
} else {
- ALOGE("RILD can't accept socket from process %s", pwd->pw_name);
+ RLOGE("RILD can't accept socket from process %s", pwd->pw_name);
}
} else {
- ALOGE("Error on getpwuid() errno: %d", errno);
+ RLOGE("Error on getpwuid() errno: %d", errno);
}
} else {
- ALOGD("Error on getsockopt() errno: %d", errno);
+ RLOGD("Error on getsockopt() errno: %d", errno);
}
if ( !is_phone_socket ) {
- ALOGE("RILD must accept socket from %s", PHONE_PROCESS);
+ RLOGE("RILD must accept socket from %s", PHONE_PROCESS);
close(s_fdCommand);
s_fdCommand = -1;
@@ -2534,10 +2534,10 @@ static void listenCallback (int fd, short flags, void *param) {
ret = fcntl(s_fdCommand, F_SETFL, O_NONBLOCK);
if (ret < 0) {
- ALOGE ("Error setting O_NONBLOCK errno:%d", errno);
+ RLOGE ("Error setting O_NONBLOCK errno:%d", errno);
}
- ALOGI("libril: new connection");
+ RLOGI("libril: new connection");
p_rs = record_stream_new(s_fdCommand, MAX_COMMAND_BYTES);
@@ -2574,12 +2574,12 @@ static void debugCallback (int fd, short flags, void *param) {
acceptFD = accept (fd, (sockaddr *) &peeraddr, &socklen);
if (acceptFD < 0) {
- ALOGE ("error accepting on debug port: %d\n", errno);
+ RLOGE ("error accepting on debug port: %d\n", errno);
return;
}
if (recv(acceptFD, &number, sizeof(int), 0) != sizeof(int)) {
- ALOGE ("error reading on socket: number of Args: \n");
+ RLOGE ("error reading on socket: number of Args: \n");
return;
}
args = (char **) malloc(sizeof(char*) * number);
@@ -2587,7 +2587,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)) {
- ALOGE ("error reading on socket: Len of Args: \n");
+ RLOGE ("error reading on socket: Len of Args: \n");
freeDebugCallbackArgs(i, args);
return;
}
@@ -2595,7 +2595,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) {
- ALOGE ("error reading on socket: Args[%d] \n", i);
+ RLOGE ("error reading on socket: Args[%d] \n", i);
freeDebugCallbackArgs(i, args);
return;
}
@@ -2605,11 +2605,11 @@ static void debugCallback (int fd, short flags, void *param) {
switch (atoi(args[0])) {
case 0:
- ALOGI ("Connection on debug port: issuing reset.");
+ RLOGI ("Connection on debug port: issuing reset.");
issueLocalRequest(RIL_REQUEST_RESET_RADIO, NULL, 0);
break;
case 1:
- ALOGI ("Connection on debug port: issuing radio power off.");
+ RLOGI ("Connection on debug port: issuing radio power off.");
data = 0;
issueLocalRequest(RIL_REQUEST_RADIO_POWER, &data, sizeof(int));
// Close the socket
@@ -2617,12 +2617,12 @@ static void debugCallback (int fd, short flags, void *param) {
s_fdCommand = -1;
break;
case 2:
- ALOGI ("Debug port: issuing unsolicited voice network change.");
+ RLOGI ("Debug port: issuing unsolicited voice network change.");
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED,
NULL, 0);
break;
case 3:
- ALOGI ("Debug port: QXDM log enable.");
+ RLOGI ("Debug port: QXDM log enable.");
qxdm_data[0] = 65536; // head.func_tag
qxdm_data[1] = 16; // head.len
qxdm_data[2] = 1; // mode: 1 for 'start logging'
@@ -2633,7 +2633,7 @@ static void debugCallback (int fd, short flags, void *param) {
6 * sizeof(int));
break;
case 4:
- ALOGI ("Debug port: QXDM log disable.");
+ RLOGI ("Debug port: QXDM log disable.");
qxdm_data[0] = 65536;
qxdm_data[1] = 16;
qxdm_data[2] = 0; // mode: 0 for 'stop logging'
@@ -2644,7 +2644,7 @@ static void debugCallback (int fd, short flags, void *param) {
6 * sizeof(int));
break;
case 5:
- ALOGI("Debug port: Radio On");
+ RLOGI("Debug port: Radio On");
data = 1;
issueLocalRequest(RIL_REQUEST_RADIO_POWER, &data, sizeof(int));
sleep(2);
@@ -2652,33 +2652,33 @@ static void debugCallback (int fd, short flags, void *param) {
issueLocalRequest(RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC, NULL, 0);
break;
case 6:
- ALOGI("Debug port: Setup Data Call, Apn :%s\n", args[1]);
+ RLOGI("Debug port: Setup Data Call, Apn :%s\n", args[1]);
actData[0] = args[1];
issueLocalRequest(RIL_REQUEST_SETUP_DATA_CALL, &actData,
sizeof(actData));
break;
case 7:
- ALOGI("Debug port: Deactivate Data Call");
+ RLOGI("Debug port: Deactivate Data Call");
issueLocalRequest(RIL_REQUEST_DEACTIVATE_DATA_CALL, &deactData,
sizeof(deactData));
break;
case 8:
- ALOGI("Debug port: Dial Call");
+ RLOGI("Debug port: Dial Call");
dialData.clir = 0;
dialData.address = args[1];
issueLocalRequest(RIL_REQUEST_DIAL, &dialData, sizeof(dialData));
break;
case 9:
- ALOGI("Debug port: Answer Call");
+ RLOGI("Debug port: Answer Call");
issueLocalRequest(RIL_REQUEST_ANSWER, NULL, 0);
break;
case 10:
- ALOGI("Debug port: End Call");
+ RLOGI("Debug port: End Call");
issueLocalRequest(RIL_REQUEST_HANGUP, &hangupData,
sizeof(hangupData));
break;
default:
- ALOGE ("Invalid request");
+ RLOGE ("Invalid request");
break;
}
freeDebugCallbackArgs(number, args);
@@ -2720,7 +2720,7 @@ eventLoop(void *param) {
ret = pipe(filedes);
if (ret < 0) {
- ALOGE("Error in pipe() errno:%d", errno);
+ RLOGE("Error in pipe() errno:%d", errno);
return NULL;
}
@@ -2736,7 +2736,7 @@ eventLoop(void *param) {
// Only returns on error
ril_event_loop();
- ALOGE ("error in event_loop_base errno:%d", errno);
+ RLOGE ("error in event_loop_base errno:%d", errno);
// kill self to restart on error
kill(0, SIGKILL);
@@ -2763,7 +2763,7 @@ RIL_startEventLoop(void) {
pthread_mutex_unlock(&s_startupMutex);
if (ret < 0) {
- ALOGE("Failed to create dispatch thread errno:%d", errno);
+ RLOGE("Failed to create dispatch thread errno:%d", errno);
return;
}
}
@@ -2779,23 +2779,23 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
int flags;
if (callbacks == NULL) {
- ALOGE("RIL_register: RIL_RadioFunctions * null");
+ RLOGE("RIL_register: RIL_RadioFunctions * null");
return;
}
if (callbacks->version < RIL_VERSION_MIN) {
- ALOGE("RIL_register: version %d is to old, min version is %d",
+ RLOGE("RIL_register: version %d is to old, min version is %d",
callbacks->version, RIL_VERSION_MIN);
return;
}
if (callbacks->version > RIL_VERSION) {
- ALOGE("RIL_register: version %d is too new, max version is %d",
+ RLOGE("RIL_register: version %d is too new, max version is %d",
callbacks->version, RIL_VERSION);
return;
}
- ALOGE("RIL_register: RIL version %d", callbacks->version);
+ RLOGE("RIL_register: RIL version %d", callbacks->version);
if (s_registerCalled > 0) {
- ALOGE("RIL_register has been called more than once. "
+ RLOGE("RIL_register has been called more than once. "
"Subsequent call ignored");
return;
}
@@ -2829,7 +2829,7 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM);
if (ret < 0) {
- ALOGE("Unable to bind socket errno:%d", errno);
+ RLOGE("Unable to bind socket errno:%d", errno);
exit (-1);
}
s_fdListen = ret;
@@ -2837,14 +2837,14 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
#else
s_fdListen = android_get_control_socket(SOCKET_NAME_RIL);
if (s_fdListen < 0) {
- ALOGE("Failed to get socket '" SOCKET_NAME_RIL "'");
+ RLOGE("Failed to get socket '" SOCKET_NAME_RIL "'");
exit(-1);
}
ret = listen(s_fdListen, 4);
if (ret < 0) {
- ALOGE("Failed to listen on control socket '%d': %s",
+ RLOGE("Failed to listen on control socket '%d': %s",
s_fdListen, strerror(errno));
exit(-1);
}
@@ -2862,14 +2862,14 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
s_fdDebug = android_get_control_socket(SOCKET_NAME_RIL_DEBUG);
if (s_fdDebug < 0) {
- ALOGE("Failed to get socket '" SOCKET_NAME_RIL_DEBUG "' errno:%d", errno);
+ RLOGE("Failed to get socket '" SOCKET_NAME_RIL_DEBUG "' errno:%d", errno);
exit(-1);
}
ret = listen(s_fdDebug, 4);
if (ret < 0) {
- ALOGE("Failed to listen on ril debug socket '%d': %s",
+ RLOGE("Failed to listen on ril debug socket '%d': %s",
s_fdDebug, strerror(errno));
exit(-1);
}
@@ -2919,14 +2919,14 @@ RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responsel
pRI = (RequestInfo *)t;
if (!checkAndDequeueRequestInfo(pRI)) {
- ALOGE ("RIL_onRequestComplete: invalid RIL_Token");
+ RLOGE ("RIL_onRequestComplete: invalid RIL_Token");
return;
}
if (pRI->local > 0) {
// Locally issued command...void only!
// response does not go back up the command socket
- ALOGD("C[locl]< %s", requestToString(pRI->pCI->requestNumber));
+ RLOGD("C[locl]< %s", requestToString(pRI->pCI->requestNumber));
goto done;
}
@@ -2959,7 +2959,7 @@ RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responsel
}
if (s_fdCommand < 0) {
- ALOGD ("RIL onRequestComplete: Command channel closed");
+ RLOGD ("RIL onRequestComplete: Command channel closed");
}
sendResponse(p);
}
@@ -2986,11 +2986,11 @@ static void
wakeTimeoutCallback (void *param) {
// We're using "param != NULL" as a cancellation mechanism
if (param == NULL) {
- //ALOGD("wakeTimeout: releasing wake lock");
+ //RLOGD("wakeTimeout: releasing wake lock");
releaseWakeLock();
} else {
- //ALOGD("wakeTimeout: releasing wake lock CANCELLED");
+ //RLOGD("wakeTimeout: releasing wake lock CANCELLED");
}
}
@@ -3010,7 +3010,7 @@ decodeVoiceRadioTechnology (RIL_RadioState radioState) {
return RADIO_TECH_1xRTT;
default:
- ALOGD("decodeVoiceRadioTechnology: Invoked with incorrect RadioState");
+ RLOGD("decodeVoiceRadioTechnology: Invoked with incorrect RadioState");
return -1;
}
}
@@ -3031,7 +3031,7 @@ decodeCdmaSubscriptionSource (RIL_RadioState radioState) {
return CDMA_SUBSCRIPTION_SOURCE_NV;
default:
- ALOGD("decodeCdmaSubscriptionSource: Invoked with incorrect RadioState");
+ RLOGD("decodeCdmaSubscriptionSource: Invoked with incorrect RadioState");
return -1;
}
}
@@ -3050,7 +3050,7 @@ decodeSimStatus (RIL_RadioState radioState) {
case RADIO_STATE_RUIM_LOCKED_OR_ABSENT:
return radioState;
default:
- ALOGD("decodeSimStatus: Invoked with incorrect RadioState");
+ RLOGD("decodeSimStatus: Invoked with incorrect RadioState");
return -1;
}
}
@@ -3123,7 +3123,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data,
if (s_registerCalled == 0) {
// Ignore RIL_onUnsolicitedResponse before RIL_register
- ALOGW("RIL_onUnsolicitedResponse called before RIL_register");
+ RLOGW("RIL_onUnsolicitedResponse called before RIL_register");
return;
}
@@ -3131,7 +3131,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, void *data,
if ((unsolResponseIndex < 0)
|| (unsolResponseIndex >= (int32_t)NUM_ELEMS(s_unsolResponses))) {
- ALOGE("unsupported unsolicited response code %d", unsolResponse);
+ RLOGE("unsupported unsolicited response code %d", unsolResponse);
return;
}
diff --git a/libril/ril_event.cpp b/libril/ril_event.cpp
index 93511e9e..9d2954e4 100644
--- a/libril/ril_event.cpp
+++ b/libril/ril_event.cpp
@@ -75,7 +75,7 @@ static struct ril_event pending_list;
#define DEBUG 0
#if DEBUG
-#define dlog(x...) ALOGD( x )
+#define dlog(x...) RLOGD( x )
static void dump_event(struct ril_event * ev)
{
dlog("~~~~ Event %x ~~~~", (unsigned int)ev);
@@ -370,7 +370,7 @@ void ril_event_loop()
if (n < 0) {
if (errno == EINTR) continue;
- ALOGE("ril_event: select error (%d)", errno);
+ RLOGE("ril_event: select error (%d)", errno);
// bail?
return;
}
diff --git a/reference-ril/atchannel.c b/reference-ril/atchannel.c
index 5e7a1c12..ee13f193 100644
--- a/reference-ril/atchannel.c
+++ b/reference-ril/atchannel.c
@@ -69,7 +69,7 @@ void AT_DUMP(const char* prefix, const char* buff, int len)
{
if (len < 0)
len = strlen(buff);
- ALOGD("%.*s", len, buff);
+ RLOGD("%.*s", len, buff);
}
#endif
@@ -290,7 +290,7 @@ static void processLine(const char *line)
break;
default: /* this should never be reached */
- ALOGE("Unsupported AT command type %d\n", s_type);
+ RLOGE("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)) {
- ALOGE("ERROR: Input line exceeded buffer\n");
+ RLOGE("ERROR: Input line exceeded buffer\n");
/* ditch buffer and start over again */
s_ATBufferCur = s_ATBuffer;
*s_ATBufferCur = '\0';
@@ -398,9 +398,9 @@ static const char *readline()
} else if (count <= 0) {
/* read error encountered or EOF reached */
if(count == 0) {
- ALOGD("atchannel: EOF reached");
+ RLOGD("atchannel: EOF reached");
} else {
- ALOGD("atchannel: read error %s", strerror(errno));
+ RLOGD("atchannel: read error %s", strerror(errno));
}
return NULL;
}
@@ -413,7 +413,7 @@ static const char *readline()
s_ATBufferCur = p_eol + 1; /* this will always be <= p_read, */
/* and there will be a \0 at *p_read */
- ALOGD("AT< %s\n", ret);
+ RLOGD("AT< %s\n", ret);
return ret;
}
@@ -499,7 +499,7 @@ static int writeline (const char *s)
return AT_ERROR_CHANNEL_CLOSED;
}
- ALOGD("AT> %s\n", s);
+ RLOGD("AT> %s\n", s);
AT_DUMP( ">> ", s, strlen(s) );
@@ -538,7 +538,7 @@ static int writeCtrlZ (const char *s)
return AT_ERROR_CHANNEL_CLOSED;
}
- ALOGD("AT> %s^Z\n", s);
+ RLOGD("AT> %s^Z\n", s);
AT_DUMP( ">* ", s, strlen(s) );
diff --git a/reference-ril/reference-ril.c b/reference-ril/reference-ril.c
index 4b3f926a..d1dd23f8 100644
--- a/reference-ril/reference-ril.c
+++ b/reference-ril/reference-ril.c
@@ -303,7 +303,7 @@ static int callFromCLCCLine(char *line, RIL_Call *p_call)
return 0;
error:
- ALOGE("invalid CLCC line\n");
+ RLOGE("invalid CLCC line\n");
return -1;
}
@@ -612,7 +612,7 @@ static void requestQueryNetworkSelectionMode(
return;
error:
at_response_free(p_response);
- ALOGE("requestQueryNetworkSelectionMode must never return error when radio is on");
+ RLOGE("requestQueryNetworkSelectionMode must never return error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
}
@@ -713,7 +713,7 @@ static void requestGetCurrentCalls(void *data, size_t datalen, RIL_Token t)
&& p_calls[i].state == RIL_CALL_ACTIVE
&& s_repollCallsCount < REPOLL_CALLS_COUNT_MAX
) {
- ALOGI(
+ RLOGI(
"Hit WORKAROUND_ERRONOUS_ANSWER case."
" Repoll count: %d\n", s_repollCallsCount);
s_repollCallsCount++;
@@ -853,7 +853,7 @@ static void requestSignalStrength(void *data, size_t datalen, RIL_Token t)
return;
error:
- ALOGE("requestSignalStrength must never return an error when radio is on");
+ RLOGE("requestSignalStrength must never return an error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
at_response_free(p_response);
}
@@ -879,7 +879,7 @@ static void requestSetPreferredNetworkType( int request, void *data,
int err;
int32_t preferred = net2pmask[value];
- ALOGD("requestSetPreferredNetworkType: current: %x. New: %x", PREFERRED_NETWORK(sMdmInfo), preferred);
+ RLOGD("requestSetPreferredNetworkType: current: %x. New: %x", PREFERRED_NETWORK(sMdmInfo), preferred);
if (!networkModePossible(sMdmInfo, value)) {
RIL_onRequestComplete(t, RIL_E_MODE_NOT_SUPPORTED, NULL, 0);
return;
@@ -889,10 +889,10 @@ static void requestSetPreferredNetworkType( int request, void *data,
return;
}
old = PREFERRED_NETWORK(sMdmInfo);
- ALOGD("old != preferred: %d", old != preferred);
+ RLOGD("old != preferred: %d", old != preferred);
if (old != preferred) {
asprintf(&cmd, "AT+CTEC=%d,\"%x\"", current, preferred);
- ALOGD("Sending command: <%s>", cmd);
+ RLOGD("Sending command: <%s>", cmd);
err = at_send_command_singleline(cmd, "+CTEC:", &p_response);
free(cmd);
if (err || !p_response->success) {
@@ -934,7 +934,7 @@ static void requestGetPreferredNetworkType(int request, void *data,
return;
}
}
- ALOGE("Unknown preferred mode received from modem: %d", preferred);
+ RLOGE("Unknown preferred mode received from modem: %d", preferred);
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
break;
}
@@ -1016,7 +1016,7 @@ static void requestCdmaDeviceIdentity(int request, void *data,
return;
error:
- ALOGE("requestCdmaDeviceIdentity must never return an error when radio is on");
+ RLOGE("requestCdmaDeviceIdentity must never return an error when radio is on");
at_response_free(p_response);
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
}
@@ -1063,7 +1063,7 @@ static void requestCdmaSetSubscriptionSource(int request, void *data,
char *cmd = NULL;
if (!ss || !datalen) {
- ALOGE("RIL_REQUEST_CDMA_SET_SUBSCRIPTION without data!");
+ RLOGE("RIL_REQUEST_CDMA_SET_SUBSCRIPTION without data!");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
return;
}
@@ -1110,7 +1110,7 @@ static void requestCdmaSubscription(int request, void *data,
return;
error:
- ALOGE("requestRegistrationState must never return an error when radio is on");
+ RLOGE("requestRegistrationState must never return an error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
}
@@ -1173,7 +1173,7 @@ static int parseRegistrationState(char *str, int *type, int *items, int **respon
int count = 3;
int commas;
- ALOGD("parseRegistrationState. Parsing: %s",str);
+ RLOGD("parseRegistrationState. Parsing: %s",str);
err = at_tok_start(&line);
if (err < 0) goto error;
@@ -1289,7 +1289,7 @@ static void requestRegistrationState(int request, void *data,
int count = 3;
int type, startfrom;
- ALOGD("requestRegistrationState");
+ RLOGD("requestRegistrationState");
if (request == RIL_REQUEST_VOICE_REGISTRATION_STATE) {
cmd = "AT+CREG?";
prefix = "+CREG:";
@@ -1320,7 +1320,7 @@ static void requestRegistrationState(int request, void *data,
* the 5th and 6th byte(s) are optional.
*/
if (is3gpp2(type) == 1) {
- ALOGD("registration state type: 3GPP2");
+ RLOGD("registration state type: 3GPP2");
// TODO: Query modem
startfrom = 3;
if(request == RIL_REQUEST_VOICE_REGISTRATION_STATE) {
@@ -1340,7 +1340,7 @@ static void requestRegistrationState(int request, void *data,
asprintf(&responseStr[3], "8"); // Available data radio technology
}
} else { // type == RADIO_TECH_3GPP
- ALOGD("registration state type: 3GPP");
+ RLOGD("registration state type: 3GPP");
startfrom = 0;
asprintf(&responseStr[1], "%x", registration[1]);
asprintf(&responseStr[2], "%x", registration[2]);
@@ -1384,7 +1384,7 @@ error:
free(responseStr);
responseStr = NULL;
}
- ALOGE("requestRegistrationState must never return an error when radio is on");
+ RLOGE("requestRegistrationState must never return an error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
at_response_free(p_response);
}
@@ -1455,7 +1455,7 @@ static void requestOperator(void *data, size_t datalen, RIL_Token t)
return;
error:
- ALOGE("requestOperator must not return error when radio is on");
+ RLOGE("requestOperator must not return error when radio is on");
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
at_response_free(p_response);
}
@@ -1466,12 +1466,12 @@ static void requestCdmaSendSMS(void *data, size_t datalen, RIL_Token t)
RIL_SMS_Response response;
RIL_CDMA_SMS_Message* rcsm;
- ALOGD("requestCdmaSendSMS datalen=%d, sizeof(RIL_CDMA_SMS_Message)=%d",
+ RLOGD("requestCdmaSendSMS datalen=%d, sizeof(RIL_CDMA_SMS_Message)=%d",
datalen, sizeof(RIL_CDMA_SMS_Message));
// verify data content to test marshalling/unmarshalling:
rcsm = (RIL_CDMA_SMS_Message*)data;
- ALOGD("TeleserviceID=%d, bIsServicePresent=%d, \
+ RLOGD("TeleserviceID=%d, bIsServicePresent=%d, \
uServicecategory=%d, sAddress.digit_mode=%d, \
sAddress.Number_mode=%d, sAddress.number_type=%d, ",
rcsm->uTeleserviceID, rcsm->bIsServicePresent,
@@ -1557,12 +1557,12 @@ static void requestSetupDataCall(void *data, size_t datalen, RIL_Token t)
int retry = 10;
const char *pdp_type;
- ALOGD("requesting data connection to APN '%s'", apn);
+ RLOGD("requesting data connection to APN '%s'", apn);
fd = open ("/dev/qmi", O_RDWR);
if (fd >= 0) { /* the device doesn't exist on the emulator */
- ALOGD("opened the qmi device\n");
+ RLOGD("opened the qmi device\n");
asprintf(&cmd, "up:%s", apn);
len = strlen(cmd);
@@ -1572,7 +1572,7 @@ static void requestSetupDataCall(void *data, size_t datalen, RIL_Token t)
} while (written < 0 && errno == EINTR);
if (written < 0) {
- ALOGE("### ERROR writing to /dev/qmi");
+ RLOGE("### ERROR writing to /dev/qmi");
close(fd);
goto error;
}
@@ -1589,25 +1589,25 @@ static void requestSetupDataCall(void *data, size_t datalen, RIL_Token t)
} while (rlen < 0 && errno == EINTR);
if (rlen < 0) {
- ALOGE("### ERROR reading from /dev/qmi");
+ RLOGE("### ERROR reading from /dev/qmi");
close(fd);
goto error;
} else {
status[rlen] = '\0';
- ALOGD("### status: %s", status);
+ RLOGD("### status: %s", status);
}
} while (strncmp(status, "STATE=up", 8) && strcmp(status, "online") && --retry);
close(fd);
if (retry == 0) {
- ALOGE("### Failed to get data connection up\n");
+ RLOGE("### Failed to get data connection up\n");
goto error;
}
qmistatus = system("netcfg rmnet0 dhcp");
- ALOGD("netcfg rmnet0 dhcp: status %d\n", qmistatus);
+ RLOGD("netcfg rmnet0 dhcp: status %d\n", qmistatus);
if (qmistatus < 0) goto error;
@@ -1667,7 +1667,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 {
- ALOGE("unsupported arg to RIL_REQUEST_SMS_ACKNOWLEDGE\n");
+ RLOGE("unsupported arg to RIL_REQUEST_SMS_ACKNOWLEDGE\n");
goto error;
}
@@ -1835,7 +1835,7 @@ onRequest (int request, void *data, size_t datalen, RIL_Token t)
ATResponse *p_response;
int err;
- ALOGD("onRequest: %s", requestToString(request));
+ RLOGD("onRequest: %s", requestToString(request));
/* Ignore all requests except RIL_REQUEST_GET_SIM_STATUS
* when RADIO_STATE_UNAVAILABLE.
@@ -2071,12 +2071,12 @@ onRequest (int request, void *data, size_t datalen, RIL_Token t)
int i;
const char ** cur;
- ALOGD("got OEM_HOOK_STRINGS: 0x%8p %lu", data, (long)datalen);
+ RLOGD("got OEM_HOOK_STRINGS: 0x%8p %lu", data, (long)datalen);
for (i = (datalen / sizeof (char *)), cur = (const char **)data ;
i > 0 ; cur++, i --) {
- ALOGD("> '%s'", *cur);
+ RLOGD("> '%s'", *cur);
}
// echo back strings
@@ -2179,7 +2179,7 @@ onRequest (int request, void *data, size_t datalen, RIL_Token t)
} // Fall-through if tech is not cdma
default:
- ALOGD("Request not supported. Tech: %d",TECH(sMdmInfo));
+ RLOGD("Request not supported. Tech: %d",TECH(sMdmInfo));
RIL_onRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
break;
}
@@ -2223,12 +2223,12 @@ static const char * getVersion(void)
static void
setRadioTechnology(ModemInfo *mdm, int newtech)
{
- ALOGD("setRadioTechnology(%d)", newtech);
+ RLOGD("setRadioTechnology(%d)", newtech);
int oldtech = TECH(mdm);
if (newtech != oldtech) {
- ALOGD("Tech change (%d => %d)", oldtech, newtech);
+ RLOGD("Tech change (%d => %d)", oldtech, newtech);
TECH(mdm) = newtech;
if (techFromModemType(newtech) != techFromModemType(oldtech)) {
int tech = techFromModemType(TECH(sMdmInfo));
@@ -2243,7 +2243,7 @@ setRadioTechnology(ModemInfo *mdm, int newtech)
static void
setRadioState(RIL_RadioState newState)
{
- ALOGD("setRadioState(%d)", newState);
+ RLOGD("setRadioState(%d)", newState);
RIL_RadioState oldState;
pthread_mutex_lock(&s_state_mutex);
@@ -2371,7 +2371,7 @@ getSIMStatus()
char *cpinLine;
char *cpinResult;
- ALOGD("getSIMStatus(). sState: %d",sState);
+ RLOGD("getSIMStatus(). sState: %d",sState);
if (sState == RADIO_STATE_OFF || sState == RADIO_STATE_UNAVAILABLE) {
ret = SIM_NOT_READY;
goto done;
@@ -2558,7 +2558,7 @@ static void pollSIMState (void *param)
case SIM_PUK:
case SIM_NETWORK_PERSONALIZATION:
default:
- ALOGI("SIM ABSENT or LOCKED");
+ RLOGI("SIM ABSENT or LOCKED");
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, NULL, 0);
return;
@@ -2567,7 +2567,7 @@ static void pollSIMState (void *param)
return;
case SIM_READY:
- ALOGI("SIM_READY");
+ RLOGI("SIM_READY");
onSIMReady();
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, NULL, 0);
return;
@@ -2625,10 +2625,10 @@ int parse_technology_response( const char *response, int *current, int32_t *pref
char *str_pt;
line = p = strdup(response);
- ALOGD("Response: %s", line);
+ RLOGD("Response: %s", line);
err = at_tok_start(&p);
if (err || !at_tok_hasmore(&p)) {
- ALOGD("err: %d. p: %s", err, p);
+ RLOGD("err: %d. p: %s", err, p);
free(line);
return -1;
}
@@ -2640,7 +2640,7 @@ int parse_technology_response( const char *response, int *current, int32_t *pref
}
if (current) *current = ct;
- ALOGD("line remaining after int: %s", p);
+ RLOGD("line remaining after int: %s", p);
err = at_tok_nexthexint(&p, &pt);
if (err) {
@@ -2662,7 +2662,7 @@ int query_supported_techs( ModemInfo *mdm, int *supported )
char *tok;
char *line;
- ALOGD("query_supported_techs");
+ RLOGD("query_supported_techs");
err = at_send_command_singleline("AT+CTEC=?", "+CTEC:", &p_response);
if (err || !p_response->success)
goto error;
@@ -2700,14 +2700,14 @@ int query_ctec(ModemInfo *mdm, int *current, int32_t *preferred)
int err;
int res;
- ALOGD("query_ctec. current: %d, preferred: %d", (int)current, (int) preferred);
+ RLOGD("query_ctec. current: %d, preferred: %d", (int)current, (int) preferred);
err = at_send_command_singleline("AT+CTEC?", "+CTEC:", &response);
if (!err && response->success) {
res = parse_technology_response(response->p_intermediates->line, current, preferred);
at_response_free(response);
return res;
}
- ALOGE("Error executing command: %d. response: %x. status: %d", err, (int)response, response? response->success : -1);
+ RLOGE("Error executing command: %d. response: %x. status: %d", err, (int)response, response? response->success : -1);
at_response_free(response);
return -1;
}
@@ -2744,7 +2744,7 @@ static void probeForModemMode(ModemInfo *info)
// Try that first
if (is_multimode_modem(info)) {
- ALOGI("Found Multimode Modem. Supported techs mask: %8.8x. Current tech: %d",
+ RLOGI("Found Multimode Modem. Supported techs mask: %8.8x. Current tech: %d",
info->supportedTechs, info->currentTech);
return;
}
@@ -2759,14 +2759,14 @@ static void probeForModemMode(ModemInfo *info)
// TODO: find out if we really support EvDo
info->supportedTechs = MDM_CDMA | MDM_EVDO;
info->currentTech = MDM_CDMA;
- ALOGI("Found CDMA Modem");
+ RLOGI("Found CDMA Modem");
return;
}
if (!err) at_response_free(response);
// TODO: find out if modem really supports WCDMA/LTE
info->supportedTechs = MDM_GSM | MDM_WCDMA | MDM_LTE;
info->currentTech = MDM_GSM;
- ALOGI("Found GSM Modem");
+ RLOGI("Found GSM Modem");
}
/**
@@ -2891,7 +2891,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
free(line);
if (err != 0) {
- ALOGE("invalid NITZ line %s\n", s);
+ RLOGE("invalid NITZ line %s\n", s);
} else {
RIL_onUnsolicitedResponse (
RIL_UNSOL_NITZ_TIME_RECEIVED,
@@ -2941,14 +2941,14 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
switch (parse_technology_response(s, &tech, NULL))
{
case -1: // no argument could be parsed.
- ALOGE("invalid CTEC line %s\n", s);
+ RLOGE("invalid CTEC line %s\n", s);
break;
case 1: // current mode correctly parsed
case 0: // preferred mode correctly parsed
mask = 1 << tech;
if (mask != MDM_GSM && mask != MDM_CDMA &&
mask != MDM_WCDMA && mask != MDM_LTE) {
- ALOGE("Unknown technology %d\n", tech);
+ RLOGE("Unknown technology %d\n", tech);
} else {
setRadioTechnology(sMdmInfo, tech);
}
@@ -2958,7 +2958,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
int source = 0;
line = p = strdup(s);
if (!line) {
- ALOGE("+CCSS: Unable to allocate memory");
+ RLOGE("+CCSS: Unable to allocate memory");
return;
}
if (at_tok_start(&p) < 0) {
@@ -2966,7 +2966,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
return;
}
if (at_tok_nextint(&p, &source) < 0) {
- ALOGE("invalid +CCSS response: %s", line);
+ RLOGE("invalid +CCSS response: %s", line);
free(line);
return;
}
@@ -2978,7 +2978,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
int unsol;
line = p = strdup(s);
if (!line) {
- ALOGE("+WSOS: Unable to allocate memory");
+ RLOGE("+WSOS: Unable to allocate memory");
return;
}
if (at_tok_start(&p) < 0) {
@@ -2986,7 +2986,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
return;
}
if (at_tok_nextbool(&p, &state) < 0) {
- ALOGE("invalid +WSOS response: %s", line);
+ RLOGE("invalid +WSOS response: %s", line);
free(line);
return;
}
@@ -3001,16 +3001,16 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
int version = -1;
line = p = strdup(s);
if (!line) {
- ALOGE("+WPRL: Unable to allocate memory");
+ RLOGE("+WPRL: Unable to allocate memory");
return;
}
if (at_tok_start(&p) < 0) {
- ALOGE("invalid +WPRL response: %s", s);
+ RLOGE("invalid +WPRL response: %s", s);
free(line);
return;
}
if (at_tok_nextint(&p, &version) < 0) {
- ALOGE("invalid +WPRL response: %s", s);
+ RLOGE("invalid +WPRL response: %s", s);
free(line);
return;
}
@@ -3024,7 +3024,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
/* Called on command or reader thread */
static void onATReaderClosed()
{
- ALOGI("AT channel closed\n");
+ RLOGI("AT channel closed\n");
at_close();
s_closed = 1;
@@ -3034,7 +3034,7 @@ static void onATReaderClosed()
/* Called on command thread */
static void onATTimeout()
{
- ALOGI("AT channel timeout; closing\n");
+ RLOGI("AT channel timeout; closing\n");
at_close();
s_closed = 1;
@@ -3120,7 +3120,7 @@ mainLoop(void *param)
ret = at_open(fd, onUnsolicited);
if (ret < 0) {
- ALOGE ("AT error %d on at_open\n", ret);
+ RLOGE ("AT error %d on at_open\n", ret);
return 0;
}
@@ -3131,7 +3131,7 @@ mainLoop(void *param)
sleep(1);
waitForClose();
- ALOGI("Re-opening after close");
+ RLOGI("Re-opening after close");
}
}
@@ -3156,18 +3156,18 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **a
usage(argv[0]);
return NULL;
}
- ALOGI("Opening loopback port %d\n", s_port);
+ RLOGI("Opening loopback port %d\n", s_port);
break;
case 'd':
s_device_path = optarg;
- ALOGI("Opening tty device %s\n", s_device_path);
+ RLOGI("Opening tty device %s\n", s_device_path);
break;
case 's':
s_device_path = optarg;
s_device_socket = 1;
- ALOGI("Opening socket %s\n", s_device_path);
+ RLOGI("Opening socket %s\n", s_device_path);
break;
default:
@@ -3183,7 +3183,7 @@ const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **a
sMdmInfo = calloc(1, sizeof(ModemInfo));
if (!sMdmInfo) {
- ALOGE("Unable to alloc memory for ModemInfo");
+ RLOGE("Unable to alloc memory for ModemInfo");
return NULL;
}
pthread_attr_init (&attr);
@@ -3206,18 +3206,18 @@ int main (int argc, char **argv)
if (s_port == 0) {
usage(argv[0]);
}
- ALOGI("Opening loopback port %d\n", s_port);
+ RLOGI("Opening loopback port %d\n", s_port);
break;
case 'd':
s_device_path = optarg;
- ALOGI("Opening tty device %s\n", s_device_path);
+ RLOGI("Opening tty device %s\n", s_device_path);
break;
case 's':
s_device_path = optarg;
s_device_socket = 1;
- ALOGI("Opening socket %s\n", s_device_path);
+ RLOGI("Opening socket %s\n", s_device_path);
break;
default:
diff --git a/rild/rild.c b/rild/rild.c
index b1c5bac0..9e57e893 100644
--- a/rild/rild.c
+++ b/rild/rild.c
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
int fd = open("/proc/cmdline",O_RDONLY);
if (fd < 0) {
- ALOGD("could not open /proc/cmdline:%s", strerror(errno));
+ RLOGD("could not open /proc/cmdline:%s", strerror(errno));
goto OpenLib;
}
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
while (len == -1 && errno == EINTR);
if (len < 0) {
- ALOGD("could not read /proc/cmdline:%s", strerror(errno));
+ RLOGD("could not read /proc/cmdline:%s", strerror(errno));
close(fd);
goto OpenLib;
}
@@ -193,13 +193,13 @@ int main(int argc, char **argv)
done = 1;
break;
}
- ALOGD("could not connect to %s socket: %s",
+ RLOGD("could not connect to %s socket: %s",
QEMUD_SOCKET_NAME, strerror(errno));
if (--tries == 0)
break;
}
if (!done) {
- ALOGE("could not connect to %s socket (giving up): %s",
+ RLOGE("could not connect to %s socket (giving up): %s",
QEMUD_SOCKET_NAME, strerror(errno));
while(1)
sleep(0x00ffffff);
@@ -235,7 +235,7 @@ int main(int argc, char **argv)
hasLibArgs = 1;
rilLibPath = REFERENCE_RIL_PATH;
- ALOGD("overriding with %s %s", arg_overrides[1], arg_overrides[2]);
+ RLOGD("overriding with %s %s", arg_overrides[1], arg_overrides[2]);
}
}
OpenLib:
@@ -245,7 +245,7 @@ OpenLib:
dlHandle = dlopen(rilLibPath, RTLD_NOW);
if (dlHandle == NULL) {
- ALOGE("dlopen failed: %s", dlerror());
+ RLOGE("dlopen failed: %s", dlerror());
exit(-1);
}
@@ -254,7 +254,7 @@ OpenLib:
rilInit = (const RIL_RadioFunctions *(*)(const struct RIL_Env *, int, char **))dlsym(dlHandle, "RIL_Init");
if (rilInit == NULL) {
- ALOGE("RIL_Init not defined or exported in %s\n", rilLibPath);
+ RLOGE("RIL_Init not defined or exported in %s\n", rilLibPath);
exit(-1);
}