Changeset 13995 for trunk/FACT++/dim/src/util
- Timestamp:
- 05/31/12 10:03:22 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/dim/src/util/dim_send_command.c
r11071 r13995 74 74 int silent = 0; 75 75 char data[1024] = {'\0'}; 76 int data_int, data_int_flag = 0; 76 77 char dns_node[128], *ptr; 77 78 int dns_port = 0; … … 95 96 silent = 1; 96 97 } 98 else if(!strcmp(argv[i],"-i")) 99 { 100 data_int_flag = 1; 101 } 97 102 else 98 103 { … … 102 107 } 103 108 else if(!data[0]) 109 { 104 110 strcpy(data,argv[i]); 111 } 105 112 } 106 113 } … … 116 123 { 117 124 printf("dim_send_command: Insufficient parameters\n"); 118 printf("usage: dim_send_command <cmnd_name> [<data>] [-dns <dns_node>] [-s] \n");125 printf("usage: dim_send_command <cmnd_name> [<data>] [-dns <dns_node>] [-s] [-i]\n"); 119 126 exit(0); 120 127 } 121 128 if(!data[0]) 122 129 data[0] = '\0'; 123 dic_cmnd_callback(str,data,strlen(data)+1, rout, silent); 130 if(data_int_flag) 131 { 132 sscanf(data,"%d",&data_int); 133 dic_cmnd_callback(str,&data_int,sizeof(int), rout, silent); 134 } 135 else 136 { 137 dic_cmnd_callback(str,data,strlen(data)+1, rout, silent); 138 } 124 139 while(!received) 125 140 dim_wait();
Note:
See TracChangeset
for help on using the changeset viewer.