Make connection states a proper type.
Change-Id: I809f9b327c832b88dd63151bf7dcb012d88e81c4
diff --git a/services.cpp b/services.cpp
index 8ce9f71..a9edbe5 100644
--- a/services.cpp
+++ b/services.cpp
@@ -516,7 +516,7 @@
struct state_info {
TransportType transport_type;
char* serial;
- int state;
+ ConnectionState state;
};
static void wait_for_state(int fd, void* cookie)
@@ -665,13 +665,13 @@
if (!strncmp(name, "local", strlen("local"))) {
sinfo->transport_type = kTransportLocal;
- sinfo->state = CS_DEVICE;
+ sinfo->state = kCsDevice;
} else if (!strncmp(name, "usb", strlen("usb"))) {
sinfo->transport_type = kTransportUsb;
- sinfo->state = CS_DEVICE;
+ sinfo->state = kCsDevice;
} else if (!strncmp(name, "any", strlen("any"))) {
sinfo->transport_type = kTransportAny;
- sinfo->state = CS_DEVICE;
+ sinfo->state = kCsDevice;
} else {
if (sinfo->serial) {
free(sinfo->serial);