diff options
author | Martin Szulecki | 2013-09-26 22:48:28 +0200 |
---|---|---|
committer | Martin Szulecki | 2013-09-26 22:48:28 +0200 |
commit | 1557e9c8bcb83b90b55f43eb5375929fc382dfd6 (patch) | |
tree | 079ed369c4094145874aa05b1d3f47a8931d5d53 | |
parent | fc74c3e181fd5a279b960b6ecea73f04e075a2fc (diff) | |
download | libirecovery-1557e9c8bcb83b90b55f43eb5375929fc382dfd6.tar.gz libirecovery-1557e9c8bcb83b90b55f43eb5375929fc382dfd6.tar.bz2 |
Use more accurate names for "open device" methods which use the ecid
-rw-r--r-- | include/libirecovery.h | 4 | ||||
-rw-r--r-- | src/libirecovery.c | 8 | ||||
-rw-r--r-- | tools/irecovery.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index 091c29b..6a8b50b 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h @@ -199,8 +199,8 @@ static struct irecv_device irecv_devices[] = { void irecv_set_debug_level(int level); const char* irecv_strerror(irecv_error_t error); -irecv_error_t irecv_open_attempts(irecv_client_t* pclient, unsigned long long ecid, int attempts); -irecv_error_t irecv_open(irecv_client_t* client, unsigned long long ecid); +irecv_error_t irecv_open_with_ecid(irecv_client_t* client, unsigned long long ecid); +irecv_error_t irecv_open_with_ecid_and_attempts(irecv_client_t* pclient, unsigned long long ecid, int attempts); irecv_error_t irecv_reset(irecv_client_t client); irecv_error_t irecv_close(irecv_client_t client); irecv_error_t irecv_receive(irecv_client_t client); diff --git a/src/libirecovery.c b/src/libirecovery.c index 63bfecf..dd973f5 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -503,7 +503,7 @@ static int irecv_get_string_descriptor_ascii(irecv_client_t client, uint8_t desc #endif } -irecv_error_t irecv_open(irecv_client_t* pclient, unsigned long long ecid) { +irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, unsigned long long ecid) { if(libirecovery_debug) { irecv_set_debug_level(libirecovery_debug); } @@ -696,7 +696,7 @@ irecv_error_t irecv_reset(irecv_client_t client) { return IRECV_E_SUCCESS; } -irecv_error_t irecv_open_attempts(irecv_client_t* pclient, unsigned long long ecid, int attempts) { +irecv_error_t irecv_open_with_ecid_and_attempts(irecv_client_t* pclient, unsigned long long ecid, int attempts) { int i; for (i = 0; i < attempts; i++) { @@ -704,7 +704,7 @@ irecv_error_t irecv_open_attempts(irecv_client_t* pclient, unsigned long long ec irecv_close(*pclient); *pclient = NULL; } - if (irecv_open(pclient, ecid) != IRECV_E_SUCCESS) { + if (irecv_open_with_ecid(pclient, ecid) != IRECV_E_SUCCESS) { debug("Connection failed. Waiting 1 sec before retry.\n"); sleep(1); } else { @@ -1480,7 +1480,7 @@ irecv_client_t irecv_reconnect(irecv_client_t client, int initial_pause) { sleep(initial_pause); } - error = irecv_open_attempts(&new_client, ecid, 10); + error = irecv_open_with_ecid_and_attempts(&new_client, ecid, 10); if(error != IRECV_E_SUCCESS) { return NULL; } diff --git a/tools/irecovery.c b/tools/irecovery.c index f398ec1..8e2138c 100644 --- a/tools/irecovery.c +++ b/tools/irecovery.c @@ -334,7 +334,7 @@ int main(int argc, char* argv[]) { for (i = 0; i <= 5; i++) { debug("Attempting to connect... \n"); - if (irecv_open(&client, ecid) != IRECV_E_SUCCESS) + if (irecv_open_with_ecid(&client, ecid) != IRECV_E_SUCCESS) sleep(1); else break; |