am d9a06afb: Add a logging handler on timeout.
* commit 'd9a06afb19156b61ee85c975a292d884bba09c7f':
Add a logging handler on timeout.
diff --git a/adb/adb.cpp b/adb/adb.cpp
index f64b19f..c09aee3 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -919,7 +919,7 @@
if(!strncmp(service,"get-state",strlen("get-state"))) {
transport = acquire_one_transport(CS_ANY, ttype, serial, NULL);
SendOkay(reply_fd);
- SendProtocolString(reply_fd, transport->connection_state_name());
+ SendProtocolString(reply_fd, transport ? transport->connection_state_name() : "unknown");
return 0;
}
#endif // ADB_HOST
diff --git a/adb/commandline.cpp b/adb/commandline.cpp
index fd9953c..374a2e5 100644
--- a/adb/commandline.cpp
+++ b/adb/commandline.cpp
@@ -741,8 +741,10 @@
static int mkdirs(const char *path)
{
+ std::string holder(path);
+
int ret;
- char *x = (char *)path + 1;
+ char *x = &holder[1];
for(;;) {
x = adb_dirstart(x);
@@ -759,7 +761,7 @@
}
static int backup(int argc, const char** argv) {
- const char* filename = "./backup.ab";
+ const char* filename = "backup.ab";
/* find, extract, and use any -f argument */
for (int i = 1; i < argc; i++) {