diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-03-22 15:34:55 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2016-03-22 15:34:55 -0500 |
commit | ba426a05796244070d9cae1e18d1885bed261b55 (patch) | |
tree | 192e91a4873db0d9cff0f8536fa7531e6c7a1a2c /tests | |
parent | 0b9a8d08b2ea7d245ffd00ce465e6c859905c547 (diff) | |
download | ayatana-indicator-display-ba426a05796244070d9cae1e18d1885bed261b55.tar.gz ayatana-indicator-display-ba426a05796244070d9cae1e18d1885bed261b55.tar.bz2 ayatana-indicator-display-ba426a05796244070d9cae1e18d1885bed261b55.zip |
in the mock ADB server, keep making a request until a response is received.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils/adbd-server.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/utils/adbd-server.h b/tests/utils/adbd-server.h index 740faaa..968c1f0 100644 --- a/tests/utils/adbd-server.h +++ b/tests/utils/adbd-server.h @@ -80,7 +80,6 @@ private: // pop the next request off the stack auto request = requests.front(); - requests.erase(requests.begin()); // send the request g_message("GAdbdServer::Impl::worker_func() sending req [%s]", request.c_str()); @@ -114,7 +113,10 @@ private: } const std::string response(buf, std::string::size_type(n_bytes)); g_message("server got response: %s", response.c_str()); - m_responses.push_back(response); + if (!response.empty()) { + m_responses.push_back(response); + requests.erase(requests.begin()); + } // cleanup g_clear_object(&client_socket); |