summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-07-21 16:35:51 +0200
committerGravatar Martin Szulecki2010-07-21 16:35:51 +0200
commit6ab686bd4bfa1459d67fa108697f0bac1f4d67ad (patch)
tree308e51bb2048dc6017c4194e9e9607600b0ad6d2 /src
parentcf463744d84c55ba8e256ca89caf866fe1beb857 (diff)
downloadlibirecovery-6ab686bd4bfa1459d67fa108697f0bac1f4d67ad.tar.gz
libirecovery-6ab686bd4bfa1459d67fa108697f0bac1f4d67ad.tar.bz2
irecovery: Only request data on initial connect, not after every command
This prevents possibly obsolete usb traffic. It appears requesting data after every command is also no longer needed due to the new event handling code.
Diffstat (limited to 'src')
-rw-r--r--src/irecovery.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/irecovery.c b/src/irecovery.c
index 327527b..da5812d 100644
--- a/src/irecovery.c
+++ b/src/irecovery.c
@@ -104,13 +104,13 @@ void init_shell(irecv_client_t client) {
irecv_event_subscribe(client, IRECV_RECEIVED, &received_cb, NULL);
irecv_event_subscribe(client, IRECV_PRECOMMAND, &precommand_cb, NULL);
irecv_event_subscribe(client, IRECV_POSTCOMMAND, &postcommand_cb, NULL);
- while (!quit) {
- error = irecv_receive(client);
- if (error != IRECV_E_SUCCESS) {
- debug("%s\n", irecv_strerror(error));
- break;
- }
+ error = irecv_receive(client);
+ if (error != IRECV_E_SUCCESS) {
+ debug("%s\n", irecv_strerror(error));
+ }
+
+ while (!quit) {
char* cmd = readline("> ");
if (cmd && *cmd) {
error = irecv_send_command(client, cmd);