1070 |
|
strlcpy(display_config.sortby, "CPU Used", SORTBYMAXNAME); |
1071 |
|
} |
1072 |
|
|
1073 |
< |
if(argc<(optind+2)){ |
1074 |
< |
printf("Usage is %s <-d lines> hostname port <machine list>\n", argv[0]); |
1075 |
< |
exit(1); |
1076 |
< |
} |
1073 |
> |
servername=DEF_SERVER_NAME; |
1074 |
> |
server_control_port=DEF_SERVER_PORT; |
1075 |
|
|
1076 |
< |
servername=argv[optind]; |
1077 |
< |
server_control_port=atoi(argv[optind+1]); |
1076 |
> |
if(argc>=(optind+2)){ |
1077 |
> |
servername=argv[optind]; |
1078 |
> |
server_control_port=atoi(argv[optind+1]); |
1079 |
> |
} |
1080 |
|
|
1081 |
|
control=create_tcp_connection(servername, server_control_port); |
1082 |
|
if(control==NULL){ |