static struct option const long_options[] = {
{"config", required_argument, NULL, 'c'},
static struct option const long_options[] = {
{"config", required_argument, NULL, 'c'},
{"net", required_argument, NULL, 'n'},
{"help", no_argument, NULL, 1},
{"version", no_argument, NULL, 2},
{"net", required_argument, NULL, 'n'},
{"help", no_argument, NULL, 1},
{"version", no_argument, NULL, 2},
- while((r = getopt_long(argc, argv, "c:n:h:", long_options, &option_index)) != EOF) {
+ while((r = getopt_long(argc, argv, "c:n:", long_options, &option_index)) != EOF) {
fprintf(stderr, "Could not open pid file %s: %s\n", pidfilename, strerror(errno));
return 1;
}
fprintf(stderr, "Could not open pid file %s: %s\n", pidfilename, strerror(errno));
return 1;
}
- if(fscanf(f, "%1024s %128s %20d", controlcookie, port, &pid) != 3) {
+ if(fscanf(f, "%20d %1024s %128s port %128s", &pid, controlcookie, host, port) != 4) {