ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/idar/idar.c
(Generate patch)

Comparing projects/cms/source/idar/idar.c (file contents):
Revision 1.15 by pajs, Thu Apr 10 12:31:19 2003 UTC vs.
Revision 1.16 by tdb, Mon Jun 9 13:47:58 2003 UTC

# Line 1070 | Line 1070 | int main(int argc, char **argv){
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){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines