| 233 | } |
| 234 | |
| 235 | int main(int argc, char *argv[]) |
| 236 | { |
| 237 | rig_model_t my_model = RIG_MODEL_DUMMY; |
| 238 | |
| 239 | int retcode; /* generic return code from functions */ |
| 240 | |
| 241 | int show_conf = 0; |
| 242 | int dump_caps_opt = 0; |
| 243 | const char *rig_file = NULL, *ptt_file = NULL, *dcd_file = NULL; |
| 244 | ptt_type_t ptt_type = RIG_PTT_NONE; |
| 245 | dcd_type_t dcd_type = RIG_DCD_NONE; |
| 246 | int serial_rate = 0; |
| 247 | const char *civaddr = NULL; /* NULL means no need to set conf */ |
| 248 | char conf_parms[MAXCONFLEN] = ""; |
| 249 | |
| 250 | struct addrinfo hints, *result, *saved_result; |
| 251 | int sock_listen; |
| 252 | // int reuseaddr = 1; |
| 253 | int twiddle_timeout = 0; |
| 254 | int twiddle_rit = 0; |
| 255 | int uplink = 0; |
| 256 | char host[NI_MAXHOST]; |
| 257 | char serv[NI_MAXSERV]; |
| 258 | char rigstartup[1024]; |
| 259 | char vbuf[1024]; |
| 260 | #if HAVE_SIGACTION |
| 261 | struct sigaction act; |
| 262 | #endif |
| 263 | |
| 264 | pthread_t thread; |
| 265 | pthread_attr_t attr; |
| 266 | int vfo_mode = 0; /* vfo_mode=0 means target VFO is current VFO */ |
| 267 | int i; |
| 268 | extern int is_rigctld; |
| 269 | |
| 270 | is_rigctld = 1; |
| 271 | |
| 272 | int err = setvbuf(stderr, vbuf, _IOFBF, sizeof(vbuf)); |
| 273 | |
| 274 | if (err) { rig_debug(RIG_DEBUG_ERR, "%s: setvbuf err=%s\n", __func__, strerror(err)); } |
| 275 | |
| 276 | rig_set_debug(verbose); |
| 277 | while (1) |
| 278 | { |
| 279 | int c; |
| 280 | int option_index = 0; |
| 281 | char dummy[2]; |
| 282 | |
| 283 | c = getopt_long(argc, |
| 284 | argv, |
| 285 | SHORT_OPTIONS, |
| 286 | long_options, |
| 287 | &option_index); |
| 288 | |
| 289 | if (c == -1) |
| 290 | { |
| 291 | break; |
| 292 | } |
nothing calls this directly
no test coverage detected