~ubuntu-branches/ubuntu/maverick/libtorrent-rasterbar/maverick

« back to all changes in this revision

Viewing changes to src/connection_queue.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2009-05-13 12:08:59 UTC
  • mfrom: (3.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090513120859-b5qqlwi43aai3pq3
Tags: 0.14.3-1
* New Upstream Version
  - new package libtorrent-rasterbar3 (bump up library soname).
* debian/control:
  - add Vcs-* stuff (switch to git-buildpackage) and bump up
    Standards-Version to 3.8.1 (no changes required);
  - build-depends on debhelper (>= 7.0.50) and use override_dh_command;
  - move -dbg package to the new 'debug' section;
  - build-depends on autotools-dev and overwrite config.{sub,guess} with a
    recent version in debian/rules.
  - build-depends on quilt and python-docutils:
    + debian/patches/fix_html_docs.patch: fix html documentation for offline
      browsing and add another missing doc file;
    + rebuild docs at build time in debian/rules;
* debian/example.makefile: install a simple makefile for example programs
  included in -doc package.
* debian/rules, debian/python-libtorrent.install: don't rely on hardcoded
  python version, use --install-layout=deb when building python bindings,
  and install to '*-packages' instead of 'site-packages' (this should
  prepare for python2.6 and minimize Ubuntu diff).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
1
/*
3
2
 
4
3
Copyright (c) 2007, Arvid Norberg
177
176
 
178
177
                std::list<entry>::iterator i = std::find_if(m_queue.begin()
179
178
                        , m_queue.end(), boost::bind(&entry::connecting, _1) == false);
 
179
 
 
180
                std::list<entry> to_connect;
 
181
 
180
182
                while (i != m_queue.end())
181
183
                {
182
184
                        TORRENT_ASSERT(i->connecting == false);
193
195
 
194
196
                        INVARIANT_CHECK;
195
197
 
196
 
                        entry& ent = *i;
197
 
                        ++i;
198
 
#ifndef BOOST_NO_EXCEPTIONS
199
 
                        try {
200
 
#endif
201
 
                                ent.on_connect(ent.ticket);
202
 
#ifndef BOOST_NO_EXCEPTIONS
203
 
                        } catch (std::exception&) {}
204
 
#endif
 
198
                        to_connect.push_back(*i);
205
199
 
206
200
#ifdef TORRENT_CONNECTION_LOGGING
207
201
                        m_log << log_time() << " " << free_slots() << std::endl;
211
205
                                && m_half_open_limit > 0) break;
212
206
                        i = std::find_if(i, m_queue.end(), boost::bind(&entry::connecting, _1) == false);
213
207
                }
 
208
 
 
209
                while (!to_connect.empty())
 
210
                {
 
211
                        entry& ent = to_connect.front();
 
212
#ifndef BOOST_NO_EXCEPTIONS
 
213
                        try {
 
214
#endif
 
215
                                ent.on_connect(ent.ticket);
 
216
#ifndef BOOST_NO_EXCEPTIONS
 
217
                        } catch (std::exception&) {}
 
218
#endif
 
219
                        to_connect.pop_front();
 
220
                }
214
221
        }
215
222
 
216
223
#ifdef TORRENT_DEBUG