Fix exit value on SERVERQUIT

This commit is contained in:
Manuel Pégourié-Gonnard 2013-09-07 17:09:14 +02:00 committed by Paul Bakker
parent 7669f28421
commit e8ea0c0421
2 changed files with 5 additions and 2 deletions

View File

@ -861,8 +861,8 @@ send_request:
{ {
--opt.reconnect; --opt.reconnect;
printf( " ! Press a key to reconnect\n" ); // printf( " ! Press a key to reconnect\n" );
(void) getchar(); // (void) getchar();
printf( " . Reconnecting with saved session..." ); printf( " . Reconnecting with saved session..." );
fflush( stdout ); fflush( stdout );

View File

@ -822,7 +822,10 @@ reset:
printf( " %d bytes read\n\n%s\n", len, (char *) buf ); printf( " %d bytes read\n\n%s\n", len, (char *) buf );
if( memcmp( buf, "SERVERQUIT", 10 ) == 0 ) if( memcmp( buf, "SERVERQUIT", 10 ) == 0 )
{
ret = 0;
goto exit; goto exit;
}
if( ret > 0 ) if( ret > 0 )
break; break;