~ubuntu-branches/ubuntu/utopic/mediatomb/utopic

« back to all changes in this revision

Viewing changes to src/mt_inotify.cc

  • Committer: Bazaar Package Importer
  • Author(s): Micah Gersten
  • Date: 2010-08-25 17:07:03 UTC
  • mfrom: (1.1.3 upstream) (4.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100825170703-fty3illodas34r1w
Tags: 0.12.1-0ubuntu1
* New upstream release (LP: #553269)
  + Drop patches applied upstream:
    - drop debian/patches/service-id_fix.patch
    - drop debian/patches/ffmpegthumbnailer-2.0.patch
    - drop debian/patches/autoreconf_-fi.patch
  + Refresh patch due to upstream changes
    - update debian/patches/const_char_conversion.patch

* Merge from debian unstable.  Remaining changes:
  - debian/control:
    + Don't depend on libmozjs-dev
    + Add OR depends on abrowser
  - debian/rules: Disable js support
  - fix LP: #569763 - mediatomb allows anyone to browse and export the whole 
    filesystem

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
8
8
                       Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
9
9
    
10
 
    Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
 
10
    Copyright (C) 2006-2010 Gena Batyan <bgeradz@mediatomb.cc>,
11
11
                            Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
12
12
                            Leonhard Wimmer <leo@mediatomb.cc>
13
13
    
24
24
    version 2 along with MediaTomb; if not, write to the Free Software
25
25
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
26
26
    
27
 
    $Id: mt_inotify.cc 2010 2009-01-11 19:10:43Z lww $
 
27
    $Id: mt_inotify.cc 2081 2010-03-23 20:18:00Z lww $
28
28
*/
29
29
 
30
30
/*
89
89
        Ref<Array<StringBase> > kversion = split_string(_(info.release), '.');
90
90
        if (kversion->size() >= 3)
91
91
        {
92
 
            int major = String(kversion->get(0)->data).toInt();
93
 
            int minor = String(kversion->get(1)->data).toInt();
94
 
            int patch = String(kversion->get(2)->data).toInt();
 
92
            int major = _(kversion->get(0)->data).toInt();
 
93
            int minor = _(kversion->get(1)->data).toInt();
 
94
            int patch = _(kversion->get(2)->data).toInt();
95
95
 
96
96
            if ((major < 2) && (minor < 6) && (patch < 13))
97
97
                return false;
115
115
    {
116
116
        if (errno == ENOSPC)
117
117
            throw _Exception(_("The user limit on the total number of inotify watches was reached or the kernel failed to allocate a needed resource."));
 
118
        else if (errno == EACCES)
 
119
        {
 
120
            log_warning("Cannot add inotify watch for %s: %s\n", path.c_str(), strerror(errno));
 
121
            return -1;
 
122
        }
118
123
        else
119
124
            throw _Exception(mt_strerror(errno));
120
125
    }