Changeset 14130 for trunk/libtransmission/torrent.c
- Timestamp:
- Jul 20, 2013, 3:37:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/torrent.c
r14125 r14130 3391 3391 queueIsSequenced (tr_session * session) 3392 3392 { 3393 int i 3394 int n 3395 bool is_sequenced = true;3393 int i; 3394 int n; 3395 bool is_sequenced; 3396 3396 tr_torrent * tor; 3397 tr_torrent ** tmp = tr_new (tr_torrent *, session->torrentCount); 3398 3399 /* get all the torrents */ 3397 tr_torrent ** torrents; 3398 3400 3399 n = 0; 3401 tor = NULL; 3402 while ((tor = tr_torrentNext (session, tor))) 3403 tmp[n++] = tor; 3404 3405 /* sort them by position */ 3406 qsort (tmp, n, sizeof (tr_torrent *), compareTorrentByQueuePosition); 3400 torrents = tr_sessionGetTorrents (session, &n); 3401 qsort (torrents, n, sizeof (tr_torrent *), compareTorrentByQueuePosition); 3407 3402 3408 3403 #if 0 … … 3414 3409 3415 3410 /* test them */ 3411 is_sequenced = true; 3416 3412 for (i=0; is_sequenced && i<n; ++i) 3417 if (t mp[i]->queuePosition != i)3413 if (torrents[i]->queuePosition != i) 3418 3414 is_sequenced = false; 3419 3415 3420 tr_free (t mp);3416 tr_free (torrents); 3421 3417 return is_sequenced; 3422 3418 }
Note: See TracChangeset
for help on using the changeset viewer.