Changeset 668

Show
Ignore:
Timestamp:
14/08/08 16:27:54 (3 months ago)
Author:
ono
Message:

File must be opened as binary (only Windows affected), so fseek & ftell tells proper size for the buffer. With single "r" buffer will be too small.

Location:
trunk/router
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/router/filter.c

    r596 r668  
    5858        filterfile = CONFIG_DIR "/router-filter.xml"; 
    5959 
    60     f = fopen(filterfile, "r"); 
     60    f = fopen(filterfile, "rb"); 
    6161    if(f == NULL) { 
    6262        log_write(r->log, LOG_NOTICE, "couldn't open filter file %s: %s", filterfile, strerror(errno)); 
  • trunk/router/user.c

    r2 r668  
    4343        userfile = CONFIG_DIR "/router-users.xml"; 
    4444 
    45     f = fopen(userfile, "r"); 
     45    f = fopen(userfile, "rb"); 
    4646    if(f == NULL) { 
    4747        log_write(r->log, LOG_ERR, "couldn't open user table file %s: %s", userfile, strerror(errno));