Changeset 398 in Main for trunk


Ignore:
Timestamp:
Oct 28, 2024, 9:11:59 AM (3 weeks ago)
Author:
Nishi
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/server.c

    r395 r398  
    345345                if(f != NULL) {
    346346                        char buffer[512];
     347                        int st;
    347348                        fread(buffer, size < 512 ? size : 512, 1, f);
    348                         if(tw_write(ssl, sock, buffer, size < 512 ? size : 512) <= 0) return;
     349                        if((st = tw_write(ssl, sock, buffer, size < 512 ? size : 512)) <= 0) break;
    349350                } else {
    350                         if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) <= 0) return;
     351                        if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) <= 0) break;
    351352                }
    352353                incr += 512;
Note: See TracChangeset for help on using the changeset viewer.