Fix adc admin client main loop so that it exits on error.

This commit is contained in:
Jan Vidar Krey 2011-01-07 10:52:32 +01:00
parent 5ca27a1a6d
commit ff5609b018
1 changed files with 2 additions and 4 deletions

View File

@ -26,6 +26,7 @@ static int handle(struct ADC_client* client, enum ADC_client_callback_type type,
case ADC_CLIENT_PASSWORD_REQ:
puts("*** Requesting password.");
break;
case ADC_CLIENT_LOGGED_IN:
puts("*** Logged in.");
@ -80,10 +81,7 @@ int main(int argc, char** argv)
ADC_client_set_callback(&client, handle);
ADC_client_connect(&client, argv[1]);
while (running)
{
net_backend_process();
}
while (running && net_backend_process()) { }
ADC_client_destroy(&client);
net_destroy();