Connection: Store the port number as a string

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2013-08-17 05:31:06 -04:00
parent 9187e307c6
commit c1f96b37a1
9 changed files with 22 additions and 23 deletions
+1 -4
View File
@@ -117,7 +117,6 @@ int main( int argc, char *argv[] )
}
char *ip, *desired_port;
int port;
if ( argc - optind != 2 ) {
usage( argv[ 0 ] );
@@ -142,8 +141,6 @@ int main( int argc, char *argv[] )
exit( 1 );
}
port = myatoi( desired_port );
/* Read key from environment */
char *env_key = getenv( "MOSH_KEY" );
if ( env_key == NULL ) {
@@ -170,7 +167,7 @@ int main( int argc, char *argv[] )
set_native_locale();
try {
STMClient client( ip, port, key, predict_mode );
STMClient client( ip, desired_port, key, predict_mode );
client.init();
try {