Changeset 10705
- Timestamp:
- May 30, 2010, 9:38:02 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/remote.c
r10704 r10705 1691 1691 { 1692 1692 case 'a': /* add torrent */ 1693 if( tadd != 0 ) flush( host, port, &tadd );1694 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); flush( host, port, &tset ); }1693 if( tadd != 0 ) status |= flush( host, port, &tadd ); 1694 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); status |= flush( host, port, &tset ); } 1695 1695 tadd = tr_new0( tr_benc, 1 ); 1696 1696 tr_bencInitDict( tadd, 3 ); … … 1713 1713 1714 1714 case 't': /* set current torrent */ 1715 if( tadd != 0 ) flush( host, port, &tadd );1716 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); flush( host, port, &tset ); }1715 if( tadd != 0 ) status |= flush( host, port, &tadd ); 1716 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); status |= flush( host, port, &tset ); } 1717 1717 tr_strlcpy( id, optarg, sizeof( id ) ); 1718 1718 break; … … 1756 1756 fields = tr_bencDictAddList( args, "fields", 0 ); 1757 1757 1758 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); flush( host, port, &tset ); }1758 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); status |= flush( host, port, &tset ); } 1759 1759 1760 1760 switch( c ) … … 1781 1781 } 1782 1782 1783 flush( host, port, &top );1783 status |= flush( host, port, &top ); 1784 1784 } 1785 1785 else if( stepMode == MODE_SESSION_SET ) … … 1976 1976 tr_bencDictAddBool( args, "move", FALSE ); 1977 1977 addIdArg( args, id ); 1978 flush( host, port, &top );1978 status |= flush( host, port, &top ); 1979 1979 break; 1980 1980 } … … 1988 1988 tr_bencDictAddStr( top, "method", "session-get" ); 1989 1989 tr_bencDictAddInt( top, "tag", TAG_SESSION ); 1990 flush( host, port, &top );1990 status |= flush( host, port, &top ); 1991 1991 break; 1992 1992 } … … 2000 2000 tr_bencDictAddStr( top, "method", "torrent-start" ); 2001 2001 addIdArg( tr_bencDictAddDict( top, ARGUMENTS, 1 ), id ); 2002 flush( host, port, &top );2002 status |= flush( host, port, &top ); 2003 2003 } 2004 2004 break; … … 2013 2013 tr_bencDictAddStr( top, "method", "torrent-stop" ); 2014 2014 addIdArg( tr_bencDictAddDict( top, ARGUMENTS, 1 ), id ); 2015 flush( host, port, &top );2015 status |= flush( host, port, &top ); 2016 2016 } 2017 2017 break; … … 2034 2034 tr_bencInitDict( top, 1 ); 2035 2035 tr_bencDictAddStr( top, "method", "blocklist-update" ); 2036 flush( host, port, &top );2036 status |= flush( host, port, &top ); 2037 2037 break; 2038 2038 } … … 2043 2043 tr_bencDictAddStr( top, "method", "session-stats" ); 2044 2044 tr_bencDictAddInt( top, "tag", TAG_STATS ); 2045 flush( host, port, &top );2045 status |= flush( host, port, &top ); 2046 2046 break; 2047 2047 } … … 2052 2052 tr_bencDictAddStr( top, "method", "port-test" ); 2053 2053 tr_bencDictAddInt( top, "tag", TAG_PORTTEST ); 2054 flush( host, port, &top );2054 status |= flush( host, port, &top ); 2055 2055 break; 2056 2056 } … … 2058 2058 { 2059 2059 tr_benc * top; 2060 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); flush( host, port, &tset ); }2060 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); status |= flush( host, port, &tset ); } 2061 2061 top = tr_new0( tr_benc, 1 ); 2062 2062 tr_bencInitDict( top, 2 ); 2063 2063 tr_bencDictAddStr( top, "method", "torrent-verify" ); 2064 2064 addIdArg( tr_bencDictAddDict( top, ARGUMENTS, 1 ), id ); 2065 flush( host, port, &top );2065 status |= flush( host, port, &top ); 2066 2066 break; 2067 2067 } … … 2076 2076 tr_bencDictAddBool( args, "delete-local-data", c=='R' ); 2077 2077 addIdArg( args, id ); 2078 flush( host, port, &top );2078 status |= flush( host, port, &top ); 2079 2079 break; 2080 2080 } … … 2089 2089 tr_bencDictAddBool( args, "move", TRUE ); 2090 2090 addIdArg( args, id ); 2091 flush( host, port, &top );2091 status |= flush( host, port, &top ); 2092 2092 break; 2093 2093 } … … 2101 2101 } 2102 2102 2103 if( tadd != 0 ) flush( host, port, &tadd );2104 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); flush( host, port, &tset ); }2105 if( sset != 0 ) flush( host, port, &sset );2103 if( tadd != 0 ) status |= flush( host, port, &tadd ); 2104 if( tset != 0 ) { addIdArg( tr_bencDictFind( tset, ARGUMENTS ), id ); status |= flush( host, port, &tset ); } 2105 if( sset != 0 ) status |= flush( host, port, &sset ); 2106 2106 return status; 2107 2107 }
Note: See TracChangeset
for help on using the changeset viewer.