Detached warning: Omit spurious utmp entries (generated by screen)
This commit is contained in:
@@ -816,7 +816,9 @@ void warn_unattached( const string & ignore_entry )
|
|||||||
&& (username == string( entry->ut_user )) ) {
|
&& (username == string( entry->ut_user )) ) {
|
||||||
/* does line show unattached mosh session */
|
/* does line show unattached mosh session */
|
||||||
string text( entry->ut_host );
|
string text( entry->ut_host );
|
||||||
if ( (text.substr( 0, 5 ) == "mosh ")
|
if ( (text.size() >= 5)
|
||||||
|
&& (text.substr( 0, 5 ) == "mosh ")
|
||||||
|
&& (text[ text.size() - 1 ] == ']')
|
||||||
&& (text != ignore_entry)
|
&& (text != ignore_entry)
|
||||||
&& device_exists( entry->ut_line ) ) {
|
&& device_exists( entry->ut_line ) ) {
|
||||||
unattached_mosh_servers.push_back( text );
|
unattached_mosh_servers.push_back( text );
|
||||||
|
|||||||
Reference in New Issue
Block a user