| 5 | #include <fuzzer/utils/log.h> |
| 6 | #include <stdio.h> |
| 7 | status_t Executor::run(Transaction &tx) { |
| 8 | NativeServiceManager nsm; |
| 9 | sp<IBinder> interface = nsm.getService(tx); |
| 10 | if (interface == NULL) { |
| 11 | // clear tx status |
| 12 | usedTxs.erase(tx.txName); |
| 13 | // TODO: consider when this tx is used by some dependency. |
| 14 | return 0; |
| 15 | } |
| 16 | FUZZER_LOGI("Start issuing transaction %s.", tx.txName.c_str()); |
| 17 | status_t ret = interface->transact(tx.code, tx.data, &tx.reply, tx.flags); |
| 18 | FUZZER_LOGI("Transaction return status: %d.", ret); |
| 19 | // clear tx status |
| 20 | usedTxs.erase(tx.txName); |
| 21 | return ret; |
| 22 | } |