Changeset 13915


Ignore:
Timestamp:
Feb 1, 2013, 12:21:30 AM (8 years ago)
Author:
jordan
Message:

(libT) ensure that tr_torrentVerify()'s completion callback gets invoked even if it's removed from the verify queue before it gets a chance to run.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/verify.c

    r13913 r13915  
    310310  else
    311311    {
    312       tr_free (tr_list_remove (&verifyList, tor, compareVerifyByTorrent));
     312      struct verify_node * node = tr_list_remove (&verifyList, tor, compareVerifyByTorrent);
     313
    313314      tr_torrentSetVerifyState (tor, TR_VERIFY_NONE);
     315
     316      if (node != NULL)
     317        {
     318          if (node->callback_func != NULL)
     319            (*node->callback_func)(tor, true, node->callback_data);
     320
     321          tr_free (node);
     322        }
    314323    }
    315324
Note: See TracChangeset for help on using the changeset viewer.