diff options
| author | Richard Nyberg <rnyberg@murmeldjur.se> | 2006-11-03 17:23:51 +0000 |
|---|---|---|
| committer | Richard Nyberg <rnyberg@murmeldjur.se> | 2006-11-03 17:23:51 +0000 |
| commit | 3bb3d2c0743187c4e4648204673c37f83bff8d74 (patch) | |
| tree | 7eca94dc4df5e6a8c6720fb7a57887592fb2c691 | |
| parent | db7f22db73d6ab55cd283c73c12328e9e0325ab9 (diff) | |
| download | btpd-3bb3d2c0743187c4e4648204673c37f83bff8d74.tar.gz btpd-3bb3d2c0743187c4e4648204673c37f83bff8d74.zip | |
Initialize the interval variable even when we don't read its value from the
tracker reply.
| -rw-r--r-- | btpd/http_tr_if.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/btpd/http_tr_if.c b/btpd/http_tr_if.c index 568b93c..ab5639a 100644 --- a/btpd/http_tr_if.c +++ b/btpd/http_tr_if.c @@ -66,8 +66,10 @@ parse_reply(struct torrent *tp, const char *content, size_t size, int parse, return 1; } - if (!parse) + if (!parse) { + *interval = -1; return 0; + } if (!benc_dct_chk(content, 2, BE_INT, 1, "interval", BE_ANY, 1, "peers")) goto bad_data; |