~ubuntu-branches/debian/stretch/libtorrent/stretch

« back to all changes in this revision

Viewing changes to src/torrent/http.cc

  • Committer: Package Import Robot
  • Author(s): Jose Luis Rivas, Jonathan McDowell, Jose Luis Rivas
  • Date: 2015-09-30 04:03:36 UTC
  • mfrom: (1.3.7) (7.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20150930040336-3u97dzmsdtd3jx03
Tags: 0.13.6-1
[ Jonathan McDowell ]
* Remove Benoît Knecht from Uploaders. Closes: #779430.

[ Jose Luis Rivas ]
* New upstream version.
* debian/watch now uses github.
* Bumped package to match the soname change. Closes: #797866.
  (urgency=medium since this is an RC-bug, gcc5 transition)
* Removed patches, they were already applied upstream.
* Updated homepage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
#include "rak/functional.h"
42
42
#include "torrent/exceptions.h"
43
 
#include "http.h"
 
43
#include "torrent/http.h"
 
44
#include "torrent/utils/log.h"
44
45
 
45
46
namespace torrent {
46
47
 
51
52
 
52
53
void
53
54
Http::trigger_done() {
 
55
  if (signal_done().empty())
 
56
    lt_log_print(LOG_TRACKER_INFO, "Disowned tracker done: url:'%s'.", m_url.c_str());
 
57
 
 
58
  bool should_delete_self = (m_flags & flag_delete_self);
 
59
  bool should_delete_stream = (m_flags & flag_delete_stream);
 
60
 
54
61
  rak::slot_list_call(signal_done());
55
62
 
56
 
  if (m_flags & flag_delete_stream) {
 
63
  if (should_delete_stream) {
57
64
    delete m_stream;
58
65
    m_stream = NULL;
59
66
  }
60
67
 
61
 
  if (m_flags & flag_delete_self)
 
68
  if (should_delete_self)
62
69
    delete this;
63
70
}
64
71
 
65
72
void
66
73
Http::trigger_failed(const std::string& message) {
 
74
  if (signal_done().empty())
 
75
    lt_log_print(LOG_TRACKER_INFO, "Disowned tracker failed: url:'%s'.", m_url.c_str());
 
76
 
 
77
  bool should_delete_self = (m_flags & flag_delete_self);
 
78
  bool should_delete_stream = (m_flags & flag_delete_stream);
 
79
 
67
80
  rak::slot_list_call(signal_failed(), message);
68
81
 
69
 
  if (m_flags & flag_delete_stream) {
 
82
  if (should_delete_stream) {
70
83
    delete m_stream;
71
84
    m_stream = NULL;
72
85
  }
73
86
 
74
 
  if (m_flags & flag_delete_self)
 
87
  if (should_delete_self)
75
88
    delete this;
76
89
}
77
90