Ignore:
Timestamp:
Feb 18, 2011, 12:24:40 AM (11 years ago)
Author:
jch
Message:

Tweak dummy callbacks.

Don't abort, just log a message and continue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-io.c

    r11915 r11916  
    471471dummy_read(void *closure, const unsigned char *buf, size_t buflen)
    472472{
    473     abort();
     473    /* This cannot happen, as far as I'm aware. */
     474    tr_nerr("UTP", "On_read called on closed socket");
     475
    474476}
    475477
     
    477479dummy_write(void *closure, unsigned char *buf, size_t buflen)
    478480{
    479     abort();
     481    /* This can very well happen if we've shut down a peer connection that
     482       had unflushed buffers.  Complain and send zeroes. */
     483    tr_ndbg("UTP", "On_write called on closed socket");
     484    memset(buf, 0, buflen);
    480485}
    481486
     
    501506dummy_on_overhead(void *closure, bool send, size_t count, int type)
    502507{
     508    return;
    503509}
    504510
Note: See TracChangeset for help on using the changeset viewer.