Changeset 407 for branches/merlin
- Timestamp:
- 09/04/09 19:06:26 (15 years ago)
- Location:
- branches/merlin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/merlin/include/oscam.h
r406 r407 30 30 int oscam_check_ecmcache(ECM_REQUEST *, ulong); 31 31 void oscam_log_emm_request(int); 32 void oscam_log_config();33 32 void oscam_store_logentry(char *); 34 33 -
branches/merlin/src/log.c
r400 r407 25 25 int use_ac_log = 0; 26 26 #endif 27 28 extern int shmsize; 29 extern int shmid; 30 31 static void log_config() 32 { 33 uchar buf[2048]; 34 35 if (cfg->nice != 99) 36 sprintf((char *) buf, ", nice=%d", cfg->nice); 37 else 38 buf[0] = '\0'; 39 log_normal("version=%s, system=%s%s", CS_VERSION, oscam_platform((char *) buf + 64), buf); 40 log_normal("max. clients=%d, client max. idle=%d sec", 41 #ifdef CS_ANTICASC 42 CS_MAXPID - 3, cfg->cmaxidle); 43 #else 44 CS_MAXPID - 2, cfg->cmaxidle); 45 #endif 46 if (cfg->max_log_size) 47 sprintf((char *) buf, "%d Kb", cfg->max_log_size); 48 else 49 strcpy((char *) buf, "unlimited"); 50 log_normal("max. logsize=%s", buf); 51 log_normal("client timeout=%lu ms, fallback timeout=%lu ms, cache delay=%d ms", cfg->ctimeout, cfg->ftimeout, cfg->delay); 52 #ifdef CS_NOSHM 53 log_normal("shared memory initialized (size=%d, fd=%d)", shmsize, shmid); 54 #else 55 log_normal("shared memory initialized (size=%d, id=%d)", shmsize, shmid); 56 #endif 57 } 27 58 28 59 static void log_switch(char *file, FILE ** f, int (*pfinit) (char *)) … … 98 129 time(&t); 99 130 fprintf(fp, "\n%s\n>> OSCam << cardserver started at %s%s\n", line, ctime(&t), line); 100 oscam_log_config();131 log_config(); 101 132 } 102 133 } -
branches/merlin/src/oscam.c
r405 r407 96 96 int *mcl = 0; // Master close log? 97 97 98 static int shmsize = CS_ECMCACHESIZE * (sizeof (struct s_ecm)) + CS_MAXPID * (sizeof (struct s_client)) + CS_MAXREADER * (sizeof (struct s_reader)) + 98 int shmid = 0; // Shared Memory ID 99 int shmsize = CS_ECMCACHESIZE * (sizeof (struct s_ecm)) + CS_MAXPID * (sizeof (struct s_client)) + CS_MAXREADER * (sizeof (struct s_reader)) + 99 100 #ifdef CS_WITH_GBOX 100 101 CS_MAXCARDS * (sizeof (struct card_struct)) + CS_MAXIGNORE * (sizeof (long)) + CS_MAXPID * (sizeof (struct idstore_struct)) + … … 116 117 *****************************************************************************/ 117 118 static char mloc[128] = { 0 }; 118 static int shmid = 0; // Shared Memory ID119 119 static int cs_last_idx = 0; // client index of last fork (master only) 120 120 static char *logo = " ___ ____ \n / _ \\/ ___| ___ __ _ _ __ ___ \n| | | \\___ \\ / __/ _` | '_ ` _ \\ \n| |_| |___) | (_| (_| | | | | | |\n \\___/|____/ \\___\\__,_|_| |_| |_|\n"; … … 2011 2011 } 2012 2012 2013 void oscam_log_config()2014 {2015 uchar buf[2048];2016 2017 if (cfg->nice != 99)2018 sprintf((char *) buf, ", nice=%d", cfg->nice);2019 else2020 buf[0] = '\0';2021 log_normal("version=%s, system=%s%s", CS_VERSION, oscam_platform((char *) buf + 64), buf);2022 log_normal("max. clients=%d, client max. idle=%d sec",2023 #ifdef CS_ANTICASC2024 CS_MAXPID - 3, cfg->cmaxidle);2025 #else2026 CS_MAXPID - 2, cfg->cmaxidle);2027 #endif2028 if (cfg->max_log_size)2029 sprintf((char *) buf, "%d Kb", cfg->max_log_size);2030 else2031 strcpy((char *) buf, "unlimited");2032 log_normal("max. logsize=%s", buf);2033 log_normal("client timeout=%lu ms, fallback timeout=%lu ms, cache delay=%d ms", cfg->ctimeout, cfg->ftimeout, cfg->delay);2034 #ifdef CS_NOSHM2035 log_normal("shared memory initialized (size=%d, fd=%d)", shmsize, shmid);2036 #else2037 log_normal("shared memory initialized (size=%d, id=%d)", shmsize, shmid);2038 #endif2039 }2040 2041 2013 int main(int argc, char *argv[]) 2042 2014 {
Note:
See TracChangeset
for help on using the changeset viewer.