Changeset 2098
- Timestamp:
- 04/15/10 21:49:45 (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-newcamd.c
r2086 r2098 1283 1283 memcpy(buf, ep->emm, ep->l); 1284 1284 1285 return((newcamd_send(buf, ep->l, 0)<1) ? (-1) : 0);1285 return((newcamd_send(buf, ep->l, 0)<1) ? 0 : 1); 1286 1286 } 1287 1287 -
trunk/oscam-reader.c
r2093 r2098 22 22 void cs_ri_log(struct s_reader * reader, char *fmt,...) 23 23 { 24 25 26 27 28 29 30 24 char txt[256]; 25 26 va_list params; 27 va_start(params, fmt); 28 vsprintf(txt, fmt, params); 29 va_end(params); 30 cs_log("%s", txt); 31 31 #ifdef CS_RDR_INIT_HIST 32 int val; 33 val=sizeof(reader->init_history)-reader->init_history_pos-1; 34 if (val>0) 35 snprintf((char *) reader->init_history+reader->init_history_pos, val, "%s", txt); 36 reader->init_history_pos+=strlen(txt)+1; 32 int val; 33 val=sizeof(reader->init_history)-reader->init_history_pos-1; 34 if (val>0) 35 snprintf((char *) reader->init_history+reader->init_history_pos, val, "%s", txt); 36 #ifdef CS_RDR_INIT_HIST_FILE 37 FILE *fp; 38 char filename[32]; 39 mkdir("/tmp/.oscam", S_IRWXU); 40 sprintf(filename, "/tmp/.oscam/reader%d", reader->ridx); 41 42 if (reader->init_history_pos==0) 43 unlink(filename); 44 45 fp=fopen(filename, "a"); 46 47 if(fp != NULL) { 48 fseek(fp, reader->init_history_pos, SEEK_SET); 49 fprintf(fp, "%s\n", txt); 50 fclose(fp); 51 } 52 53 truncate(filename, reader->init_history_pos+strlen(txt)+1); 54 #endif 55 reader->init_history_pos+=strlen(txt)+1; 37 56 #endif 38 57 } … … 420 439 { 421 440 int i, no, rc, ecs; 422 char *rtxt[] = { "error", "written", "skipped", "blocked" };441 char *rtxt[] = { "error", proxy ? "sent" : "written", "skipped", "blocked" }; 423 442 char *typedesc[]= { "unknown", "unique", "shared", "global" }; 424 443 struct timeb tps, tpe;
Note:
See TracChangeset
for help on using the changeset viewer.