Implemented these changes: - Make this code C++. - Avoid hangs by adding a timeout. - Add the necessary TEMP_FAILURE_RETRY calls. - Restructure the code a bit. Bug: 18800936 Change-Id: Iba9f86a4c7beee4f0f36e51234855f4c0834db47
Bug: 12181612 Change-Id: If7ae97de1e42890dac37d036ead669ccda65e688
Change-Id: I0571813c1cfcf66abd36eb9f178fc49b618e88a6 Signed-off-by: Mike Lockwood <lockwood@google.com>