~ubuntu-branches/ubuntu/maverick/transmission/maverick

« back to all changes in this revision

Viewing changes to libtransmission/rpcimpl.c

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2010-02-23 19:57:35 UTC
  • mfrom: (1.1.33 upstream)
  • Revision ID: james.westby@ubuntu.com-20100223195735-f12pnquql2h1phsq
Tags: 1.91-0ubuntu1
* New upstream release (LP: #525622)
* Fixes bugs:
  - Speed limits not honored when on at start up (LP: #526239)
* Refreshed 99_autoreconf.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * This exemption does not extend to derived works not owned by
8
8
 * the Transmission project.
9
9
 *
10
 
 * $Id: rpcimpl.c 10099 2010-02-05 05:16:18Z charles $
 
10
 * $Id: rpcimpl.c 10252 2010-02-21 23:03:29Z charles $
11
11
 */
12
12
 
13
13
#include <assert.h>
193
193
    for( i = 0; i < torrentCount; ++i )
194
194
    {
195
195
        tr_torrent * tor = torrents[i];
196
 
        tr_torrentStart( tor );
197
 
        notify( session, TR_RPC_TORRENT_STARTED, tor );
 
196
        if( !tor->isRunning )
 
197
        {
 
198
            tr_torrentStart( tor );
 
199
            notify( session, TR_RPC_TORRENT_STARTED, tor );
 
200
        }
198
201
    }
199
202
    tr_free( torrents );
200
203
    return NULL;
214
217
    for( i = 0; i < torrentCount; ++i )
215
218
    {
216
219
        tr_torrent * tor = torrents[i];
217
 
        tr_torrentStop( tor );
218
 
        notify( session, TR_RPC_TORRENT_STOPPED, tor );
 
220
        if( tor->isRunning )
 
221
        {
 
222
            tr_torrentStop( tor );
 
223
            notify( session, TR_RPC_TORRENT_STOPPED, tor );
 
224
        }
219
225
    }
220
226
    tr_free( torrents );
221
227
    return NULL;
983
989
    dbgmsg( "torrentAdd: HTTP response code was %ld (%s); response length was %zu bytes",
984
990
            response_code, tr_webGetResponseStr( response_code ), response_byte_count );
985
991
 
986
 
    if( response_code == 200 )
 
992
    if( response_code==200 || response_code==221 ) /* http or ftp success.. */
987
993
    {
988
994
        tr_ctorSetMetainfo( data->ctor, response, response_byte_count );
989
995
        addTorrentImpl( data->data, data->ctor );