- Timestamp:
- 05/29/11 12:26:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-lcd.c
r5321 r5322 22 22 23 23 char targetfile[256]; 24 char tmpfile[256]; 24 25 char channame[32]; 25 26 26 if(cfg.lcd_output_path == NULL) 27 if(cfg.lcd_output_path == NULL){ 27 28 snprintf(targetfile, sizeof(targetfile),"%s%s", get_tmp_dir(), "/oscam.lcd"); 28 else 29 snprintf(tmpfile, sizeof(tmpfile), "%s%s.tmp", get_tmp_dir(), "/oscam.lcd"); 30 } else { 29 31 snprintf(targetfile, sizeof(targetfile),"%s%s", cfg.lcd_output_path, "/oscam.lcd"); 32 snprintf(tmpfile, sizeof(tmpfile), "%s%s.tmp", cfg.lcd_output_path, "/oscam.lcd"); 33 } 30 34 31 35 int8_t iscccam = 0; … … 39 43 FILE *fpsave; 40 44 41 if((fpsave = fopen(t argetfile,"w"))){45 if((fpsave = fopen(tmpfile, "w"))){ 42 46 43 47 idx = 0; … … 222 226 cs_sleepms(cfg.lcd_write_intervall * 1000); 223 227 cnt++; 228 229 if(file_copy(tmpfile, targetfile) < 0){ 230 cs_log("An error occured while writing oscam.lcd file %s.", targetfile); 231 if(remove(tmpfile) < 0) 232 cs_log("Error removing temp oscam.lcd file %s (errno=%d %s)!", tmpfile, errno, strerror(errno)); 233 } 224 234 } 225 235
Note:
See TracChangeset
for help on using the changeset viewer.