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

« back to all changes in this revision

Viewing changes to src/upnp.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:
210
210
{
211
211
        mutex_t::scoped_lock l(m_mutex);
212
212
 
213
 
        if (mapping <= int(m_mappings.size())) return;
 
213
        if (mapping >= int(m_mappings.size())) return;
214
214
 
215
215
        global_mapping_t& m = m_mappings[mapping];
216
216
 
513
513
                boost::tie(i, boost::tuples::ignore) = m_devices.insert(d);
514
514
        }
515
515
 
516
 
 
517
 
        // since we're using udp, send the query 4 times
518
 
        // just to make sure we find all devices
519
 
        if (m_retry_count >= 4 && !m_devices.empty())
 
516
        if (!m_devices.empty())
520
517
        {
521
 
                error_code ec;
522
 
                m_broadcast_timer.cancel(ec);
523
 
 
524
518
                for (std::set<rootdevice>::iterator i = m_devices.begin()
525
519
                        , end(m_devices.end()); i != end; ++i)
526
520
                {
912
906
                }
913
907
        }
914
908
        
915
 
        if (!s.url_base.empty())
 
909
        if (!s.url_base.empty() && s.control_url.substr(7) != "http://")
916
910
        {
917
911
                // avoid double slashes in path
918
912
                if (s.url_base[s.url_base.size()-1] == '/'
969
963
                m_callback(i - m_mappings.begin(), 0, msg);
970
964
        }
971
965
        
972
 
        m_devices.clear();
 
966
//      m_devices.clear();
973
967
        error_code ec;
974
968
        m_broadcast_timer.cancel(ec);
975
969
        m_refresh_timer.cancel(ec);