Subversion Repositories wimsdev

Rev

Rev 8177 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /*    Copyright (C) 1998-2003 XIAO, Gang of Universite de Nice - Sophia Antipolis
  2.  *
  3.  *  This program is free software; you can redistribute it and/or modify
  4.  *  it under the terms of the GNU General Public License as published by
  5.  *  the Free Software Foundation; either version 2 of the License, or
  6.  *  (at your option) any later version.
  7.  *
  8.  *  This program is distributed in the hope that it will be useful,
  9.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.  *  GNU General Public License for more details.
  12.  *
  13.  *  You should have received a copy of the GNU General Public License
  14.  *  along with this program; if not, write to the Free Software
  15.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  */
  17.  
  18.                 /* student score management, definitions */
  19.  
  20. #include "../Lib/libwims.h"
  21. #include "../wims.h"
  22. #include <utime.h>
  23. #include <sys/socket.h>
  24. #include <sys/un.h>
  25.  
  26.         /* how many seconds in a minute? */
  27. #define MINLENGTH 47
  28.         /* maximal running minutes, in order to avoid leaking */
  29. #define MAX_MIN 300
  30.         /* queue of socket requests */
  31. #define SOCKET_QUEUE 32
  32.         /* socket buffer length */
  33. #define BUFFERLEN (MAX_LINELEN+sizeof(scoreresult)*MAX_CLASSEXOS)
  34.         /* number of log lines */
  35. #define MAX_LOGLINES (102400)
  36.         /* cuttime buffer, for all exams in a class */
  37. #define CTBUFLEN 4096
  38.         /* text buffer length in a sheet cache */
  39. #define SHEETBUFLEN 8192
  40.         /* number of cached classes */
  41.         /* Storage requirement: about MAX_CLASSCACHE*(MAX_CLASSEXOS*10+CTBUFLEN) bytes. */
  42. #define MAX_CLASSCACHE 20
  43.         /* number of cached sheets */
  44.         /* Storage requirement: about MAX_SHEETCACHE*SHEETBUFLEN bytes. */
  45. #define MAX_SHEETCACHE 32
  46.         /* Refreshment rate for class caches, in seconds */
  47. #define CLASSCACHE_DELAY 100
  48.         /* Refreshment rate for sheet caches, in seconds */
  49. #define SHEETCACHE_DELAY 50
  50.         /* Maximal debug file length. Debug will be activated once the debug file exists. */
  51. #define MAX_DEBUGLENGTH 1000000
  52.         /* delay before ins files are erased. In seconds */
  53. #define INS_DELAY 500
  54.  
  55. #define evalue strevalue
  56. #define tmpd "tmp/log"
  57. #define classd "log/classes"
  58. #define sesd "sessions"
  59. #define modd "public_html/modules"
  60. #define logd "log"
  61. #define pidfile "tmp/log/wimslogd.pid"
  62. #define sockfile "tmp/log/.wimslogd"
  63. #define debugfile "tmp/log/wimslogd.debug"
  64.  
  65.