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

« back to all changes in this revision

Viewing changes to libtransmission/handshake.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson, Krzysztof Klimonda, Chris Coulson
  • Date: 2009-09-09 09:06:11 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: james.westby@ubuntu.com-20090909090611-09ai2hyo66h1dhv8
Tags: 1.74-0ubuntu1
[ Krzysztof Klimonda ]
* Merge from debian unstable, remaining changes:
  - debian/control:
    + Added replaces & provides clutch (now included as part of transmission).
    + add liblaunchpad-integration to Build-Depends
  - debian/rules:
    + Create a PO template during package build.
  - debian/patches/01_lpi.patch:
    + Integrate Transmission with Launchpad
  - debian/patches/20_add_X-Ubuntu-Gettext-Domain.diff:
    + Add X-Ubuntu-Gettext-Domain to .desktop file.
* debian/control:
  - add lsb-release to Build-Depends
* This includes the QT client in transmission-qt.

[ Chris Coulson ]
* Update to new upstream version 1.74 (LP: #418367):
  - Better data recovery in the case of an OS or Transmission crash
  - If a data file is moved, stop the torrent instead of redownloading 
    it (LP: #419304).
  - Fix bug that didn't list some peers in the resume file and in PEX
  - More helpful torrent error messages
  - DHT now honors the bind-address-ipv4 configuration option
  - Fix Debian build error with miniupnpc
  - Fix Cygwin build error with strtold
  - Update to a newer snapshot of miniupnpc
  - Fix crash that occurred when adding torrents on some desktops
  - Synchronize the statusbar's and torrent list's speeds
  - Fix the Properties dialog's "Origin" field for multiple torrents
* debian/rules, debian/control:
  - Don't run autoreconf at build time and don't build-dep on libtool.
* debian/control:
  - transmission-common replaces transmission-gtk (<< 1.74) rather than
    (<= 1.73-1).
* Refreshed patches:
  - 01_lpi.patch.
  - dont_build_libevent.patch.
  - qt_client_use_system_libevent.patch.
* Dropped patches not needed anymore:
  - updateminiupnpcstrings_double_escape_slash.patch
* Added 99_autoreconf.patch for autotools update.

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: handshake.c 8767 2009-07-01 14:58:57Z charles $
 
10
 * $Id: handshake.c 8889 2009-08-10 20:04:08Z charles $
11
11
 */
12
12
 
13
13
#include <assert.h>
76
76
 #define HANDSHAKE_SET_LTEP( bits ) ( (void)0 )
77
77
#endif
78
78
 
79
 
#ifdef ENABLE_FAST 
80
 
 #define HANDSHAKE_HAS_FASTEXT( bits ) ( ( ( bits )[7] & 0x04 ) ? 1 : 0 ) 
81
 
 #define HANDSHAKE_SET_FASTEXT( bits ) ( ( bits )[7] |= 0x04 ) 
82
 
#else 
83
 
 #define HANDSHAKE_HAS_FASTEXT( bits ) ( 0 ) 
84
 
 #define HANDSHAKE_SET_FASTEXT( bits ) ( (void)0 ) 
85
 
#endif 
 
79
#ifdef ENABLE_FAST
 
80
 #define HANDSHAKE_HAS_FASTEXT( bits ) ( ( ( bits )[7] & 0x04 ) ? 1 : 0 )
 
81
 #define HANDSHAKE_SET_FASTEXT( bits ) ( ( bits )[7] |= 0x04 )
 
82
#else
 
83
 #define HANDSHAKE_HAS_FASTEXT( bits ) ( 0 )
 
84
 #define HANDSHAKE_SET_FASTEXT( bits ) ( (void)0 )
 
85
#endif
86
86
 
87
87
#ifdef ENABLE_DHT
88
88
 #define HANDSHAKE_HAS_DHT( bits ) ( ( ( bits )[7] & 0x01 ) ? 1 : 0 )
90
90
#else
91
91
 #define HANDSHAKE_HAS_DHT( bits ) ( 0 )
92
92
 #define HANDSHAKE_SET_DHT( bits ) ( (void)0 )
93
 
#endif 
 
93
#endif
94
94
 
95
95
/* http://www.azureuswiki.com/index.php/Extension_negotiation_protocol
96
96
   these macros are to be used if both extended messaging and the
1127
1127
 
1128
1128
    success = fireDoneFunc( handshake, isOK );
1129
1129
 
1130
 
    tr_handshakeFree( handshake );    
 
1130
    tr_handshakeFree( handshake );
1131
1131
 
1132
1132
    return success ? READ_LATER : READ_ERR;
1133
1133
}