Project

General

Profile

« Previous | Next » 

Revision 9c69afef

Added by Hamish Coleman over 15 years ago

  • ID 9c69afef574e321319fdb191753636703c3bcfbc

Fix the bugs with the new scm console code

View differences:

win-scm.c
return;
}
int SCM_Start_Console(const int argc, const char **argv) {
int SCM_Start_Console(int argc, char **argv) {
global_sd->mode=SVC_CONSOLE;
int err = sd->init(argc,argv);
int err = global_sd->init(argc,argv);
if (err!=0) {
printf("SCM_Start_Console: init failed, return code %d\n",err);
return SVC_FAIL;
}
sd->main(0);
global_sd->main(0);
return SVC_OK;
}
int SCM_Start(struct SCM_def *sd, const int argc, const char **argv) {
int SCM_Start(struct SCM_def *sd, int argc, char **argv) {
SERVICE_TABLE_ENTRY ServiceTable[] = {
{ "", ServiceMain },
{ NULL, NULL }
......
/* If we have commandline args, then we cannot have been started
* by the Windows SCM
*/
if (argc<2) {
if (argc>1) {
return SCM_Start_Console(argc,argv);
}

Also available in: Unified diff