Add struct bittorrent_const_string.
commitf0d10c9f292fb179d996d7a7cbfffd951c885088
authorKalle Olavi Niemitalo <kon@iki.fi>
Sat, 26 Jan 2008 13:29:13 +0000 (26 15:29 +0200)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Sat, 26 Jan 2008 16:16:45 +0000 (26 18:16 +0200)
tree63fbc13adbfd645b753f6c4e18bf1a2fd06ce0e0
parent4138b401ca1ce0d8148340acee8b1a0eaf8187c8
Add struct bittorrent_const_string.

Previously, struct string was used here.  However,
bittorrent_fetch_callback does not initialize response.magic,
and parse_bittorrent_tracker_response changes response->source
to point to data that must not be freed.  So the util/string.h
functions are not actually safe to use on these objects.
For this reason, it is safer to use a separate type.
src/protocol/bittorrent/bencoding.c
src/protocol/bittorrent/bencoding.h
src/protocol/bittorrent/bittorrent.c
src/protocol/bittorrent/bittorrent.h
src/protocol/bittorrent/common.c
src/protocol/bittorrent/common.h
src/protocol/bittorrent/connection.c
src/protocol/bittorrent/dialogs.c
src/protocol/bittorrent/piececache.c
src/protocol/bittorrent/piececache.h
src/protocol/bittorrent/tracker.c