Changeset 412 for branches/merlin
- Timestamp:
- 09/04/09 19:56:01 (15 years ago)
- Location:
- branches/merlin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/merlin/include/oscam.h
r408 r412 29 29 30 30 int oscam_check_ecmcache(ECM_REQUEST *, ulong); 31 void oscam_store_logentry(char *);32 31 33 32 #endif // __OSCAM_H__ -
branches/merlin/src/log.c
r407 r412 175 175 } 176 176 177 static void log_store_entry(char *txt) 178 { 179 #ifdef CS_LOGHISTORY 180 char *ptr; 181 182 ptr = (char *) (loghist + (*loghistidx * CS_LOGHISTSIZE)); 183 ptr[0] = '\1'; // make username unusable 184 ptr[1] = '\0'; 185 if ((client[cs_idx].typ == 'c') || (client[cs_idx].typ == 'm')) 186 strncpy(ptr, client[cs_idx].usr, 31); 187 strncpy(ptr + 32, txt, CS_LOGHISTSIZE - 33); 188 *loghistidx = (*loghistidx + 1) % CS_MAXLOGHIST; 189 #endif 190 } 191 177 192 static void log_write_to_log(int flag, char *txt) 178 193 { … … 206 221 // } 207 222 } 208 oscam_store_logentry(buf);223 log_store_entry(buf); 209 224 210 225 for (i = 0; i < CS_MAXPID; i++) // monitor-clients -
branches/merlin/src/oscam.c
r410 r412 1238 1238 } 1239 1239 1240 void oscam_store_logentry(char *txt)1241 {1242 #ifdef CS_LOGHISTORY1243 char *ptr;1244 1245 ptr = (char *) (loghist + (*loghistidx * CS_LOGHISTSIZE));1246 ptr[0] = '\1'; // make username unusable1247 ptr[1] = '\0';1248 if ((client[cs_idx].typ == 'c') || (client[cs_idx].typ == 'm'))1249 strncpy(ptr, client[cs_idx].usr, 31);1250 strncpy(ptr + 32, txt, CS_LOGHISTSIZE - 33);1251 *loghistidx = (*loghistidx + 1) % CS_MAXLOGHIST;1252 #endif1253 }1254 1255 1240 /* 1256 1241 * oscam_write_to_pipe():
Note:
See TracChangeset
for help on using the changeset viewer.