p.writeInt32 (e);
- if (e == RIL_E_SUCCESS) {
- /* process response on success */
+ if (response != NULL) {
+ // there is a response payload, no matter success or not.
ret = pRI->pCI->responseFunction(p, response, responselen);
/* if an error occurred, rewind and mark it */
p.setDataPosition(errorOffset);
p.writeInt32 (ret);
}
- } else {
- appendPrintBuf("%s returns %s", printBuf, failCauseToString(e));
+ }
+
+ if (e != RIL_E_SUCCESS) {
+ appendPrintBuf("%s fails by %s", printBuf, failCauseToString(e));
}
if (s_fdCommand < 0) {