mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3344
This commit is contained in:
parent
304743bef8
commit
d722a966f1
|
@ -8,10 +8,10 @@ SUBDIRS = RSAEuro db lib api apps client sched tools test py zip unzip
|
|||
# dist-hook below gets rid of CVS directories.
|
||||
|
||||
EXTRA_DIST = \
|
||||
mac_build win_build \
|
||||
win_build \
|
||||
doc \
|
||||
stripchart \
|
||||
INSTALL
|
||||
INSTALL
|
||||
|
||||
py:
|
||||
[ "$(srcdir)" != . ] && rm -f $@ && $(LN_S) $(srcdir)/$@ $@
|
||||
|
|
|
@ -151,10 +151,10 @@ SUBDIRS = RSAEuro db lib api apps client sched tools test py zip unzip
|
|||
# Putting a directory name recursively copies the entire contents - the
|
||||
# dist-hook below gets rid of CVS directories.
|
||||
EXTRA_DIST = \
|
||||
mac_build win_build \
|
||||
win_build \
|
||||
doc \
|
||||
stripchart \
|
||||
INSTALL
|
||||
INSTALL
|
||||
|
||||
|
||||
UNIX2DOS = unix2dos
|
||||
|
|
|
@ -1104,8 +1104,8 @@ AC_DEFUN([SAH_HEADER_STDCXX],[
|
|||
#
|
||||
# Revision Log:
|
||||
# $Log$
|
||||
# Revision 1.86 2004/05/05 01:30:22 rwalton
|
||||
# boinc_core_release_3_03
|
||||
# Revision 1.87 2004/05/05 18:41:20 davea
|
||||
# *** empty log message ***
|
||||
#
|
||||
# Revision 1.1 2003/12/11 18:38:24 korpela
|
||||
# Added checked macro files into boinc
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "prefs.h"
|
||||
#include "util.h"
|
||||
#include "client_msgs.h"
|
||||
#include "main.h"
|
||||
|
||||
// dummies
|
||||
void create_curtain(){}
|
||||
|
@ -156,16 +157,30 @@ int add_new_project() {
|
|||
}
|
||||
|
||||
#ifdef WIN32
|
||||
void quit_client() {
|
||||
msg_printf(NULL, MSG_INFO, "Exiting - user request");
|
||||
gstate.quit_activities();
|
||||
gstate.requested_exit = true;
|
||||
}
|
||||
|
||||
void suspend_client() {
|
||||
msg_printf(NULL, MSG_INFO, "Suspending activity - user request");
|
||||
gstate.active_tasks.suspend_all();
|
||||
}
|
||||
|
||||
void resume_client() {
|
||||
msg_printf(NULL, MSG_INFO, "Resuming activity - user request");
|
||||
gstate.active_tasks.unsuspend_all();
|
||||
}
|
||||
|
||||
BOOL WINAPI ConsoleControlHandler ( DWORD dwCtrlType ){
|
||||
BOOL bReturnStatus = FALSE;
|
||||
switch( dwCtrlType ){
|
||||
case CTRL_C_EVENT:
|
||||
if(gstate.activities_suspended) {
|
||||
gstate.active_tasks.unsuspend_all();
|
||||
msg_printf(NULL, MSG_INFO, "Resuming activity");
|
||||
resume_client();
|
||||
} else {
|
||||
msg_printf(NULL, MSG_INFO, "Suspending activity - user request");
|
||||
gstate.active_tasks.suspend_all();
|
||||
suspend_client();
|
||||
}
|
||||
bReturnStatus = TRUE;
|
||||
break;
|
||||
|
@ -173,9 +188,7 @@ BOOL WINAPI ConsoleControlHandler ( DWORD dwCtrlType ){
|
|||
case CTRL_CLOSE_EVENT:
|
||||
case CTRL_LOGOFF_EVENT:
|
||||
case CTRL_SHUTDOWN_EVENT:
|
||||
msg_printf(NULL, MSG_INFO, "Exiting - user request");
|
||||
gstate.quit_activities();
|
||||
gstate.requested_exit = true;
|
||||
quit_client();
|
||||
bReturnStatus = TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#ifdef _WIN32
|
||||
extern int boinc_main_loop(int argc, char** argv);
|
||||
extern void quit_client();
|
||||
extern void susp_client();
|
||||
extern void resume_client();
|
||||
#endif
|
|
@ -23,8 +23,9 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include "diagnostics.h"
|
||||
#include "win_service.h"
|
||||
#include "util.h"
|
||||
#include "main.h"
|
||||
#include "win_service.h"
|
||||
|
||||
|
||||
// internal variables
|
||||
|
@ -34,13 +35,6 @@ DWORD dwErr = 0;
|
|||
TCHAR szErr[1024];
|
||||
|
||||
|
||||
// define the execution engine start point
|
||||
extern int boinc_main_loop(int argc, char** argv);
|
||||
extern void quit_client(int a);
|
||||
extern void susp_client(int a);
|
||||
extern void resume_client(int a);
|
||||
|
||||
|
||||
// Define API's that are going to be used through LoadLibrary calls.
|
||||
typedef WINADVAPI BOOL (WINAPI *PROCCHANGESERVICECONFIG2)(SC_HANDLE, DWORD, LPCVOID);
|
||||
|
||||
|
@ -142,7 +136,7 @@ VOID WINAPI service_ctrl(DWORD dwCtrlCode)
|
|||
case SERVICE_CONTROL_STOP:
|
||||
case SERVICE_CONTROL_SHUTDOWN:
|
||||
ReportStatus(SERVICE_STOP_PENDING, ERROR_SUCCESS, 10000);
|
||||
quit_client(NULL);
|
||||
quit_client();
|
||||
ReportStatus(SERVICE_STOPPED, ERROR_SUCCESS, 10000);
|
||||
return;
|
||||
|
||||
|
@ -150,7 +144,7 @@ VOID WINAPI service_ctrl(DWORD dwCtrlCode)
|
|||
//
|
||||
case SERVICE_CONTROL_PAUSE:
|
||||
ReportStatus(SERVICE_PAUSE_PENDING, ERROR_SUCCESS, 10000);
|
||||
susp_client(NULL);
|
||||
susp_client();
|
||||
ReportStatus(SERVICE_PAUSED, ERROR_SUCCESS, 10000);
|
||||
return;
|
||||
|
||||
|
@ -158,7 +152,7 @@ VOID WINAPI service_ctrl(DWORD dwCtrlCode)
|
|||
//
|
||||
case SERVICE_CONTROL_CONTINUE:
|
||||
ReportStatus(SERVICE_CONTINUE_PENDING, ERROR_SUCCESS, 10000);
|
||||
resume_client(NULL);
|
||||
resume_client();
|
||||
ReportStatus(SERVICE_RUNNING, ERROR_SUCCESS, 10000);
|
||||
return;
|
||||
|
||||
|
@ -562,4 +556,4 @@ void CmdUninstallService()
|
|||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# From configure.ac Revision: 1.83 .
|
||||
# From configure.ac Revision: 1.84 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.57 for BOINC 3.03.
|
||||
#
|
||||
|
|
|
@ -1097,6 +1097,9 @@
|
|||
<File
|
||||
RelativePath="..\client\log_flags.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\client\main.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\client\maybe_gui.h">
|
||||
</File>
|
||||
|
|
Loading…
Reference in New Issue