Project

General

Profile

« Previous | Next » 

Revision 51ddf380

Added by Hamish Coleman over 15 years ago

  • ID 51ddf380dfa07a0ffa7c35e042bf7c14dff4401d

Fix wconsd_init to exit if the getopt processing indicates to do so

View differences:

wconsd.c
char *path = SCM_Install(&sd);
if (!path) {
printf("Service installation failed\n");
return 1;
return 2;
}
printf("Service '%s' installed, binary path '%s'\n",sd.name,path);
printf("You should now start the service using the service manager.\n");
return 0;
return 1;
}
case 'r':
// request service removal
......
} else {
printf("Service removal failed\n");
}
return 0;
return 1;
case 'd':
if (optarg) {
dprintf_level = atoi(optarg);
......
break;
default:
usage("wconsd",long_options);
exit(EXIT_FAILURE);
return 1;
}
}
return 1;
return 0;
}
int wconsd_stop(int param1) {
......
modules_init(cli);
/* handle commandline options */
do_getopt(argc,argv);
if (do_getopt(argc,argv)) {
/* do_getopt returns nonzero if we should not continue */
return 1;
}
/* Start up sockets */
wVersionRequested = MAKEWORD( 2, 2 );

Also available in: Unified diff