Opened 15 years ago

Closed 15 years ago

#122 closed Defect (fixed)

tr_torrentIterate ability to stop torrents

Reported by: oleo Owned by: titer
Priority: Normal Milestone: Sometime
Component: Transmission Version: 0.6
Severity: Normal Keywords:
Cc:

Description

I think that tr_torrentIterate() should be modified in such way that callback function can stop and delete torrent. Here is modification proposal:

void tr_torrentIterate( tr_handle_t * h, tr_callback_t func, void * d )
{
    tr_torrent_t * tor, *next;

    for( tor = h->torrentList; tor; tor = next )
    {
        next = tor->next;
        func( tor, d );
    }
}

func( tor, d ); can now free(tor) without creating segfault when iterating through a list.

Change History (1)

comment:1 Changed 15 years ago by livings124

  • Resolution set to fixed
  • Status changed from new to closed

Done in [751]/

Note: See TracTickets for help on using tickets.