Rename 'attached' to 'has_remote_addr'

Even with future support for detaching and reattaching, this variable will keep
its original meaning.
This commit is contained in:
Keegan McAllister
2012-03-06 11:54:56 -08:00
parent d7f7e7c4ae
commit e35733a2c1
6 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -352,7 +352,7 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network
break;
}
if ( network.attached() && (!network.shutdown_in_progress()) ) {
if ( network.has_remote_addr() && (!network.shutdown_in_progress()) ) {
network.start_shutdown();
} else {
break;
@@ -368,7 +368,7 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network
if ( (pollfds[ 1 ].revents)
& (POLLERR | POLLHUP | POLLNVAL) ) {
/* host problem */
if ( network.attached() ) {
if ( network.has_remote_addr() ) {
network.start_shutdown();
} else {
break;
+4 -4
View File
@@ -211,7 +211,7 @@ bool STMClient::process_user_input( int fd )
if ( quit_sequence_started ) {
if ( the_byte == '.' ) { /* Quit sequence is Ctrl-^ . */
if ( network->attached() && (!network->shutdown_in_progress()) ) {
if ( network->has_remote_addr() && (!network->shutdown_in_progress()) ) {
overlays.get_notification_engine().set_notification_string( wstring( L"Exiting on user request..." ) );
network->start_shutdown();
return true;
@@ -312,7 +312,7 @@ void STMClient::main( void )
if ( pollfds[ 1 ].revents & POLLIN ) {
/* input from the user needs to be fed to the network */
if ( !process_user_input( pollfds[ 1 ].fd ) ) {
if ( !network->attached() ) {
if ( !network->has_remote_addr() ) {
break;
} else if ( !network->shutdown_in_progress() ) {
overlays.get_notification_engine().set_notification_string( wstring( L"Exiting..." ) );
@@ -337,7 +337,7 @@ void STMClient::main( void )
break;
}
if ( !network->attached() ) {
if ( !network->has_remote_addr() ) {
break;
} else if ( !network->shutdown_in_progress() ) {
overlays.get_notification_engine().set_notification_string( wstring( L"Signal received, shutting down..." ) );
@@ -354,7 +354,7 @@ void STMClient::main( void )
if ( (pollfds[ 1 ].revents)
& (POLLERR | POLLHUP | POLLNVAL) ) {
/* user problem */
if ( !network->attached() ) {
if ( !network->has_remote_addr() ) {
break;
} else if ( !network->shutdown_in_progress() ) {
overlays.get_notification_engine().set_notification_string( wstring( L"Exiting..." ) );