Back to index

wims  3.65+svn20090927
wimslogd.h
Go to the documentation of this file.
00001 /*    Copyright (C) 1998-2003 XIAO, Gang of Universite de Nice - Sophia Antipolis
00002  *
00003  *  This program is free software; you can redistribute it and/or modify
00004  *  it under the terms of the GNU General Public License as published by
00005  *  the Free Software Foundation; either version 2 of the License, or
00006  *  (at your option) any later version.
00007  *
00008  *  This program is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  *  GNU General Public License for more details.
00012  *
00013  *  You should have received a copy of the GNU General Public License
00014  *  along with this program; if not, write to the Free Software
00015  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00016  */
00017 
00018               /* student score management, definitions */
00019 
00020 #include "../Lib/libwims.h"
00021 #include "../wims.h"
00022 #include <utime.h>
00023 #include <sys/socket.h>
00024 #include <sys/un.h>
00025 
00026        /* how many seconds in a minute? */
00027 #define MINLENGTH 47
00028        /* maximal running minutes, in order to avoid leaking */
00029 #define MAX_MIN 300
00030        /* queue of socket requests */
00031 #define SOCKET_QUEUE 32
00032        /* socket buffer length */
00033 #define BUFFERLEN (MAX_LINELEN+sizeof(scoreresult)*MAX_CLASSEXOS)
00034        /* number of log lines */
00035 #define MAX_LOGLINES (102400)
00036        /* cuttime buffer, for all exams in a class */
00037 #define CTBUFLEN 4096
00038        /* text buffer length in a sheet cache */
00039 #define SHEETBUFLEN 8192
00040        /* number of cached classes */
00041        /* Storage requirement: about MAX_CLASSCACHE*(MAX_CLASSEXOS*10+CTBUFLEN) bytes. */
00042 #define MAX_CLASSCACHE 20
00043        /* number of cached sheets */
00044        /* Storage requirement: about MAX_SHEETCACHE*SHEETBUFLEN bytes. */
00045 #define MAX_SHEETCACHE 32
00046        /* Refreshment rate for class caches, in seconds */
00047 #define CLASSCACHE_DELAY 100
00048        /* Refreshment rate for sheet caches, in seconds */
00049 #define SHEETCACHE_DELAY 50
00050        /* Maximal debug file length. Debug will be activated once the debug file exists. */
00051 #define MAX_DEBUGLENGTH 1000000
00052        /* delay before ins files are erased. In seconds */
00053 #define INS_DELAY 500
00054 
00055 #define evalue strevalue
00056 #define tmpd "tmp/log"
00057 #define classd "log/classes"
00058 #define sesd "sessions"
00059 #define modd "public_html/modules"
00060 #define logd "log"
00061 #define pidfile "tmp/log/wimslogd.pid"
00062 #define sockfile "tmp/log/.wimslogd"
00063 #define debugfile "tmp/log/wimslogd.debug"
00064