Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

error during compilation of davfs2-1.3.2

Mario
2008-05-21
2013-04-16
  • Mario
    Mario
    2008-05-21

    error during compilation of davfs2-1.3.2       

    gcc -DPROGRAM_NAME=\"mount.davfs\"
    -DDAV_SYS_CONF_DIR=\"/usr/local/etc/davfs2\"
    -DDAV_SYS_RUN=\"/var/run/mount.davfs\"
    -DDAV_SYS_CACHE=\"/var/cache/davfs2\" -DDAV_SECRETS=\"secrets\"
    -DDAV_CONFIG=\"davfs2.conf\" -DDAV_CERTS_DIR=\"certs\"
    -DDAV_CLICERTS_DIR=\"private\" -DDAV_DATA_DIR=\"/usr/local/share/davfs2\"
    -DLOCALEDIR=\"/usr/local/share/locale\" -DDAV_USER=\"davfs2\"
    -DDAV_GROUP=\"davfs2\" -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2
    -I/usr/local/include/neon -D_LARGEFILE64_SOURCE -DNE_LFS -MT cache.o -MD
    -MP -MF .deps/cache.Tpo -c -o cache.o cache.c
    cache.c: In function `attr_from_cache_file':
    cache.c:230: parse error before `old_size'
    cache.c:232: `old_size' undeclared (first use in this function)
    cache.c:232: (Each undeclared identifier is reported only once
    cache.c:232: for each function it appears in.)
    cache.c: In function `set_cache_file_times':
    cache.c:378: parse error before `struct'
    cache.c:379: `t' undeclared (first use in this function)
    cache.c: In function `dav_init_cache':
    cache.c:527: parse error before `int'
    cache.c:528: `ret' undeclared (first use in this function)
    cache.c: In function `dav_close_cache':
    cache.c:560: parse error before `char'
    cache.c:563: `new_index' undeclared (first use in this function)
    cache.c:564: parse error before `*'
    cache.c:565: `new_file' undeclared (first use in this function)
    cache.c:578: parse error before `char'
    cache.c:579: `old_index' undeclared (first use in this function)
    cache.c: In function `dav_tidy_cache':
    cache.c:629: parse error before `static'
    cache.c:632: `next_item' undeclared (first use in this function)
    cache.c:632: `item' undeclared (first use in this function)
    cache.c:640: parse error before `*'
    cache.c:642: `node' undeclared (first use in this function)
    cache.c:648: parse error before `int'
    cache.c:651: `ret' undeclared (first use in this function)
    cache.c: In function `dav_close':
    cache.c:710: parse error before `*'
    cache.c:711: `fh' undeclared (first use in this function)
    cache.c: In function `dav_create':
    cache.c:752: parse error before `struct'
    cache.c:753: `pw' undeclared (first use in this function)
    cache.c:756: parse error before `char'
    cache.c:758: `name_conv' undeclared (first use in this function)
    cache.c:761: `path' undeclared (first use in this function)
    cache.c:765: parse error before `int'
    cache.c:766: `ret' undeclared (first use in this function)
    cache.c: In function `dav_mkdir':
    cache.c:887: parse error before `struct'
    cache.c:888: `pw' undeclared (first use in this function)
    cache.c:891: parse error before `char'
    cache.c:893: `name_conv' undeclared (first use in this function)
    cache.c:894: parse error before `int'
    cache.c:896: `ret' undeclared (first use in this function)
    cache.c:898: `path' undeclared (first use in this function)
    cache.c: In function `dav_open':
    cache.c:926: parse error before `int'
    cache.c:928: `how' undeclared (first use in this function)
    cache.c:947: parse error before `int'
    cache.c:950: `ret' undeclared (first use in this function)
    cache.c:979: warning: control reaches end of non-void function
    cache.c: In function `dav_read':
    cache.c:988: parse error before `*'
    cache.c:989: `fh' undeclared (first use in this function)
    cache.c: In function `dav_remove':
    cache.c:1020: parse error before `*'
    cache.c:1021: `node' undeclared (first use in this function)
    cache.c:1030: parse error before `int'
    cache.c:1033: `ret' undeclared (first use in this function)
    cache.c: In function `dav_rename':
    cache.c:1079: parse error before `*'
    cache.c:1081: `src' undeclared (first use in this function)
    cache.c:1087: `dst' undeclared (first use in this function)
    cache.c:1090: parse error before `int'
    cache.c:1092: `ret' undeclared (first use in this function)
    cache.c: In function `dav_rmdir':
    cache.c:1136: parse error before `*'
    cache.c:1137: `node' undeclared (first use in this function)
    cache.c:1150: parse error before `int'
    cache.c:1151: `ret' undeclared (first use in this function)
    cache.c: In function `dav_setattr':
    cache.c:1211: parse error before `char'
    cache.c:1212: `member' undeclared (first use in this function)
    cache.c:1250: parse error before `int'
    cache.c:1252: `ret' undeclared (first use in this function)
    cache.c: In function `dav_statfs':
    cache.c:1327: parse error before `struct'
    cache.c:1328: `cache_st' undeclared (first use in this function)
    cache.c:1335: parse error before `used'
    cache.c:1336: `used' undeclared (first use in this function)
    cache.c: In function `dav_sync':
    cache.c:1352: parse error before `*'
    cache.c:1353: `fh' undeclared (first use in this function)
    cache.c: In function `dav_write':
    cache.c:1369: parse error before `*'
    cache.c:1370: `fh' undeclared (first use in this function)
    cache.c:1376: parse error before `n'
    cache.c:1377: `n' undeclared (first use in this function)
    cache.c: In function `add_node':
    cache.c:1407: parse error before `*'
    cache.c:1410: `node' undeclared (first use in this function)
    cache.c: In function `backup_node':
    cache.c:1475: parse error before `*'
    cache.c:1476: `node' undeclared (first use in this function)
    cache.c: In function `clean_tree':
    cache.c:1545: parse error before `int'
    cache.c:1551: `ret' undeclared (first use in this function)
    cache.c: In function `move_dir':
    cache.c:1627: parse error before `char'
    cache.c:1630: `dst_path' undeclared (first use in this function)
    cache.c: In function `move_dirty':
    cache.c:1662: parse error before `char'
    cache.c:1665: `dst_path' undeclared (first use in this function)
    cache.c: In function `move_reg':
    cache.c:1731: parse error before `char'
    cache.c:1734: `dst_path' undeclared (first use in this function)
    cache.c: In function `new_node':
    cache.c:1799: parse error before `i'
    cache.c:1800: `i' undeclared (first use in this function)
    cache.c: In function `remove_from_table':
    cache.c:1858: parse error before `i'
    cache.c:1860: `np' undeclared (first use in this function)
    cache.c: In function `remove_from_tree':
    cache.c:1875: parse error before `*'
    cache.c:1876: `np' undeclared (first use in this function)
    cache.c: In function `update_directory':
    cache.c:1949: parse error before `*'
    cache.c:1953: `ret' undeclared (first use in this function)
    cache.c:1966: parse error before `int'
    cache.c:1968: `child' undeclared (first use in this function)
    cache.c:1971: `props' undeclared (first use in this function)
    cache.c:1977: invalid operands to binary |
    cache.c:1980: warning: assignment makes pointer from integer without a
    cast
    cache.c:1990: warning: assignment makes pointer from integer without a
    cast
    cache.c: In function `update_node':
    cache.c:2043: parse error before `int'
    cache.c:2056: `ret' undeclared (first use in this function)
    cache.c:2135: warning: control reaches end of non-void function
    cache.c: In function `update_path':
    cache.c:2158: parse error before `char'
    cache.c:2160: `path' undeclared (first use in this function)
    cache.c: In function `has_permission':
    cache.c:2220: parse error before `a_mode'
    cache.c:2221: `a_mode' undeclared (first use in this function)
    cache.c:2230: parse error before `struct'
    cache.c:2231: `pw' undeclared (first use in this function)
    cache.c:2237: parse error before `char'
    cache.c:2238: `members' undeclared (first use in this function)
    cache.c: In function `close_fh':
    cache.c:2289: parse error before `*'
    cache.c:2290: `fhp' undeclared (first use in this function)
    cache.c: In function `create_cache_file':
    cache.c:2313: parse error before `int'
    cache.c:2314: `fd' undeclared (first use in this function)
    cache.c: In function `create_dir_cache_file':
    cache.c:2346: parse error before `int'
    cache.c:2347: `fd' undeclared (first use in this function)
    cache.c:2356: parse error before `size'
    cache.c:2357: `size' undeclared (first use in this function)
    cache.c:2359: parse error before `*'
    cache.c:2360: `node' undeclared (first use in this function)
    cache.c: In function `open_file':
    cache.c:2393: parse error before `*'
    cache.c:2394: `fh' undeclared (first use in this function)
    cache.c: In function `update_cache_file':
    cache.c:2427: parse error before `int'
    cache.c:2430: `ret' undeclared (first use in this function)
    cache.c:2458: parse error before `int'
    cache.c:2462: `modified' undeclared (first use in this function)
    cache.c:2470: `old_size' undeclared (first use in this function)
    cache.c:2475: parse error before `smtime'
    cache.c:2477: `etag' undeclared (first use in this function)
    cache.c:2478: `smtime' undeclared (first use in this function)
    cache.c:2499: warning: control reaches end of non-void function
    cache.c: In function `check_cache_dir':
    cache.c:2518: parse error before `char'
    cache.c:2519: `dir_name' undeclared (first use in this function)
    cache.c:2520: parse error before `char'
    cache.c:2521: `pos' undeclared (first use in this function)
    cache.c:2526: parse error before `*'
    cache.c:2527: `tl_dir' undeclared (first use in this function)
    cache.c:2530: parse error before `struct'
    cache.c:2531: `de' undeclared (first use in this function)
    cache.c:2548: parse error before `struct'
    cache.c:2549: `st' undeclared (first use in this function)
    cache.c: In function `clean_cache':
    cache.c:2568: parse error before `struct'
    cache.c:2569: `de' undeclared (first use in this function)
    cache.c:2589: parse error before `*'
    cache.c:2590: `found' undeclared (first use in this function)
    cache.c: In function `parse_index':
    cache.c:2619: parse error before `char'
    cache.c:2621: `len' undeclared (first use in this function)
    cache.c:2622: `buf' undeclared (first use in this function)
    cache.c:2628: parse error before `*'
    cache.c:2630: `parser' undeclared (first use in this function)
    cache.c:2630: `node' undeclared (first use in this function)
    cache.c:2647: parse error before `int'
    cache.c:2648: `ret' undeclared (first use in this function)
    cache.c: In function `resize_cache':
    cache.c:2683: parse error before `i'
    cache.c:2684: `i' undeclared (first use in this function)
    cache.c: In function `write_node':
    cache.c:2753: parse error before `char'
    cache.c:2756: `ind' undeclared (first use in this function)
    cache.c:2802: parse error before `char'
    cache.c:2804: `t' undeclared (first use in this function)
    cache.c:2804: `lt' undeclared (first use in this function)
    cache.c:2854: parse error before `*'
    cache.c:2855: `child' undeclared (first use in this function)
    cache.c: In function `xml_end_date':
    cache.c:2936: parse error before `char'
    cache.c:2938: `tail' undeclared (first use in this function)
    cache.c:2948: `t' undeclared (first use in this function)
    cache.c: In function `xml_end_decimal':
    cache.c:2977: parse error before `char'
    cache.c:2979: `tail' undeclared (first use in this function)
    cache.c:2989: `n' undeclared (first use in this function)
    cache.c: In function `xml_end_mode':
    cache.c:3044: parse error before `char'
    cache.c:3045: `tail' undeclared (first use in this function)
    cache.c: In function `xml_end_reg':
    cache.c:3070: parse error before `struct'
    cache.c:3072: `st' undeclared (first use in this function)
    cache.c: In function `xml_end_size':
    cache.c:3150: parse error before `char'
    cache.c:3153: `tail' undeclared (first use in this function)
    cache.c: In function `xml_start_backup':
    cache.c:3260: parse error before `*'
    cache.c:3261: `dir' undeclared (first use in this function)
    cache.c: In function `xml_start_dir':
    cache.c:3354: parse error before `*'
    cache.c:3355: `dir' undeclared (first use in this function)
    cache.c: In function `xml_start_reg':
    cache.c:3396: parse error before `*'
    cache.c:3397: `reg' undeclared (first use in this function)
    cache.c: In function `test_alignment':
    cache.c:3486: parse error before `align'
    cache.c:3492: `align' undeclared (first use in this function)
    cache.c:3492: `j' undeclared (first use in this function)
    cache.c:3492: `trials' undeclared (first use in this function)
    cache.c:3493: `s' undeclared (first use in this function)
    cache.c:3494: `n' undeclared (first use in this function)
    cache.c:3507: warning: control reaches end of non-void function
    cache.c: At top level:
    cache.c:2183: warning: `get_file_handle' defined but not used
    make[2]: *** [cache.o] Error 1
    make[2]: Leaving directory `/oracle/davfs2-1.3.2/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/oracle/davfs2-1.3.2'
    make: *** [all] Error 2

     
    • Werner Baumann
      Werner Baumann
      2008-05-21

      Hello Mario,

      please don't double post.

      From the compile errors it looks like the compiler does not recognize basic data types like int, off_t or char. This is not very likely. But you should check the output from ./configure for any warnings and errors anyway. If in doubt, send it to me, but only the *full* output.

      Another explanation would be, that your copy of cache.c has been scrambled severely, though the line numbers seem to be o.k. Please compare them to e.g. the copy in the CVS-repository.

      If you can't find anything suspicious this way, I would need some more information about your system, the tools you are using, as well as the complete output from all the tools you apply, starting with tar, additionally the file config.h.

      Cheers
      Werner

       
    • Mario
      Mario
      2008-05-21

      [root@ptkads davfs2-1.3.2]# uname -a
      Linux ptkads 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux

      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether build environment is sane... yes
      checking for a thread-safe mkdir -p... /bin/mkdir -p
      checking for gawk... gawk
      checking whether make sets $(MAKE)... yes
      checking for gcc... gcc
      checking for C compiler default output file name... a.out
      checking whether the C compiler works... yes
      checking whether we are cross compiling... no
      checking for suffix of executables...
      checking for suffix of object files... o
      checking whether we are using the GNU C compiler... yes
      checking whether gcc accepts -g... yes
      checking for gcc option to accept ISO C89... none needed
      checking for style of include used by make... GNU
      checking dependency style of gcc... gcc3
      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether ln -s works... yes
      checking whether NLS is requested... yes
      checking for msgfmt... /usr/bin/msgfmt
      checking for gmsgfmt... /usr/bin/msgfmt
      checking for xgettext... /usr/bin/xgettext
      checking for msgmerge... /usr/bin/msgmerge
      checking build system type... i686-pc-linux-gnu
      checking host system type... i686-pc-linux-gnu
      checking for ld used by GCC... /usr/bin/ld
      checking if the linker (/usr/bin/ld) is GNU ld... yes
      checking for shared library run path origin... done
      checking for CFPreferencesCopyAppValue... no
      checking for CFLocaleCopyCurrent... no
      checking whether NLS is requested... yes
      checking for GNU gettext in libc... yes
      checking whether to use NLS... yes
      checking where the gettext function comes from... libc
      checking for neon-config... /usr/local/bin/neon-config
      checking linking against neon... yes
      configure: using neon library 0.26.3
      configure: SSL is not supported by neon
      configure: zlib is supported by neon
      configure: IPv6 is supported by neon
      configure: LFS is supported by neon
      configure: SOCKSv5 is not supported by neon
      configure: thread-safe SSL is not supported by neon
      checking for dirent.h that defines DIR... yes
      checking for library containing opendir... none required
      checking how to run the C preprocessor... gcc -E
      checking for grep that handles long lines and -e... /bin/grep
      checking for egrep... /bin/grep -E
      checking for ANSI C header files... yes
      checking for sys/types.h... yes
      checking for sys/stat.h... yes
      checking for stdlib.h... yes
      checking for string.h... yes
      checking for memory.h... yes
      checking for strings.h... yes
      checking for inttypes.h... yes
      checking for stdint.h... yes
      checking for unistd.h... yes
      checking argz.h usability... yes
      checking argz.h presence... yes
      checking for argz.h... yes
      checking fcntl.h usability... yes
      checking fcntl.h presence... yes
      checking for fcntl.h... yes
      checking libintl.h usability... yes
      checking libintl.h presence... yes
      checking for libintl.h... yes
      checking langinfo.h usability... yes
      checking langinfo.h presence... yes
      checking for langinfo.h... yes
      checking limits.h usability... yes
      checking limits.h presence... yes
      checking for limits.h... yes
      checking locale.h usability... yes
      checking locale.h presence... yes
      checking for locale.h... yes
      checking mntent.h usability... yes
      checking mntent.h presence... yes
      checking for mntent.h... yes
      checking stddef.h usability... yes
      checking stddef.h presence... yes
      checking for stddef.h... yes
      checking for stdint.h... (cached) yes
      checking for stdlib.h... (cached) yes
      checking for string.h... (cached) yes
      checking sys/mount.h usability... yes
      checking sys/mount.h presence... yes
      checking for sys/mount.h... yes
      checking sys/time.h usability... yes
      checking sys/time.h presence... yes
      checking for sys/time.h... yes
      checking syslog.h usability... yes
      checking syslog.h presence... yes
      checking for syslog.h... yes
      checking termios.h usability... yes
      checking termios.h presence... yes
      checking for termios.h... yes
      checking for unistd.h... (cached) yes
      checking utime.h usability... yes
      checking utime.h presence... yes
      checking for utime.h... yes
      checking for an ANSI C-conforming const... yes
      checking for uid_t in sys/types.h... yes
      checking for inline... inline
      checking for mode_t... yes
      checking for off_t... yes
      checking for pid_t... yes
      checking for size_t... yes
      checking for struct stat.st_blksize... yes
      checking whether time.h and sys/time.h may both be included... yes
      checking for working volatile... yes
      checking for void *... yes
      checking size of void *... 4
      checking for unistd.h... (cached) yes
      checking for working chown... yes
      checking whether closedir returns void... no
      checking for error_at_line... yes
      checking vfork.h usability... no
      checking vfork.h presence... no
      checking for vfork.h... no
      checking for fork... yes
      checking for vfork... yes
      checking for working fork... yes
      checking for working vfork... (cached) yes
      checking for library containing getmntent... none required
      checking whether gcc needs -traditional... no
      checking whether sys/types.h defines makedev... yes
      checking for stdlib.h... (cached) yes
      checking for GNU libc compatible malloc... yes
      checking sys/select.h usability... yes
      checking sys/select.h presence... yes
      checking for sys/select.h... yes
      checking sys/socket.h usability... yes
      checking sys/socket.h presence... yes
      checking for sys/socket.h... yes
      checking types of arguments for select... int,fd_set *,struct timeval *
      checking whether lstat dereferences a symlink specified with a trailing slash... yes
      checking whether stat accepts an empty string... no
      checking for utime.h... (cached) yes
      checking whether utime accepts a null argument... yes
      checking for endpwent... yes
      checking for getmntent... (cached) yes
      checking for memset... yes
      checking for mkdir... yes
      checking for nl_langinfo... yes
      checking for rpmatch... yes
      checking for select... yes
      checking for setlocale... yes
      checking for strcasecmp... yes
      checking for strchr... yes
      checking for strdup... yes
      checking for strerror... yes
      checking for strstr... yes
      checking for strtol... yes
      checking for utime... yes
      checking for special C compiler options needed for large files... no
      checking for _FILE_OFFSET_BITS value needed for large files... 64
      configure: creating ./config.status
      config.status: creating Makefile
      config.status: creating po/Makefile.in
      config.status: WARNING:  po/Makefile.in.in seems to ignore the --datarootdir setting
      config.status: creating etc/Makefile
      config.status: creating man/Makefile
      config.status: creating man/de/Makefile
      config.status: creating man/es/Makefile
      config.status: creating src/Makefile
      config.status: creating config.h
      config.status: executing depfiles commands
      config.status: executing default-1 commands
      config.status: creating po/POTFILES
      config.status: creating po/Makefile

      Configuration for building davfs2 1.3.2:

        Install Prefix:            /usr/local
        Compiler:                  gcc
        Large File Support:        yes
        Neon Library:              library in /usr/local (0.26.3)
                                   SSL is not supported by neon
        National Language Support: libc

       
    • Mario
      Mario
      2008-05-21

      /* config.h.  Generated from config.h.in by configure.  */
      /* config.h.in.  Generated from configure.ac by autoheader.  */

      /* Define to 1 if the `closedir' function returns void instead of `int'. */
      /* #undef CLOSEDIR_VOID */

      /* Define to 1 if translation of program messages to the user's native
         language is requested. */
      #define ENABLE_NLS 1

      /* Define to 1 if you have the <argz.h> header file. */
      #define HAVE_ARGZ_H 1

      /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
         CoreFoundation framework. */
      /* #undef HAVE_CFLOCALECOPYCURRENT */

      /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
         the CoreFoundation framework. */
      /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */

      /* Define to 1 if your system has a working `chown' function. */
      #define HAVE_CHOWN 1

      /* Define if the GNU dcgettext() function is already present or preinstalled.
         */
      #define HAVE_DCGETTEXT 1

      /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
         */
      #define HAVE_DIRENT_H 1

      /* Define to 1 if you have the `endpwent' function. */
      #define HAVE_ENDPWENT 1

      /* Define to 1 if you have the <fcntl.h> header file. */
      #define HAVE_FCNTL_H 1

      /* Define to 1 if you have the `fork' function. */
      #define HAVE_FORK 1

      /* Define to 1 if you have the `getmntent' function. */
      #define HAVE_GETMNTENT 1

      /* Define if the GNU gettext() function is already present or preinstalled. */
      #define HAVE_GETTEXT 1

      /* Define if you have the iconv() function. */
      /* #undef HAVE_ICONV */

      /* Define to 1 if you have the <inttypes.h> header file. */
      #define HAVE_INTTYPES_H 1

      /* Define to 1 if you have the <langinfo.h> header file. */
      #define HAVE_LANGINFO_H 1

      /* Define to 1 if you have the <libintl.h> header file. */
      #define HAVE_LIBINTL_H 1

      /* Define to 1 if you have the <limits.h> header file. */
      #define HAVE_LIMITS_H 1

      /* Define to 1 if you have the <locale.h> header file. */
      #define HAVE_LOCALE_H 1

      /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
         to 0 otherwise. */
      #define HAVE_MALLOC 1

      /* Define to 1 if you have the <memory.h> header file. */
      #define HAVE_MEMORY_H 1

      /* Define to 1 if you have the `memset' function. */
      #define HAVE_MEMSET 1

      /* Define to 1 if you have the `mkdir' function. */
      #define HAVE_MKDIR 1

      /* Define to 1 if you have the <mntent.h> header file. */
      #define HAVE_MNTENT_H 1

      /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
      /* #undef HAVE_NDIR_H */

      /* Define to 1 if you have the `nl_langinfo' function. */
      #define HAVE_NL_LANGINFO 1

      /* Define to 1 if you have the `rpmatch' function. */
      #define HAVE_RPMATCH 1

      /* Define to 1 if you have the `select' function. */
      #define HAVE_SELECT 1

      /* Define to 1 if you have the `setlocale' function. */
      #define HAVE_SETLOCALE 1

      /* Define to 1 if `stat' has the bug that it succeeds when given the
         zero-length file name argument. */
      /* #undef HAVE_STAT_EMPTY_STRING_BUG */

      /* Define to 1 if you have the <stddef.h> header file. */
      #define HAVE_STDDEF_H 1

      /* Define to 1 if you have the <stdint.h> header file. */
      #define HAVE_STDINT_H 1

      /* Define to 1 if you have the <stdlib.h> header file. */
      #define HAVE_STDLIB_H 1

      /* Define to 1 if you have the `strcasecmp' function. */
      #define HAVE_STRCASECMP 1

      /* Define to 1 if you have the `strchr' function. */
      #define HAVE_STRCHR 1

      /* Define to 1 if you have the `strdup' function. */
      #define HAVE_STRDUP 1

      /* Define to 1 if you have the `strerror' function. */
      #define HAVE_STRERROR 1

      /* Define to 1 if you have the <strings.h> header file. */
      #define HAVE_STRINGS_H 1

      /* Define to 1 if you have the <string.h> header file. */
      #define HAVE_STRING_H 1

      /* Define to 1 if you have the `strstr' function. */
      #define HAVE_STRSTR 1

      /* Define to 1 if you have the `strtol' function. */
      #define HAVE_STRTOL 1

      /* Define to 1 if `st_blksize' is member of `struct stat'. */
      #define HAVE_STRUCT_STAT_ST_BLKSIZE 1

      /* Define to 1 if you have the <syslog.h> header file. */
      #define HAVE_SYSLOG_H 1

      /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
         */
      /* #undef HAVE_SYS_DIR_H */

      /* Define to 1 if you have the <sys/mount.h> header file. */
      #define HAVE_SYS_MOUNT_H 1

      /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
         */
      /* #undef HAVE_SYS_NDIR_H */

      /* Define to 1 if you have the <sys/select.h> header file. */
      #define HAVE_SYS_SELECT_H 1

      /* Define to 1 if you have the <sys/socket.h> header file. */
      #define HAVE_SYS_SOCKET_H 1

      /* Define to 1 if you have the <sys/stat.h> header file. */
      #define HAVE_SYS_STAT_H 1

      /* Define to 1 if you have the <sys/time.h> header file. */
      #define HAVE_SYS_TIME_H 1

      /* Define to 1 if you have the <sys/types.h> header file. */
      #define HAVE_SYS_TYPES_H 1

      /* Define to 1 if you have the <termios.h> header file. */
      #define HAVE_TERMIOS_H 1

      /* Define to 1 if you have the <unistd.h> header file. */
      #define HAVE_UNISTD_H 1

      /* Define to 1 if you have the `utime' function. */
      #define HAVE_UTIME 1

      /* Define to 1 if you have the <utime.h> header file. */
      #define HAVE_UTIME_H 1

      /* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
      #define HAVE_UTIME_NULL 1

      /* Define to 1 if you have the `vfork' function. */
      #define HAVE_VFORK 1

      /* Define to 1 if you have the <vfork.h> header file. */
      /* #undef HAVE_VFORK_H */

      /* Define to 1 if `fork' works. */
      #define HAVE_WORKING_FORK 1

      /* Define to 1 if `vfork' works. */
      #define HAVE_WORKING_VFORK 1

      /* Define to 1 if `lstat' dereferences a symlink specified with a trailing
         slash. */
      #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1

      /* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
         */
      /* #undef MAJOR_IN_MKDEV */

      /* Define to 1 if `major', `minor', and `makedev' are declared in
         <sysmacros.h>. */
      /* #undef MAJOR_IN_SYSMACROS */

      /* Define to be the neon version string */
      #define NEON_VERSION "0.26.3"

      /* Defined if IPV6 is supported */
      #define NE_HAVE_IPV6 1

      /* Defined if LFS is supported */
      #define NE_HAVE_LFS 1

      /* Defined if SOCKS is supported */
      /* #undef NE_HAVE_SOCKS */

      /* Defined if SSL is supported */
      /* #undef NE_HAVE_SSL */

      /* Defined if TS_SSL is supported */
      /* #undef NE_HAVE_TS_SSL */

      /* Defined if ZLIB is supported */
      #define NE_HAVE_ZLIB 1

      /* Define to be neon library major version */
      #define NE_VERSION_MAJOR (0)

      /* Define to be neon library minor version */
      #define NE_VERSION_MINOR (26)

      /* Define to be neon library patch version */
      #define NE_VERSION_PATCH (3)

      /* Name of package */
      #define PACKAGE "davfs2"

      /* Define to the address where bug reports for this package should be sent. */
      #define PACKAGE_BUGREPORT "dav-linuxfs@lists.sf.net"

      /* Define to the full name of this package. */
      #define PACKAGE_NAME "davfs2"

      /* Define to the full name and version of this package. */
      #define PACKAGE_STRING "davfs2 1.3.2"

      /* Define to the one symbol short name of this package. */
      #define PACKAGE_TARNAME "davfs2"

      /* Define to the version of this package. */
      #define PACKAGE_VERSION "1.3.2"

      /* Define to the type of arg 1 for `select'. */
      #define SELECT_TYPE_ARG1 int

      /* Define to the type of args 2, 3 and 4 for `select'. */
      #define SELECT_TYPE_ARG234 (fd_set *)

      /* Define to the type of arg 5 for `select'. */
      #define SELECT_TYPE_ARG5 (struct timeval *)

      /* The size of `void *', as computed by sizeof. */
      #define SIZEOF_VOID_P 4

      /* Define to 1 if you have the ANSI C header files. */
      #define STDC_HEADERS 1

      /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
      #define TIME_WITH_SYS_TIME 1

      /* Version number of package */
      #define VERSION "1.3.2"

      /* Number of bits in a file offset, on hosts where this is settable. */
      #define _FILE_OFFSET_BITS 64

      /* Define to enable GNU extensions */
      #define _GNU_SOURCE 1

      /* Define for large files, on AIX-style hosts. */
      /* #undef _LARGE_FILES */

      /* Define to empty if `const' does not conform to ANSI C. */
      /* #undef const */

      /* Define to `int' if <sys/types.h> doesn't define. */
      /* #undef gid_t */

      /* Define to `__inline__' or `__inline' if that's what the C compiler
         calls it, or to nothing if 'inline' is not supported under any name.  */
      #ifndef __cplusplus
      /* #undef inline */
      #endif

      /* Define to rpl_malloc if the replacement function should be used. */
      /* #undef malloc */

      /* Define to `int' if <sys/types.h> does not define. */
      /* #undef mode_t */

      /* Define to `long int' if <sys/types.h> does not define. */
      /* #undef off_t */

      /* Define to `int' if <sys/types.h> does not define. */
      /* #undef pid_t */

      /* Define to `unsigned int' if <sys/types.h> does not define. */
      /* #undef size_t */

      /* Define to `int' if <sys/types.h> doesn't define. */
      /* #undef uid_t */

      /* Define as `fork' if `vfork' does not work. */
      /* #undef vfork */

      /* Define to empty if the keyword `volatile' does not work. Warning: valid
         code using `volatile' can become incorrect without. Disable with care. */
      /* #undef volatile */

       
    • Mario
      Mario
      2008-05-21

      /*
      ** DAV directory chache
      */

      /*
      *  This file is part of davfs2.
      *
      *  davfs2 is free software; you can redistribute it and/or modify
      *  it under the terms of the GNU General Public License as published by
      *  the Free Software Foundation; either version 2 of the License, or
      *  (at your option) any later version.
      *
      *  davfs2 is distributed in the hope that it will be useful,
      *  but WITHOUT ANY WARRANTY; without even the implied warranty of
      *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      *  GNU General Public License for more details.
      *
      *  You should have received a copy of the GNU General Public License
      *  along with davfs2; if not, write to the Free Software
      *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
      */

      #include "config.h"

      #include <argz.h>
      #include <dirent.h>
      #include <errno.h>
      #include <error.h>
      #include <fcntl.h>
      #include <grp.h>
      #include <libintl.h>
      #include <pwd.h>
      #include <signal.h>
      #include <stdio.h>
      #include <stdlib.h>
      #include <string.h>
      #include <syslog.h>
      #include <time.h>
      #include <unistd.h>
      #include <utime.h>

      #ifdef ENABLE_NLS
      #   include <libintl.h>
      #   define _(String) gettext(String)
      #else
      #   define _(String) String
      #endif

      #include <sys/stat.h>
      #include <sys/xattr.h>

      #include <ne_alloc.h>
      #include <ne_dates.h>
      #include <ne_string.h>
      #include <ne_uri.h>
      #include <ne_xml.h>

      #include "defaults.h"
      #include "webdav.h"
      #include "cache.h"

      /* Private constants */
      /*===================*/

      /* Constants describing different types of XML elements and attributes
         in cache index file. */
      enum {
          ROOT = 1,
          BACKUP,
          DDIR,
          REG,
          PATH,
          NAME,
          CACHE_PATH,
          SIZE,
          MODE,
          UID,
          GID,
          ATIME,
          MTIME,
          CTIME,
          SMTIME,
          ETAG,
          MIME,
          DIRTY,
          REMOTE_EXISTS,
          END
      };

      static const char* const type[] = {
          [ROOT] = "root",
          [BACKUP] = "backup",
          [DDIR] = "dir",
          [REG] = "reg",
          [PATH] = "path",
          [NAME] = "name",
          [CACHE_PATH] = "cache_path",
          [SIZE] = "size",
          [MODE] = "mode",
          [UID] = "uid",
          [GID] = "gid",
          [ATIME] = "atime",
          [MTIME] = "mtime",
          [CTIME] = "ctime",
          [SMTIME] = "smtime",
          [ETAG] = "etag",
          [MIME] = "mime",
          [DIRTY] = "dirty",
          [REMOTE_EXISTS] = "remote_exists",
          [END] = NULL
      };

      /* Private global variables */
      /*==========================*/

      /* Number of nodes. */
      static int nnodes;

      /* Root node of the directory cache. */
      static dav_node *root;

      /* Directory for local buckups. */
      static dav_node *backup;

      /* A hash table to store the nodes. The hash is computed from the pointer
         to the node, which is also the node number. */
      static dav_node **table;

      /* Size of the hash table. */
      static size_t table_size;

      /* Number of files in list changed. */
      static int nchanged;

      /* List of nodes, that have been changed and the changes must be saved
         back to the server. */
      static dav_node_list_item *changed;

      /* How long results of PROPFIND for directories are considered valid. */
      static time_t dir_refresh;

      /* Wait that many seconds from last file access before doing a new
         GET If-Modiefied request. */
      static time_t file_refresh;

      /* Upload file that many seconds after closing. */
      static time_t delay_upload;

      /* Optimize file updates for graphical user interfaces = use PROPFIND to get
         the Last-Modified-dates for the whole directory instead of
         GET If-Modified-Since for single files. */
      static int gui_optimize;

      /* Time interval to wait, before a directory is updated. Usually equal to
         dir_refresh, but will be varied in case the connection timed out.*/
      static time_t retry;

      /* Minimum retry time. */
      static time_t min_retry;

      /* Maximum retry time. */
      static time_t max_retry;

      /* Refresh locks this much seconds before they time out. */
      static time_t lock_refresh;

      /* Defaults for file ownership and mode. */
      static uid_t default_uid;
      static gid_t default_gid;
      static mode_t default_file_mode;
      static mode_t default_dir_mode;
      static mode_t file_umask;
      static mode_t dir_umask;

      /* Directory for cached files and directories. */
      static char *cache_dir;

      /* Maximum cache size. If open files require more space, this will
         be ignored. */
      unsigned long long max_cache_size;

      /* Actual cache size. */
      unsigned long long cache_size;

      /* Alignment boundary of dav_node in byte.
         Used to compute a hash value and file numbers from node pointers. */
      static size_t alignment;

      /* Pointers that will be set by dav_register_kernel_interface(), which must be
         called by the kernel-interface. Initialized to point to dummies as long as
         dav_register_kernel_interface() has not been called. */

      /* A call back functions, that writes one direntry. The dummy returns EIO.
         Registering a working function is essential for mount.davfs. */
      static off_t write_dir_entry_dummy(int fd, off_t off, const dav_node *node,
                                         const char *name) {
          return -1;
      }
      static dav_write_dir_entry_fn write_dir_entry = write_dir_entry_dummy;

      /* Points to a flag in the kernel interface module. If set to 1, at the end of
         the upcall the kernel dentries will be flushed. */
      static int flush_dummy;
      static int *flush = &flush_dummy;

      /* Whether to create debug messages. */
      static int debug;

      /* Buffer for xml_cdata callback. */
      static char *xml_data = NULL;

      /* Private function prototypes and inline functions */
      /*==================================================*/

      /* Node operations. */

      static void add_node(dav_node *parent, dav_props *props);

      static void add_to_changed(dav_node *node);

      static inline void attr_from_cache_file(dav_node *node) {

          struct stat st;
          if (node->cache_path == NULL || stat(node->cache_path, &st) != 0)
              return;
          off_t old_size = node->size;
          node->size = st.st_size;
          cache_size += node->size - old_size;
          node->atime = (st.st_atime > node->atime) ? st.st_atime : node->atime;
          node->mtime = (st.st_mtime > node->mtime) ? st.st_mtime : node->mtime;
      }

      static void backup_node(dav_node *orig);

      static void clean_tree(dav_node *node, int upload);

      static void delete_node(dav_node *node);

      static void delete_tree(dav_node *node);

      static int move_dir(dav_node *src, dav_node *dst, dav_node *dst_parent,
                          const char *dst_name);

      static int move_dirty(dav_node *src, dav_node *dst, dav_node *dst_parent,
                            const char *dst_name);

      static int move_reg(dav_node *src, dav_node *dst, dav_node *dst_parent,
                          const char *dst_name);

      static dav_node *new_node(dav_node *parent, mode_t mode);

      static void remove_from_changed(dav_node *node);

      static void remove_from_table(dav_node *node);

      static void remove_from_tree(dav_node *node);

      static void remove_node(dav_node *node);

      static inline void set_upload_time(dav_node *node) {

          dav_node_list_item *item = changed;
          while (item != NULL && item->node != node)
              item = item->next;
          if (item != NULL)
              item->save_at = time(NULL) + delay_upload;
      }

      static int update_directory(dav_node *dir, time_t refresh);

      static int update_node(dav_node *node, dav_props *props);

      static void update_path(dav_node *node, const char *src_path,
                              const char *dst_path);

      /* Get information about node. */

      static int exists(const dav_node *node);

      static inline dav_node *get_child(const dav_node *parent, const char *name) {

          dav_node *node = parent->childs;
          while (node != NULL && strcmp(name, node->name) != 0)
              node = node->next;
          return node;
      }

      static dav_handle *get_file_handle(dav_node * node, int fd, int accmode,
                                         pid_t pid, pid_t pgid);

      static int has_permission(const dav_node *node, uid_t uid, int how);

      static inline int is_backup(const dav_node *node) {

          return (node == backup || node->parent == backup);
      }

      static int is_busy(const dav_node *node);

      static inline int is_cached(dav_node *node) {

          return (S_ISREG(node->mode) && node->cache_path != NULL);
      }

      static inline int is_created(const dav_node *node) {

          return (S_ISREG(node->mode) && node->cache_path != NULL
                  && !node->remote_exists && node->parent != NULL
                  && node->parent != backup);
      }

      static inline int is_dir(const dav_node *node) {

          return S_ISDIR(node->mode);
      }

      static inline int is_dirty(const dav_node *node) {

          return (S_ISREG(node->mode) && node->dirty);
      }

      static inline int is_locked(const dav_node *node) {

          return (S_ISREG(node->mode) && node->lock_expire != 0);
      }

      static inline int is_open(const dav_node *node) {

          return (node->handles != NULL);
      }

      static inline int is_open_write(const dav_node *node) {

          dav_handle *fh = node->handles;
          while (fh != NULL) {
              if (fh->flags == O_RDWR || fh->flags == O_WRONLY)
                  return 1;
              fh = fh->next;
          }
          return 0;
      }

      static inline int is_reg(const dav_node *node) {

          return S_ISREG(node->mode);
      }

      static int is_valid(const dav_node *node);

      /* Cache file functions. */

      static void close_fh(dav_node *node, dav_handle *fh);

      static int create_cache_file(dav_node *node);

      static int create_dir_cache_file(dav_node *node);

      static inline void delete_cache_file(dav_node *node) {

          if (node->cache_path != NULL) {
              remove(node->cache_path);
              free(node->cache_path);
              node->cache_path = NULL;
              node->dirty = 0;
              if (is_reg(node))
                  cache_size -= node->size;
          }
      }

      static inline void set_cache_file_times(dav_node *node) {

          if (node->cache_path == NULL)
              return;
          struct utimbuf t;
          t.actime = node->atime;
          t.modtime = node->mtime;
          utime(node->cache_path, &t);
      }

      static int open_file(int *fd, dav_node *node, int flags, pid_t pid, pid_t pgid,
                           uid_t uid);

      static int update_cache_file(dav_node *node);

      /* Permanent cache maintenance. */

      static void check_cache_dir(const char *dir, const char *host,
                                  const char *path, const char *mpoint);

      static void clean_cache(void);
      static void parse_index(void);

      static void resize_cache(void);

      static int write_node(dav_node *node, FILE *file, const char *indent);

      static int xml_cdata(void *userdata, int state, const char *cdata, size_t len);

      static int xml_end_backup(void *userdata, int state, const char *nspace,
                                const char *name);

      static int xml_end_date(void *userdata, int state, const char *nspace,
                              const char *name);

      static int xml_end_decimal(void *userdata, int state, const char *nspace,
                                 const char *name);

      static int xml_end_dir(void *userdata, int state, const char *nspace,
                             const char *name);

      static int xml_end_mode(void *userdata, int state, const char *nspace,
                              const char *name);

      static int xml_end_reg(void *userdata, int state, const char *nspace,
                             const char *name);

      static int xml_end_root(void *userdata, int state, const char *nspace,
                             const char *name);

      static int xml_end_size(void *userdata, int state, const char *nspace,
                              const char *name);

      static int xml_end_string(void *userdata, int state, const char *nspace,
                                const char *name);

      static int xml_end_string_old(void *userdata, int state, const char *nspace,
                                    const char *name);

      static int xml_start_backup(void *userdata, int parent, const char *nspace,
                                  const char *name, const char **atts);

      static int xml_start_date(void *userdata, int parent, const char *nspace,
                                const char *name, const char **atts);

      static int xml_start_decimal(void *userdata, int parent, const char *nspace,
                                   const char *name, const char **atts);

      static int xml_start_dir(void *userdata, int parent, const char *nspace,
                               const char *name, const char **atts);

      static int xml_start_mode(void *userdata, int parent, const char *nspace,
                                const char *name, const char **atts);

      static int xml_start_reg(void *userdata, int parent, const char *nspace,
                               const char *name, const char **atts);

      static int xml_start_root(void *userdata, int parent, const char *nspace,
                                const char *name, const char **atts);

      static int xml_start_size(void *userdata, int parent, const char *nspace,
                                   const char *name, const char **atts);

      static int xml_start_string(void *userdata, int parent, const char *nspace,
                                  const char *name, const char **atts);

      /* Auxiliary. */

      static size_t test_alignment();

      /* Public functions */
      /*==================*/

      void dav_init_cache(uid_t uid, gid_t gid, mode_t file_mode, mode_t dir_mode,
                          mode_t f_umask, mode_t d_umask, size_t hash_table_sz,
                          time_t dir_rf, time_t file_rf, int delay_upl, int gui_opt,
                          time_t dir_rt, time_t dir_max_rt, time_t lock_rf,
                          size_t cache_sz, const char *tl_cache_dir,
                          const char *backup_dir, const char *host, const char *path,
                          const char *mpoint, int dbg) {

          debug = dbg;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Initializing cache");

          alignment = test_alignment();
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Alignment of dav_node: %i",
                     alignment);

          default_uid = uid;
          default_gid = gid;

          default_file_mode = file_mode;
          default_dir_mode = dir_mode;
          file_umask = f_umask;
          dir_umask = d_umask;

          table_size = hash_table_sz;
          table = ne_calloc(sizeof(*table) * table_size);

          dir_refresh = dir_rf;
          file_refresh = file_rf;
          delay_upload = delay_upl;
          gui_optimize = gui_opt;
          retry = dir_refresh;
          min_retry = dir_rt;
          max_retry = dir_max_rt;
          lock_refresh = lock_rf;

          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Checking cache directory");
          max_cache_size = cache_sz * 0x100000;
          check_cache_dir(tl_cache_dir, host, path, mpoint);
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  %s", cache_dir);

          root = new_node(NULL, default_dir_mode);
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Reading stored cache data");
          parse_index();
          root->name = ne_strdup("");
          root->path = dav_conv_to_server_enc(path);
          root->mode = default_dir_mode;

          if (backup == NULL)
              backup = new_node(root, S_IFDIR | S_IRWXU);
          backup->name = ne_strdup(backup_dir);
          backup->mode = S_IFDIR | S_IRWXU;

          clean_cache();

          int ret = update_directory(root, 0);
          if (ret == EAGAIN) {
              root->utime = 0;
              ret = update_directory(root, 0);
          }
          if (ret == EAGAIN) {
              error(0, 0, _("connection timed out two times;\n"
                            "trying one last time"));
              root->utime = 0;
              ret = update_directory(root, 0);
              if (ret == 0)
                  printf(_("Last try succeeded.\n"));
          }
          if (ret == EAGAIN) {
              error(0, 0, _("server temporarily unreachable;\n"
                            "mounting anyway"));
          } else if (ret != 0) {
              error(EXIT_FAILURE, 0, _("Mounting failed.\n%s"),
                    dav_get_webdav_error());
          }
      }

      void dav_close_cache(int got_sigterm) {

          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Closing cache");

          write_dir_entry = &write_dir_entry_dummy;
          flush = &flush_dummy;

          clean_tree(root, !got_sigterm);

          char *new_index = ne_concat(cache_dir, "/", DAV_INDEX, ".new", NULL);
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Creating index %s.",
                     new_index);
          FILE *new_file = fopen(new_index, "w");
          if (new_file != NULL) {

              int ret = fprintf(new_file,
                                "<?xml version=\&quot;1.0\&quot; encoding=\&quot;utf-8\&quot; ?>\n");
              if (ret >= 0)
                  ret = write_node(root, new_file, "");

              fclose(new_file);

              if (ret >= 0) {
                  if (debug)
                      syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
                             "Replacing old index");
                  char *old_index = ne_concat(cache_dir, "/", DAV_INDEX, NULL);
                  if (rename(new_index, old_index) != 0)
                      syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR),
                             _("can't replace %s with %s"), old_index, new_index);
                  free(old_index);
              } else {
                  syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR),
                         _("error writing new index file %s"), new_index);
              }
          } else {
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR),
                     _("can't create new index file for %s"), cache_dir);
          }
          free(new_index);
      }

      size_t dav_register_kernel_interface(dav_write_dir_entry_fn write_fn,
                                           int *flush_flag, unsigned int *blksize) {

          if (write_fn != NULL)
              write_dir_entry = write_fn;

          if (flush_flag != NULL)
              flush = flush_flag;

          if (blksize != NULL) {
              struct stat st;
              if (stat(cache_dir, &st) == 0) {
                  *blksize = st.st_blksize;
              } else {
                  *blksize = 4096;
              }
          }

          return alignment;
      }

      int dav_tidy_cache(void) {

          if (debug) {
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
                     "tidy: %i of %i nodes changed", nchanged, nnodes);
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "cache-size: %llu MiBytes.",
                     (cache_size + 0x80000) / 0x100000);
          }

          if (cache_size > max_cache_size)
              resize_cache();

          static dav_node_list_item *item = NULL;

          dav_node_list_item *next_item = changed;
          while (next_item && next_item != item)
              next_item = next_item->next;
          if (!next_item) {
              item = changed;
              if (!item)
                  return 0;
          }
          next_item = item->next;
          dav_node *node = item->node;

          if ((is_dirty(node) || is_created(node)) && !is_open_write(node)
                  && !is_backup(node) && item->save_at != 0
                  && item-> save_at <= time(NULL)) {
              int set_execute = -1;
              if (is_created(node) && node->mode & (S_IXUSR | S_IXGRP | S_IXOTH))
                  set_execute = 1;
              int ret = dav_put(node->path, node->cache_path, &node->remote_exists,
                                &node->lock_expire, &node->etag, &node->smtime,
                                &node->mime_type, set_execute);
              if (ret == 0) {
                  if (debug)
                      syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
                             "tidy: %s", node->path);
                  node->utime = time(NULL);
                  node->dirty = 0;
                  if (dav_unlock(node->path, &node->lock_expire) == 0)
                      remove_from_changed(node);
              } else if (ret == EACCES || ret == EINVAL || ret == ENOENT
                            || ret == EPERM || ret == ENOSPC || ret == EEXIST) {
                  if (debug)
                      syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
                             "tidy: failed %s", node->path);
                  dav_unlock(node->path, &node->lock_expire);
                  delete_cache_file(node->parent);
                  node->parent->utime = 0;
                  remove_node(node);
                  *flush = 1;
              }
          } else if (is_locked(node) && !is_dirty(node) && !is_created(node)
                  && !is_open_write(node)) {
              if (dav_unlock(node->path, &node->lock_expire) == 0)
                  remove_from_changed(node);
          } else if (is_locked(node)
                  && node->lock_expire < (time(NULL) + lock_refresh)) {
              dav_lock_refresh(node->path, &node->lock_expire);
          }

          item = next_item;
          if (item)
              return 1;

          item = changed;
          return 0;
      }

      /* Upcalls from the kernel. */

      int dav_access(dav_node *node, uid_t uid, int how) {

          if (!is_valid(node))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "access %s", node->path);
          if (!has_permission(node, uid, how))
              return EACCES;

          return 0;
      }

      int dav_close(dav_node *node, int fd, int flags, pid_t pid, pid_t pgid) {

          if (!exists(node))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), " close %s", node->path);

          dav_handle *fh = get_file_handle(node, fd, flags & O_ACCMODE, pid, pgid);
          if (fh == 0)
              return EBADF;

          close_fh(node, fh);

          if (node->parent == NULL && node != root && !is_open(node)) {
              remove_from_table(node);
              delete_node(node);
              *flush = 1;
              return 0;
          }

          if (is_dir(node)) {
              node->atime = time(NULL);
          } else {
              attr_from_cache_file(node);
              set_upload_time(node);
          }

          return 0;
      }

      int dav_create(dav_node **nodep, dav_node *parent, const char *name,
                     uid_t uid, mode_t mode) {

          if (!is_valid(parent))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "create %s%s", parent->path,
                     name);
          if (!is_dir(parent))
              return ENOTDIR;
          if ((parent == root && strcmp(name, backup->name) == 0) || parent == backup)
              return EINVAL;
          if (!has_permission(parent, uid, X_OK | W_OK))
              return EACCES;

          if (get_child(parent, name) != NULL)
              return EEXIST;

          struct passwd *pw = getpwuid(uid);
          if (pw == NULL)
              return EINVAL;

          char *name_conv = dav_conv_to_server_enc(name);
          char *path = ne_concat(parent->path, name_conv, NULL);
          free(name_conv);

          *nodep = new_node(parent, mode | S_IFREG);
          (*nodep)->path = path;
          (*nodep)->name = ne_strdup(name);
          (*nodep)->uid = uid;
          (*nodep)->gid = pw->pw_gid;
          int ret = create_cache_file(*nodep);
          if (ret == 0)
              ret = dav_lock(path, &(*nodep)->lock_expire, &(*nodep)->remote_exists);
          if (ret == 0) {
              (*nodep)->smtime = (*nodep)->mtime;
              if (!is_created(*nodep))
                  dav_head((*nodep)->path, &(*nodep)->etag, &(*nodep)->smtime, NULL,
                           &(*nodep)->mime_type);
              (*nodep)->utime = (*nodep)->smtime;
              delete_cache_file(parent);
              *flush = 1;
              parent->mtime = (*nodep)->mtime;
              parent->ctime = (*nodep)->mtime;
              add_to_changed(*nodep);
          } else {
              remove_from_tree(*nodep);
              remove_from_table(*nodep);
              delete_node(*nodep);
          }

          return ret;
      }

      int dav_getattr(dav_node *node, uid_t uid) {

          if (!is_valid(node))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "getattr %s", node->path);
          if (node->parent != NULL && !has_permission(node->parent, uid, X_OK | R_OK))
              return EACCES;

          if (is_dir(node)) {
              if (node->utime == 0)
                  update_directory(node, retry);
              if (create_dir_cache_file(node) != 0)
                  return EIO;
          } else if (is_open(node)) {
              attr_from_cache_file(node);
          }

          return 0;
      }

      int dav_getxattr(dav_node *node, const char *name, char *buf, size_t *size,
                      uid_t uid) {

          if (!is_valid(node))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "getattr %s", node->path);
          if (node->parent != NULL && !has_permission(node->parent, uid, X_OK | R_OK))
              return EACCES;
          if (strstr(name, "user.") != name || strcmp(name, "user.mime_type") != 0
                  || node->mime_type == NULL)
              return ENOTSUP;

          if (*size == 0) {
              *size = strlen(node->mime_type);
          } else if (strlen(node->mime_type) > *size) {
              return EOVERFLOW;
          } else {
              *size = strlen(node->mime_type);
              strncpy(buf, node->mime_type, *size);
          }

          return 0;
      }

      int dav_lookup(dav_node **nodep, dav_node *parent, const char *name,
                     uid_t uid) {

          if (!is_valid(parent))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "lookup %s%s", parent->path,
                     name);
          if (!is_dir(parent))
              return ENOTDIR;
          if (!has_permission(parent, uid, X_OK | R_OK))
              return EACCES;

          update_directory(parent, retry);
          *nodep = get_child(parent, name);
          if (*nodep == NULL)
              return ENOENT;

          if (is_dir(*nodep)) {
              if ((*nodep)->utime == 0)
                  update_directory(*nodep, retry);
              if (create_dir_cache_file(*nodep) != 0)
                  return EIO;
          } else if (is_open(*nodep)) {
              attr_from_cache_file(*nodep);
          }

          return 0;
      }

      int dav_mkdir(dav_node **nodep, dav_node *parent, const char *name, uid_t uid,
                    mode_t mode) {

          if (!is_valid(parent))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "mkdir %s%s", parent->path,
                     name);
          if (!is_dir(parent))
              return ENOTDIR;
          if (parent == backup)
              return EINVAL;
          if (!has_permission(parent, uid, X_OK | W_OK))
              return EACCES;

          update_directory(parent, retry);
          if (get_child(parent, name) != NULL)
              return EEXIST;

          struct passwd *pw = getpwuid(uid);
          if (pw == NULL)
              return EINVAL;

          char *name_conv = dav_conv_to_server_enc(name);
          char *path = ne_concat(parent->path, name_conv, "/", NULL);
          free(name_conv);
          int ret = dav_make_collection(path);

          if (ret == 0) {
              *nodep = new_node(parent, mode | S_IFDIR);
              (*nodep)->path = path;
              (*nodep)->name = ne_strdup(name);
              (*nodep)->uid = uid;
              (*nodep)->gid = pw->pw_gid;
              (*nodep)->smtime = (*nodep)->mtime;
              (*nodep)->utime = (*nodep)->mtime;
              delete_cache_file(parent);
              *flush = 1;
              parent->mtime = (*nodep)->mtime;
              parent->ctime = (*nodep)->mtime;
          } else {
              free(path);
          }

          return ret;
      }

      int dav_open(int *fd, dav_node *node, int flags, pid_t pid, pid_t pgid,
                   uid_t uid) {

          if (!is_valid(node))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "open %s", node->path);
          if (flags & (O_EXCL | O_CREAT))
              return EINVAL;

          int how;
          if ((O_ACCMODE & flags) == O_WRONLY) {
              how = W_OK;
          } else if ((O_ACCMODE & flags) == O_RDONLY) {
              how = R_OK;
          } else {
              how = R_OK | W_OK;
          }
          if (!has_permission(node, uid, how))
              return EACCES;

          if (is_dir(node)) {
              if ((how & W_OK) || (flags & O_TRUNC))
                  return EINVAL;
              update_directory(node, file_refresh);
              if (create_dir_cache_file(node) != 0)
                  return EIO;
              node->atime = time(NULL);
              return open_file(fd, node, flags & O_ACCMODE, pid, pgid, uid);
          }

          int ret = 0;
          if ((O_ACCMODE & flags) == O_RDONLY) {

              ret = update_cache_file(node);
              if (ret == 0)
                  ret = open_file(fd, node, flags & O_ACCMODE, pid, pgid, uid);

          } else {

              if (!is_locked(node) && !is_backup(node))
                  ret = dav_lock(node->path, &node->lock_expire,
                                 &node->remote_exists);

              if (ret == 0 && (flags & O_TRUNC)) {
                  ret = create_cache_file(node);
                  if (ret == 0) {
                      ret = open_file(fd, node,
                                      flags & (O_ACCMODE | O_TRUNC | O_APPEND),
                                      pid, pgid, uid);
                  }
              } else if (ret == 0) {
                  ret = update_cache_file(node);
                  if (ret == 0)
                      ret = open_file(fd, node, flags & (O_ACCMODE | O_APPEND),
                                      pid, pgid, uid);
              }

              if (ret == 0)
                  add_to_changed(node);
          }

          return ret;
      }

      int dav_read(ssize_t *len, dav_node * node, int fd, char *buf, size_t size,
                   off_t offset) {

          if (!exists(node))
              return ENOENT;

          dav_handle *fh = get_file_handle(node, fd, 0, 0, 0);
          if (fh == NULL)
              return EBADF;
          if (fh->flags == O_WRONLY)
              return EINVAL;

          *len = pread(fd, buf, size, offset);
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read %i", *len);
          if (*len < 0)
              return errno;

          if (*len < size)
              memset(buf + *len, '\0', size - *len);

          return 0;
      }

      int dav_remove(dav_node *parent, const char *name, uid_t uid) {

          if (!is_valid(parent))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "remove %s%s", parent->path,
                     name);
          if (!is_dir(parent))
              return ENOTDIR;
          if (!has_permission(parent, uid, X_OK | W_OK))
              return EACCES;

          update_directory(parent, retry);
          dav_node *node = get_child(parent, name);
          if (node == NULL) {
              delete_cache_file(parent);
              parent->utime = 0;
              *flush = 1;
              return ENOENT;
          }
          if (is_dir(node))
              return EISDIR;

          int ret = 0;
          if (is_created(node)) {
              if (is_locked(node))
                  ret = dav_unlock(node->path, &node->lock_expire);
          } else if (!is_backup(node)) {
              ret = dav_delete(node->path, &node->lock_expire);
              if (ret == ENOENT)
                  ret = 0;
          }
          if (ret != 0)
              return ret;

          remove_from_tree(node);
          remove_from_changed(node);
          if (is_open(node)) {
              node->parent = NULL;
          } else {
              remove_from_table(node);
              delete_node(node);
          }
          delete_cache_file(parent);
          parent->mtime = time(NULL);
          parent->ctime = parent->mtime;
          *flush = 1;

          return 0;
      }

      int dav_rename(dav_node *src_parent, const char *src_name,
                     dav_node *dst_parent, const char *dst_name, uid_t uid) {

          if (!is_valid(src_parent) || !is_valid(dst_parent))
              return ENOENT;
          if (debug) {
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "rename %s%s",
                     src_parent->path, src_name);
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  into %s%s",
                     dst_parent->path, dst_name);
          }
          if (!is_dir(src_parent) || !is_dir(dst_parent))
              return ENOTDIR;
          if (is_backup(dst_parent))
              return EINVAL;
          if (!has_permission(src_parent, uid, X_OK | W_OK)
                  || !has_permission(dst_parent, uid, X_OK | W_OK))
              return EACCES;

          update_directory(src_parent, retry);
          dav_node *src = get_child(src_parent, src_name);
          dav_node *dst = get_child(dst_parent, dst_name);
          if (src == NULL) {
              delete_cache_file(src_parent);
              src_parent->utime = 0;
              *flush = 1;
              return ENOENT;
          }
          if (src == backup || (dst != NULL && is_backup(dst)))
              return EINVAL;

          int ret;
          if (is_dir(src)) {
              ret = move_dir(src, dst, dst_parent, dst_name);
          } else {
              if (is_created(src) || is_backup(src)) {
                  ret = move_dirty(src, dst, dst_parent, dst_name);
              } else {
                  ret = move_reg(src, dst, dst_parent, dst_name);
              }
          }

          if (ret == 0) {
              if (src_parent != dst_parent) {
                  remove_from_tree(src);
                  delete_cache_file(src_parent);
                  src_parent->mtime = time(NULL);
                  src_parent->ctime = src_parent->mtime;
                  src->parent = dst_parent;
                  src->next = dst_parent->childs;
                  dst_parent->childs = src;
                  if (is_dir(src))
                      ++src->parent->nref;
              }
              delete_cache_file(dst_parent);
              dst_parent->mtime = time(NULL);
              dst_parent->ctime = dst_parent->mtime;
              *flush = 1;
          }

          return ret;
      }

      int dav_rmdir(dav_node *parent, const char *name, uid_t uid) {

          if (!is_valid(parent))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "rmdir %s%s", parent->path,
                     name);
          if (!is_dir(parent))
              return ENOTDIR;
          if (!has_permission(parent, uid, X_OK | W_OK))
              return EACCES;

          update_directory(parent, retry);
          dav_node *node = get_child(parent, name);
          if (node == NULL) {
              delete_cache_file(parent);
              parent->utime = 0;
              *flush = 1;
              return ENOENT;
          }
          if (node == backup)
              return EINVAL;
          if (!is_dir(node))
              return ENOTDIR;
          if (node->childs != 0)
              return ENOTEMPTY;

          int ret = dav_delete_dir(node->path);
          if (ret == 0) {
              remove_node(node);
              delete_cache_file(parent);
              parent->mtime = time(NULL);
              parent->ctime = parent->mtime;
              *flush = 1;
          }

          return ret;
      }

      int dav_root(dav_node **nodep, uid_t uid) {

          if (uid != 0)
              return EPERM;
          *nodep = root;
          return 0;
      }

      int dav_setattr(dav_node *node, uid_t uid, int sm, mode_t mode,
                      int so, uid_t owner, int sg, gid_t gid, int sat, time_t atime,
                      int smt, time_t mtime, int ssz, off_t size) {

          if (!is_valid(node))
              return ENOENT;
          if (debug)
              syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "setattr %s", node->path);
          if (node->parent != NULL && !has_permission(node->parent, uid, X_OK))
              return EACCES;

          if (so) {
              if (debug)
                  syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  set owner to %i",
                         owner);
              if (node == backup)
                  return EINVAL;
              if (uid != 0 && (uid != owner || uid != node->uid))
                  return EPERM;
              if (getpwuid(owner) == NULL)
                  return EINVAL;
          }

          if (sg) {
              if (debug)
                  syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  set group to %i",
                         gid);
              if (node == backup)
                  return EINVAL;
              if (uid != node->uid && uid != 0)
                  return EPERM;
              if (uid != 0) {
                  struct passwd *pw = getpwuid(uid);
                  if (!pw)
                      return EPERM;
                  if (pw->pw_gid != gid) {
                      struct group *gr = getgrgid(gid);
                      if (!gr)
                          return EPERM;
                      char **member = gr->gr_mem;
                      while (*member != NULL && strcmp(*member, pw->pw_name) != 0)
                          ++member;
                      if (*member == NULL)
                          return EPERM;
                  }
              }
              if (getgrgid(gid) == NULL)
                  return EINVAL;
          }

          if (sm) {
              if (debug)
                  syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  set mode to %o",
                         mode);
              if (node == backup)
                  return EINVAL;
              if (uid != node->uid && uid != 0)
                  return EPERM;
              if (is_dir(node) && (mode & dir_umask))
                  return EINVAL;
              if (is_reg(node) && (mode & file_umask))
                  return EINVAL;
          }

          if (sat || smt) {
              if (debug)
                  syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  set times");
              if (uid != node->uid && uid != 0 && !has_permission(node, uid, W_OK))
                  return EPERM;
          }

          if (ssz) {
              if (debug)
                  syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  set size");
              if (is_dir(node))
                  return EINVAL;
              if (uid != node->uid && uid != 0 && !has_permission(node, uid, W_OK))
                  return EPERM;
              int ret = 0;
              if (!is_locked(node) && !is_backup(node))
                  ret = dav_lock(node->path, &node->lock_expire,
                                 &node->remote_exists);
              if (ret == 0 && size == 0) {
                  ret = create_cache_file(node);
              } else if (ret == 0) {
                  ret = update_cache_file(node);
              }
              if (ret == 0)
                  ret = truncate(node->cache_path, size);
              if (ret != 0)
                  return ret;
              attr_from_cache_file(node);
              node->dirty = 1;
              add_to_changed(node);
          }

          if (so)
              node->uid = owner;

          if (sg)
              node->gid = gid;

      (sm) {(!is_backup(node) !is_created(node)) {_execute = -1;((node-(S_IXUSR | S_IXGRP | S_IXOTH))!(mode (S_IXUSR | S_IXGRP | S_IXOTH)))_execute = 0;(!(node-(S_IXUSR | S_IXGRP | S_IXOTH))(mode (S_IXUSR | S_IXGRP | S_IXOTH)))_execute = 1;(set_execute != -1) {(is_dirty(node) !is_locked(node)) {_t smtime = 0;*etag = NULL;_head(node-);(etag != NULL != NULL(etag, node-) != 0)(smtime != 0 )(etag != NULL)(etag);(err klzzwxh:10000= 0klzzwxh:10001klzzwxh:10612klzzwxh:10436klzzwxh:10437klzzwxh:10438klzzwxh:10439klzzwxh:10440klzzwxh:10441klzzwxh:10442klzzwxh:10443klzzwxh:10444klzzwxh:10445klzzwxh:10446klzzwxh:10447klzzwxh:10448klzzwxh:10449klzzwxh:10450klzzwxh:10451klzzwxh:10452klzzwxh:10453klzzwxh:10454klzzwxh:10455klzzwxh:10456klzzwxh:10457klzzwxh:10458 return EIO;klzzwxh:10613klzzwxh:10459klzzwxh:10460klzzwxh:10461klzzwxh:10462klzzwxh:10463klzzwxh:10464klzzwxh:10465klzzwxh:10466klzzwxh:10467klzzwxh:10468klzzwxh:10469klzzwxh:10470klzzwxh:10471klzzwxh:10472klzzwxh:10473 klzzwxh:10002klzzwxh:10614klzzwxh:10474klzzwxh:10475klzzwxh:10476klzzwxh:10477klzzwxh:10478klzzwxh:10479klzzwxh:10480klzzwxh:10481klzzwxh:10482klzzwxh:10483klzzwxh:10484klzzwxh:10485klzzwxh:10486klzzwxh:10487klzzwxh:10488 davklzzwxh:10003setklzzwxh:10004executeklzzwxh:10005node-klzzwxh:10489path, setklzzwxh:10006executeklzzwxh:10007;klzzwxh:10615klzzwxh:10490klzzwxh:10491klzzwxh:10492klzzwxh:10493klzzwxh:10494klzzwxh:10495klzzwxh:10496klzzwxh:10497klzzwxh:10498klzzwxh:10499klzzwxh:10500klzzwxh:10501klzzwxh:10502klzzwxh:10503klzzwxh:10504 if klzzwxh:10008isklzzwxh:10009dirtyklzzwxh:10010nodeklzzwxh:10011klzzwxh:10012klzzwxh:10616klzzwxh:10505klzzwxh:10506klzzwxh:10507klzzwxh:10508klzzwxh:10509klzzwxh:10510klzzwxh:10511klzzwxh:10512klzzwxh:10513klzzwxh:10514klzzwxh:10515klzzwxh:10516klzzwxh:10517klzzwxh:10518klzzwxh:10519klzzwxh:10520klzzwxh:10521klzzwxh:10522klzzwxh:10523 davklzzwxh:10013headklzzwxh:10014node-klzzwxh:10524path, klzzwxh:10525node-klzzwxh:10526etag, klzzwxh:10527node-klzzwxh:10528smtime, NULL,klzzwxh:10617klzzwxh:10529klzzwxh:10530klzzwxh:10531klzzwxh:10532klzzwxh:10533klzzwxh:10534klzzwxh:10535klzzwxh:10536klzzwxh:10537klzzwxh:10538klzzwxh:10539klzzwxh:10540klzzwxh:10541klzzwxh:10542klzzwxh:10543klzzwxh:10544klzzwxh:10545klzzwxh:10546klzzwxh:10547klzzwxh:10548klzzwxh:10549klzzwxh:10550klzzwxh:10551klzzwxh:10552klzzwxh:10553klzzwxh:10554klzzwxh:10555klzzwxh:10556 klzzwxh:10557node-klzzwxh:10558mimeklzzwxh:10015typeklzzwxh:10016;klzzwxh:10618klzzwxh:10559klzzwxh:10560klzzwxh:10561klzzwxh:10562klzzwxh:10563klzzwxh:10564klzzwxh:10565klzzwxh:10566klzzwxh:10567klzzwxh:10568klzzwxh:10569 klzzwxh:10017klzzwxh:10619klzzwxh:10570klzzwxh:10571klzzwxh:10572klzzwxh:10573klzzwxh:10574klzzwxh:10575klzzwxh:10576 klzzwxh:10018klzzwxh:10620klzzwxh:10577klzzwxh:10578klzzwxh:10579klzzwxh:10580klzzwxh:10581klzzwxh:10582klzzwxh:10583 node-klzzwxh:10584mode = klzzwxh:10019node-klzzwxh:10585mode klzzwxh:10586 ~DAVklzzwxh:10020Aklzzwxh:10021MASKklzzwxh:10022 | mode;klzzwxh:10621klzzwxh:10587klzzwxh:10588klzzwxh:10589 klzzwxh:10023

      klzzwxh:10624klzzwxh:10625klzzwxh:10626 if klzzwxh:10622satklzzwxh:10623klzzwxh:10635klzzwxh:10627klzzwxh:10628klzzwxh:10629klzzwxh:10630klzzwxh:10631klzzwxh:10632klzzwxh:10633 node-klzzwxh:10634atime = atime;

      klzzwxh:10638klzzwxh:10639klzzwxh:10640 if klzzwxh:10636smtklzzwxh:10637klzzwxh:10649klzzwxh:10641klzzwxh:10642klzzwxh:10643klzzwxh:10644klzzwxh:10645klzzwxh:10646klzzwxh:10647 node-klzzwxh:10648mtime = mtime;

      klzzwxh:10653klzzwxh:10654klzzwxh:10655 node-klzzwxh:10656ctime = timeklzzwxh:10650NULLklzzwxh:10651;klzzwxh:10660klzzwxh:10657klzzwxh:10658klzzwxh:10659 return 0;klzzwxh:10661klzzwxh:10652

      davklzzwxh:10662stat davklzzwxh:10663statfsklzzwxh:10664voidklzzwxh:10665 klzzwxh:10666

      klzzwxh:10681klzzwxh:10682klzzwxh:10683 davklzzwxh:10667stat st;klzzwxh:10729klzzwxh:10684klzzwxh:10685klzzwxh:10686 st.blocks = 0x65B9AA;klzzwxh:10730klzzwxh:10687klzzwxh:10688klzzwxh:10689 st.bfree = 0x32DCD5;klzzwxh:10731klzzwxh:10690klzzwxh:10691klzzwxh:10692 st.bavail = 0x32DCD5;klzzwxh:10732klzzwxh:10693klzzwxh:10694klzzwxh:10695 st.files = nnodes;klzzwxh:10733klzzwxh:10696klzzwxh:10697klzzwxh:10698 st.ffree = 666666;klzzwxh:10734klzzwxh:10699klzzwxh:10700klzzwxh:10701 struct stat cacheklzzwxh:10668st;klzzwxh:10735klzzwxh:10702klzzwxh:10703klzzwxh:10704 if klzzwxh:10669statklzzwxh:10670cacheklzzwxh:10671dir, klzzwxh:10705cacheklzzwxh:10672stklzzwxh:10673 == 0klzzwxh:10674 klzzwxh:10675klzzwxh:10736klzzwxh:10706klzzwxh:10707klzzwxh:10708klzzwxh:10709klzzwxh:10710klzzwxh:10711klzzwxh:10712 st.bsize = cacheklzzwxh:10676st.stklzzwxh:10677blksize;klzzwxh:10737klzzwxh:10713klzzwxh:10714klzzwxh:10715 klzzwxh:10678 else klzzwxh:10679klzzwxh:10738klzzwxh:10716klzzwxh:10717klzzwxh:10718klzzwxh:10719klzzwxh:10720klzzwxh:10721klzzwxh:10722 st.bsize = 4096;klzzwxh:10739klzzwxh:10723klzzwxh:10724klzzwxh:10725 klzzwxh:10680klzzwxh:10740klzzwxh:10726klzzwxh:10727klzzwxh:10728 st.namelen = 256;

      klzzwxh:10751klzzwxh:10752klzzwxh:10753 offklzzwxh:10741t used = 0;klzzwxh:10791klzzwxh:10754klzzwxh:10755klzzwxh:10756 if klzzwxh:10742davklzzwxh:10743quotaklzzwxh:10744root-klzzwxh:10757path, klzzwxh:10758st.blocks, klzzwxh:10759usedklzzwxh:10745 == 0klzzwxh:10746 klzzwxh:10747klzzwxh:10792klzzwxh:10760klzzwxh:10761klzzwxh:10762klzzwxh:10763klzzwxh:10764klzzwxh:10765klzzwxh:10766 st.blocks /= st.bsize;klzzwxh:10793klzzwxh:10767klzzwxh:10768klzzwxh:10769klzzwxh:10770klzzwxh:10771klzzwxh:10772klzzwxh:10773 st.bfree = st.blocks - klzzwxh:10748used / st.bsizeklzzwxh:10749 - 1;klzzwxh:10794klzzwxh:10774klzzwxh:10775klzzwxh:10776klzzwxh:10777klzzwxh:10778klzzwxh:10779klzzwxh:10780 st.bavail = st.bfree;klzzwxh:10795klzzwxh:10781klzzwxh:10782klzzwxh:10783klzzwxh:10784klzzwxh:10785klzzwxh:10786klzzwxh:10787 st.ffree = st.bfree;klzzwxh:10796klzzwxh:10788klzzwxh:10789klzzwxh:10790 klzzwxh:10750

      klzzwxh:10798klzzwxh:10799klzzwxh:10800 return st;klzzwxh:10801klzzwxh:10797

      int davklzzwxh:10802syncklzzwxh:10803davklzzwxh:10804node klzzwxh:10805nodeklzzwxh:10806 klzzwxh:10807

      klzzwxh:10813klzzwxh:10814klzzwxh:10815 if klzzwxh:10808klzzwxh:10809existsklzzwxh:10810nodeklzzwxh:10811klzzwxh:10812klzzwxh:10823klzzwxh:10816klzzwxh:10817klzzwxh:10818klzzwxh:10819klzzwxh:10820klzzwxh:10821klzzwxh:10822 return ENOENT;

      klzzwxh:10837klzzwxh:10838klzzwxh:10839 davklzzwxh:10824handle klzzwxh:10825fh = node-klzzwxh:10840handles;klzzwxh:10875klzzwxh:10841klzzwxh:10842klzzwxh:10843 while klzzwxh:10826fh klzzwxh:10827= NULLklzzwxh:10828 klzzwxh:10829klzzwxh:10876klzzwxh:10844klzzwxh:10845klzzwxh:10846klzzwxh:10847klzzwxh:10848klzzwxh:10849klzzwxh:10850 if klzzwxh:10830fh-klzzwxh:10851flags klzzwxh:10831= Oklzzwxh:10832RDONLYklzzwxh:10833klzzwxh:10877klzzwxh:10852klzzwxh:10853klzzwxh:10854klzzwxh:10855klzzwxh:10856klzzwxh:10857klzzwxh:10858klzzwxh:10859klzzwxh:10860klzzwxh:10861klzzwxh:10862 fsyncklzzwxh:10834fh-klzzwxh:10863fdklzzwxh:10835;klzzwxh:10878klzzwxh:10864klzzwxh:10865klzzwxh:10866klzzwxh:10867klzzwxh:10868klzzwxh:10869klzzwxh:10870 fh = fh-klzzwxh:10871next;klzzwxh:10879klzzwxh:10872klzzwxh:10873klzzwxh:10874 klzzwxh:10836

      klzzwxh:10881klzzwxh:10882klzzwxh:10883 return 0;klzzwxh:10884klzzwxh:10880

      int davklzzwxh:10885writeklzzwxh:10886sizeklzzwxh:10887t klzzwxh:10888written, davklzzwxh:10889node klzzwxh:10890 node, int fd, char klzzwxh:10891buf, sizeklzzwxh:10892t size,klzzwxh:10909klzzwxh:10896klzzwxh:10897klzzwxh:10898klzzwxh:10899klzzwxh:10900klzzwxh:10901klzzwxh:10902klzzwxh:10903klzzwxh:10904klzzwxh:10905klzzwxh:10906klzzwxh:10907klzzwxh:10908 offklzzwxh:10893t offsetklzzwxh:10894 klzzwxh:10895

      klzzwxh:10915klzzwxh:10916klzzwxh:10917 if klzzwxh:10910klzzwxh:10911existsklzzwxh:10912nodeklzzwxh:10913klzzwxh:10914klzzwxh:10925klzzwxh:10918klzzwxh:10919klzzwxh:10920klzzwxh:10921klzzwxh:10922klzzwxh:10923klzzwxh:10924 return ENOENT;

      klzzwxh:10937klzzwxh:10938klzzwxh:10939 davklzzwxh:10926handle klzzwxh:10927fh = getklzzwxh:10928fileklzzwxh:10929handleklzzwxh:10930node, fd, 0, 0, 0klzzwxh:10931;klzzwxh:10961klzzwxh:10940klzzwxh:10941klzzwxh:10942 if klzzwxh:10932fh == NULLklzzwxh:10933klzzwxh:10962klzzwxh:10943klzzwxh:10944klzzwxh:10945klzzwxh:10946klzzwxh:10947klzzwxh:10948klzzwxh:10949 return EBADF;klzzwxh:10963klzzwxh:10950klzzwxh:10951klzzwxh:10952 if klzzwxh:10934fh-klzzwxh:10953flags == Oklzzwxh:10935RDONLYklzzwxh:10936klzzwxh:10964klzzwxh:10954klzzwxh:10955klzzwxh:10956klzzwxh:10957klzzwxh:10958klzzwxh:10959klzzwxh:10960 return EINVAL;

      klzzwxh:10980klzzwxh:10981klzzwxh:10982 klzzwxh:10965written = 0;klzzwxh:11029klzzwxh:10983klzzwxh:10984klzzwxh:10985 ssizeklzzwxh:10966t n = 0;klzzwxh:11030klzzwxh:10986klzzwxh:10987klzzwxh:10988 while klzzwxh:10967klzzwxh:10968written klzzwxh:10989 size klzzwxh:10990klzzwxh:10991 n klzzwxh:10992= 0klzzwxh:10969 klzzwxh:10970klzzwxh:11031klzzwxh:10993klzzwxh:10994klzzwxh:10995klzzwxh:10996klzzwxh:10997klzzwxh:10998klzzwxh:10999 n = pwriteklzzwxh:10971fd, buf + klzzwxh:10972written, size - klzzwxh:10973written, offset + klzzwxh:10974writtenklzzwxh:10975;klzzwxh:11032klzzwxh:11000klzzwxh:11001klzzwxh:11002klzzwxh:11003klzzwxh:11004klzzwxh:11005klzzwxh:11006 if klzzwxh:10976n klzzwxh:11007 0klzzwxh:10977klzzwxh:11033klzzwxh:11008klzzwxh:11009klzzwxh:11010klzzwxh:11011klzzwxh:11012klzzwxh:11013klzzwxh:11014klzzwxh:11015klzzwxh:11016klzzwxh:11017klzzwxh:11018 return errno;klzzwxh:11034klzzwxh:11019klzzwxh:11020klzzwxh:11021klzzwxh:11022klzzwxh:11023klzzwxh:11024klzzwxh:11025 klzzwxh:10978written += n;klzzwxh:11035klzzwxh:11026klzzwxh:11027klzzwxh:11028 klzzwxh:10979

      klzzwxh:11047klzzwxh:11048klzzwxh:11049 if klzzwxh:11036debugklzzwxh:11037klzzwxh:11063klzzwxh:11050klzzwxh:11051klzzwxh:11052klzzwxh:11053klzzwxh:11054klzzwxh:11055klzzwxh:11056 syslogklzzwxh:11038LOGklzzwxh:11039MAKEPRIklzzwxh:11040LOGklzzwxh:11041DAEMON, LOGklzzwxh:11042DEBUGklzzwxh:11043, klzzwxh:11057klzzwxh:11058 written %iklzzwxh:11059, klzzwxh:11044writtenklzzwxh:11045;klzzwxh:11064klzzwxh:11060klzzwxh:11061klzzwxh:11062 return 0;klzzwxh:11065klzzwxh:11046

      /klzzwxh:11066 Private functions klzzwxh:11067/klzzwxh:11070/klzzwxh:11068===================klzzwxh:11069/

      /klzzwxh:11071 Node maintenance. klzzwxh:11072/

      /klzzwxh:11073 Creates a new node taking properties from props and adds it to theklzzwxh:11093klzzwxh:11083klzzwxh:11084 child list of parent and to the hash table.klzzwxh:11094klzzwxh:11085klzzwxh:11086 If props references directory backup,klzzwxh:11087 no node will be created.klzzwxh:11095klzzwxh:11088klzzwxh:11089 parent : The parent directory node for the new node.klzzwxh:11096klzzwxh:11090klzzwxh:11091 propsklzzwxh:11092 : Properties retrieved from the server. Will be freed. klzzwxh:11074/klzzwxh:11097static void addklzzwxh:11075nodeklzzwxh:11076davklzzwxh:11077node klzzwxh:11078parent, davklzzwxh:11079props klzzwxh:11080propsklzzwxh:11081 klzzwxh:11082

      klzzwxh:11108klzzwxh:11109klzzwxh:11110 if klzzwxh:11098parent == root klzzwxh:11111klzzwxh:11112 strcmpklzzwxh:11099props-klzzwxh:11113name, backup-klzzwxh:11114nameklzzwxh:11100 == 0klzzwxh:11101 klzzwxh:11102klzzwxh:11132klzzwxh:11115klzzwxh:11116klzzwxh:11117klzzwxh:11118klzzwxh:11119klzzwxh:11120klzzwxh:11121 davklzzwxh:11103deleteklzzwxh:11104propsklzzwxh:11105propsklzzwxh:11106;klzzwxh:11133klzzwxh:11122klzzwxh:11123klzzwxh:11124klzzwxh:11125klzzwxh:11126klzzwxh:11127klzzwxh:11128 return;klzzwxh:11134klzzwxh:11129klzzwxh:11130klzzwxh:11131 klzzwxh:11107

      klzzwxh:11137klzzwxh:11138klzzwxh:11139 davklzzwxh:11135node klzzwxh:11136node;

      klzzwxh:11186klzzwxh:11187klzzwxh:11188 if klzzwxh:11140props-klzzwxh:11189isklzzwxh:11141dirklzzwxh:11142 klzzwxh:11143klzzwxh:11314klzzwxh:11190klzzwxh:11191klzzwxh:11192klzzwxh:11193klzzwxh:11194klzzwxh:11195klzzwxh:11196 node = newklzzwxh:11144nodeklzzwxh:11145parent, defaultklzzwxh:11146dirklzzwxh:11147modeklzzwxh:11148;klzzwxh:11315klzzwxh:11197klzzwxh:11198klzzwxh:11199 klzzwxh:11149 else klzzwxh:11150klzzwxh:11316klzzwxh:11200klzzwxh:11201klzzwxh:11202klzzwxh:11203klzzwxh:11204klzzwxh:11205klzzwxh:11206 node = newklzzwxh:11151nodeklzzwxh:11152parent, defaultklzzwxh:11153fileklzzwxh:11154modeklzzwxh:11155;klzzwxh:11317klzzwxh:11207klzzwxh:11208klzzwxh:11209klzzwxh:11210klzzwxh:11211klzzwxh:11212klzzwxh:11213 node-klzzwxh:11214size = props-klzzwxh:11215size;klzzwxh:11318klzzwxh:11216klzzwxh:11217klzzwxh:11218klzzwxh:11219klzzwxh:11220klzzwxh:11221klzzwxh:11222 node-klzzwxh:11223remoteklzzwxh:11156exists = 1;klzzwxh:11319klzzwxh:11224klzzwxh:11225klzzwxh:11226klzzwxh:11227klzzwxh:11228klzzwxh:11229klzzwxh:11230 if klzzwxh:11157props-klzzwxh:11231isklzzwxh:11158exec == 1klzzwxh:11159 klzzwxh:11160klzzwxh:11320klzzwxh:11232klzzwxh:11233klzzwxh:11234klzzwxh:11235klzzwxh:11236klzzwxh:11237klzzwxh:11238klzzwxh:11239klzzwxh:11240klzzwxh:11241klzzwxh:11242 node-klzzwxh:11243mode |= klzzwxh:11161node-klzzwxh:11244mode klzzwxh:11245 Sklzzwxh:11162IRUSRklzzwxh:11163 ? Sklzzwxh:11164IXUSR : 0;klzzwxh:11321klzzwxh:11246klzzwxh:11247klzzwxh:11248klzzwxh:11249klzzwxh:11250klzzwxh:11251klzzwxh:11252klzzwxh:11253klzzwxh:11254klzzwxh:11255klzzwxh:11256 node-klzzwxh:11257mode |= klzzwxh:11165node-klzzwxh:11258mode klzzwxh:11259 Sklzzwxh:11166IRGRPklzzwxh:11167 ? Sklzzwxh:11168IXGRP : 0;klzzwxh:11322klzzwxh:11260klzzwxh:11261klzzwxh:11262klzzwxh:11263klzzwxh:11264klzzwxh:11265klzzwxh:11266klzzwxh:11267klzzwxh:11268klzzwxh:11269klzzwxh:11270 node-klzzwxh:11271mode |= klzzwxh:11169node-klzzwxh:11272mode klzzwxh:11273 Sklzzwxh:11170IROTHklzzwxh:11171 ? Sklzzwxh:11172IXOTH : 0;klzzwxh:11323klzzwxh:11274klzzwxh:11275klzzwxh:11276klzzwxh:11277klzzwxh:11278klzzwxh:11279klzzwxh:11280 klzzwxh:11173 else if klzzwxh:11174props-klzzwxh:11281isklzzwxh:11175exec == 0klzzwxh:11176 klzzwxh:11177klzzwxh:11324klzzwxh:11282klzzwxh:11283klzzwxh:11284klzzwxh:11285klzzwxh:11286klzzwxh:11287klzzwxh:11288klzzwxh:11289klzzwxh:11290klzzwxh:11291klzzwxh:11292 node-klzzwxh:11293mode klzzwxh:11294= ~klzzwxh:11178Sklzzwxh:11179IXUSR | Sklzzwxh:11180IXGRP | Sklzzwxh:11181IXOTHklzzwxh:11182;klzzwxh:11325klzzwxh:11295klzzwxh:11296klzzwxh:11297klzzwxh:11298klzzwxh:11299klzzwxh:11300klzzwxh:11301 klzzwxh:11183klzzwxh:11326klzzwxh:11302klzzwxh:11303klzzwxh:11304klzzwxh:11305klzzwxh:11306klzzwxh:11307klzzwxh:11308 node-klzzwxh:11309mode klzzwxh:11310= ~fileklzzwxh:11184umask;klzzwxh:11327klzzwxh:11311klzzwxh:11312klzzwxh:11313 klzzwxh:11185

      klzzwxh:11328klzzwxh:11329klzzwxh:11330 parent-klzzwxh:11331mtime = node-klzzwxh:11332mtime;klzzwxh:11338klzzwxh:11333klzzwxh:11334klzzwxh:11335 parent-klzzwxh:11336ctime = node-klzzwxh:11337mtime;

      klzzwxh:11347klzzwxh:11348klzzwxh:11349 node-klzzwxh:11350path = props-klzzwxh:11351path;klzzwxh:11410klzzwxh:11352klzzwxh:11353klzzwxh:11354 node-klzzwxh:11355name = props-klzzwxh:11356name;klzzwxh:11411klzzwxh:11357klzzwxh:11358klzzwxh:11359 node-klzzwxh:11360etag = props-klzzwxh:11361etag;klzzwxh:11412klzzwxh:11362klzzwxh:11363klzzwxh:11364 node-klzzwxh:11365smtime = props-klzzwxh:11366mtime;klzzwxh:11413klzzwxh:11367klzzwxh:11368klzzwxh:11369 if klzzwxh:11339node-klzzwxh:11370smtime klzzwxh:11371 0klzzwxh:11340klzzwxh:11414klzzwxh:11372klzzwxh:11373klzzwxh:11374klzzwxh:11375klzzwxh:11376klzzwxh:11377klzzwxh:11378 node-klzzwxh:11379mtime = node-klzzwxh:11380smtime;klzzwxh:11415klzzwxh:11381klzzwxh:11382klzzwxh:11383 if klzzwxh:11341props-klzzwxh:11384ctime klzzwxh:11385 0klzzwxh:11342 klzzwxh:11343klzzwxh:11416klzzwxh:11386klzzwxh:11387klzzwxh:11388klzzwxh:11389klzzwxh:11390klzzwxh:11391klzzwxh:11392 node-klzzwxh:11393ctime = props-klzzwxh:11394ctime;klzzwxh:11417klzzwxh:11395klzzwxh:11396klzzwxh:11397 klzzwxh:11344 else klzzwxh:11345klzzwxh:11418klzzwxh:11398klzzwxh:11399klzzwxh:11400klzzwxh:11401klzzwxh:11402klzzwxh:11403klzzwxh:11404 node-klzzwxh:11405ctime = node-klzzwxh:11406mtime;klzzwxh:11419klzzwxh:11407klzzwxh:11408klzzwxh:11409 klzzwxh:11346

      klzzwxh:11432klzzwxh:11433klzzwxh:11434 freeklzzwxh:11420propsklzzwxh:11421;klzzwxh:11448klzzwxh:11435klzzwxh:11436klzzwxh:11437 if klzzwxh:11422debugklzzwxh:11423klzzwxh:11449klzzwxh:11438klzzwxh:11439klzzwxh:11440klzzwxh:11441klzzwxh:11442klzzwxh:11443klzzwxh:11444 syslogklzzwxh:11424LOGklzzwxh:11425MAKEPRIklzzwxh:11426LOGklzzwxh:11427DAEMON, LOGklzzwxh:11428DEBUGklzzwxh:11429, klzzwxh:11445added %sklzzwxh:11446, node-klzzwxh:11447pathklzzwxh:11430;klzzwxh:11450klzzwxh:11431

      /klzzwxh:11451 Checks whether node is allready in the list of changed nodes. If notklzzwxh:11462klzzwxh:11460klzzwxh:11461 it will be appended at the end of the list. klzzwxh:11452/klzzwxh:11463static void addklzzwxh:11453toklzzwxh:11454changedklzzwxh:11455davklzzwxh:11456node klzzwxh:11457nodeklzzwxh:11458 klzzwxh:11459

      klzzwxh:11511klzzwxh:11512klzzwxh:11513 davklzzwxh:11464nodeklzzwxh:11465listklzzwxh:11466item klzzwxh:11467klzzwxh:11468chp = klzzwxh:11514changed;klzzwxh:11577klzzwxh:11515klzzwxh:11516klzzwxh:11517 while klzzwxh:11469klzzwxh:11470chpklzzwxh:11471 klzzwxh:11472klzzwxh:11578klzzwxh:11518klzzwxh:11519klzzwxh:11520klzzwxh:11521klzzwxh:11522klzzwxh:11523klzzwxh:11524 if klzzwxh:11473klzzwxh:11474klzzwxh:11475chpklzzwxh:11476-klzzwxh:11525node == nodeklzzwxh:11477klzzwxh:11579klzzwxh:11526klzzwxh:11527klzzwxh:11528klzzwxh:11529klzzwxh:11530klzzwxh:11531klzzwxh:11532klzzwxh:11533klzzwxh:11534klzzwxh:11535klzzwxh:11536 return;klzzwxh:11580klzzwxh:11537klzzwxh:11538klzzwxh:11539klzzwxh:11540klzzwxh:11541klzzwxh:11542klzzwxh:11543 chp = klzzwxh:11544klzzwxh:11478klzzwxh:11479chpklzzwxh:11480-klzzwxh:11545next;klzzwxh:11581klzzwxh:11546klzzwxh:11547klzzwxh:11548 klzzwxh:11481klzzwxh:11582klzzwxh:11549klzzwxh:11550klzzwxh:11551 klzzwxh:11482chp = klzzwxh:11483davklzzwxh:11484nodeklzzwxh:11485listklzzwxh:11486item klzzwxh:11487klzzwxh:11488 mallocklzzwxh:11489sizeofklzzwxh:11490klzzwxh:11491chpklzzwxh:11492klzzwxh:11493;klzzwxh:11583klzzwxh:11552klzzwxh:11553klzzwxh:11554 if klzzwxh:11494klzzwxh:11495klzzwxh:11496chpklzzwxh:11497klzzwxh:11584klzzwxh:11555klzzwxh:11556klzzwxh:11557klzzwxh:11558klzzwxh:11559klzzwxh:11560klzzwxh:11561 abortklzzwxh:11498klzzwxh:11499;klzzwxh:11585klzzwxh:11562klzzwxh:11563klzzwxh:11564 klzzwxh:11500klzzwxh:11501chpklzzwxh:11502-klzzwxh:11565node = node;klzzwxh:11586klzzwxh:11566klzzwxh:11567klzzwxh:11568 klzzwxh:11503klzzwxh:11504chpklzzwxh:11505-klzzwxh:11569next = NULL;klzzwxh:11587klzzwxh:11570klzzwxh:11571klzzwxh:11572 klzzwxh:11506klzzwxh:11507chpklzzwxh:11508-klzzwxh:11573saveklzzwxh:11509at = 0;klzzwxh:11588klzzwxh:11574klzzwxh:11575klzzwxh:11576 nchanged++;klzzwxh:11589klzzwxh:11510

      /klzzwxh:11590 Creates a new file in directory backup. The name will be the name of theklzzwxh:11606klzzwxh:11598klzzwxh:11599 cache file of orig and attributes will be taken from orig. The cacheklzzwxh:11607klzzwxh:11600klzzwxh:11601 file will be moved from orig to the new node. Open file descriptorsklzzwxh:11608klzzwxh:11602klzzwxh:11603 will stay with orig.klzzwxh:11609klzzwxh:11604klzzwxh:11605 orig : the node to be backed up. klzzwxh:11591/klzzwxh:11610static void backupklzzwxh:11592nodeklzzwxh:11593davklzzwxh:11594node klzzwxh:11595origklzzwxh:11596 klzzwxh:11597

      klzzwxh:11660klzzwxh:11661klzzwxh:11662 if klzzwxh:11611orig-klzzwxh:11663cacheklzzwxh:11612path == NULLklzzwxh:11613klzzwxh:11770klzzwxh:11664klzzwxh:11665klzzwxh:11666klzzwxh:11667klzzwxh:11668klzzwxh:11669klzzwxh:11670 return;klzzwxh:11771klzzwxh:11671klzzwxh:11672klzzwxh:11673 davklzzwxh:11614node klzzwxh:11615node = newklzzwxh:11616nodeklzzwxh:11617backup, orig-klzzwxh:11674modeklzzwxh:11618;klzzwxh:11772klzzwxh:11675klzzwxh:11676klzzwxh:11677 node-klzzwxh:11678name = neklzzwxh:11619strdupklzzwxh:11620orig-klzzwxh:11679cacheklzzwxh:11621path + strlenklzzwxh:11622cacheklzzwxh:11623dirklzzwxh:11624 +1klzzwxh:11625;klzzwxh:11773klzzwxh:11680klzzwxh:11681klzzwxh:11682 node-klzzwxh:11683cacheklzzwxh:11626path = orig-klzzwxh:11684cacheklzzwxh:11627path;klzzwxh:11774klzzwxh:11685klzzwxh:11686klzzwxh:11687 orig-klzzwxh:11688cacheklzzwxh:11628path = NULL;klzzwxh:11775klzzwxh:11689klzzwxh:11690klzzwxh:11691 node-klzzwxh:11692mimeklzzwxh:11629type = orig-klzzwxh:11693mimeklzzwxh:11630type;klzzwxh:11776klzzwxh:11694klzzwxh:11695klzzwxh:11696 orig-klzzwxh:11697mimeklzzwxh:11631type = NULL;klzzwxh:11777klzzwxh:11698klzzwxh:11699klzzwxh:11700 orig-klzzwxh:11701dirty = 0;klzzwxh:11778klzzwxh:11702klzzwxh:11703klzzwxh:11704 node-klzzwxh:11705size = orig-klzzwxh:11706size;klzzwxh:11779klzzwxh:11707klzzwxh:11708klzzwxh:11709 node-klzzwxh:11710uid = defaultklzzwxh:11632uid;klzzwxh:11780klzzwxh:11711klzzwxh:11712klzzwxh:11713 node-klzzwxh:11714gid = defaultklzzwxh:11633gid;klzzwxh:11781klzzwxh:11715klzzwxh:11716klzzwxh:11717 if klzzwxh:11634debugklzzwxh:11635 klzzwxh:11636klzzwxh:11782klzzwxh:11718klzzwxh:11719klzzwxh:11720klzzwxh:11721klzzwxh:11722klzzwxh:11723klzzwxh:11724 syslogklzzwxh:11637LOGklzzwxh:11638MAKEPRIklzzwxh:11639LOGklzzwxh:11640DAEMON, LOGklzzwxh:11641DEBUGklzzwxh:11642, klzzwxh:11725created backup of %pklzzwxh:11726,klzzwxh:11783klzzwxh:11727klzzwxh:11728klzzwxh:11729klzzwxh:11730klzzwxh:11731klzzwxh:11732klzzwxh:11733klzzwxh:11734klzzwxh:11735klzzwxh:11736klzzwxh:11737klzzwxh:11738klzzwxh:11739klzzwxh:11740 origklzzwxh:11643;klzzwxh:11784klzzwxh:11741klzzwxh:11742klzzwxh:11743klzzwxh:11744klzzwxh:11745klzzwxh:11746klzzwxh:11747 syslogklzzwxh:11644LOGklzzwxh:11645MAKEPRIklzzwxh:11646LOGklzzwxh:11647DAEMON, LOGklzzwxh:11648DEBUGklzzwxh:11649, klzzwxh:11748klzzwxh:11749 %sklzzwxh:11750, orig-klzzwxh:11751pathklzzwxh:11650;klzzwxh:11785klzzwxh:11752klzzwxh:11753klzzwxh:11754 klzzwxh:11651klzzwxh:11786klzzwxh:11755klzzwxh:11756klzzwxh:11757 deleteklzzwxh:11652cacheklzzwxh:11653fileklzzwxh:11654backupklzzwxh:11655;klzzwxh:11787klzzwxh:11758klzzwxh:11759klzzwxh:11760 backup-klzzwxh:11761mtime = timeklzzwxh:11656NULLklzzwxh:11657;klzzwxh:11788klzzwxh:11762klzzwxh:11763klzzwxh:11764 backup-klzzwxh:11765ctime = backup-klzzwxh:11766mtime;klzzwxh:11789klzzwxh:11767klzzwxh:11768klzzwxh:11769 klzzwxh:11658flush = 1;klzzwxh:11790klzzwxh:11659

      /klzzwxh:11791 Scans the directory tree starting from node andklzzwxh:11823klzzwxh:11801klzzwxh:11802 - if upload == 1: saves dirty files to the server and unlocks them.klzzwxh:11824klzzwxh:11803klzzwxh:11804klzzwxh:11805klzzwxh:11806 If it can not be safed, a local backup is created and the node is deleted. klzzwxh:11825klzzwxh:11807klzzwxh:11808 - removes any file nodes without cached fileklzzwxh:11826klzzwxh:11809klzzwxh:11810 - removes all dir nodes that have not at least one file node below.klzzwxh:11827klzzwxh:11811klzzwxh:11812 Short: removes everthing that is not necessary to correctly referenceklzzwxh:11828klzzwxh:11813klzzwxh:11814 the cached files.klzzwxh:11829klzzwxh:11815klzzwxh:11816 Node node itself will be removed and deleted if possible.klzzwxh:11830klzzwxh:11817klzzwxh:11818 Directory backup and root will never be removed.klzzwxh:11831klzzwxh:11819klzzwxh:11820 Kernel will klzzwxh:11792notklzzwxh:11793 be notified about changes.klzzwxh:11832klzzwxh:11821klzzwxh:11822 Member nref of directories will be adjusted. klzzwxh:11794/klzzwxh:11833static void cleanklzzwxh:11795treeklzzwxh:11796davklzzwxh:11797node klzzwxh:11798node, int uploadklzzwxh:11799 klzzwxh:11800

      klzzwxh:11842klzzwxh:11843klzzwxh:11844 if klzzwxh:11834node == backupklzzwxh:11835 klzzwxh:11836klzzwxh:11862klzzwxh:11845klzzwxh:11846klzzwxh:11847klzzwxh:11848klzzwxh:11849klzzwxh:11850klzzwxh:11851 deleteklzzwxh:11837cacheklzzwxh:11838fileklzzwxh:11839backupklzzwxh:11840;klzzwxh:11863klzzwxh:11852klzzwxh:11853klzzwxh:11854klzzwxh:11855klzzwxh:11856klzzwxh:11857klzzwxh:11858 return;klzzwxh:11864klzzwxh:11859klzzwxh:11860klzzwxh:11861 klzzwxh:11841

      klzzwxh:11871klzzwxh:11872klzzwxh:11873 if klzzwxh:11865isklzzwxh:11866dirklzzwxh:11867nodeklzzwxh:11868klzzwxh:11869 klzzwxh:11870

      klzzwxh:11909klzzwxh:11910klzzwxh:11911klzzwxh:11912klzzwxh:11913klzzwxh:11914klzzwxh:11915 davklzzwxh:11874node klzzwxh:11875child = node-klzzwxh:11916childs;klzzwxh:12035klzzwxh:11917klzzwxh:11918klzzwxh:11919klzzwxh:11920klzzwxh:11921klzzwxh:11922klzzwxh:11923 while klzzwxh:11876child klzzwxh:11877= NULLklzzwxh:11878 klzzwxh:11879klzzwxh:12036klzzwxh:11924klzzwxh:11925klzzwxh:11926klzzwxh:11927klzzwxh:11928klzzwxh:11929klzzwxh:11930klzzwxh:11931klzzwxh:11932klzzwxh:11933klzzwxh:11934 davklzzwxh:11880node klzzwxh:11881next = child-klzzwxh:11935next;klzzwxh:12037klzzwxh:11936klzzwxh:11937klzzwxh:11938klzzwxh:11939klzzwxh:11940klzzwxh:11941klzzwxh:11942klzzwxh:11943klzzwxh:11944klzzwxh:11945klzzwxh:11946 cleanklzzwxh:11882treeklzzwxh:11883child, uploadklzzwxh:11884;klzzwxh:12038klzzwxh:11947klzzwxh:11948klzzwxh:11949klzzwxh:11950klzzwxh:11951klzzwxh:11952klzzwxh:11953klzzwxh:11954klzzwxh:11955klzzwxh:11956klzzwxh:11957 child = next;klzzwxh:12039klzzwxh:11958klzzwxh:11959klzzwxh:11960klzzwxh:11961klzzwxh:11962klzzwxh:11963klzzwxh:11964 klzzwxh:11885klzzwxh:12040klzzwxh:11965klzzwxh:11966klzzwxh:11967klzzwxh:11968klzzwxh:11969klzzwxh:11970klzzwxh:11971 if klzzwxh:11886node-klzzwxh:11972childs == NULL klzzwxh:11973klzzwxh:11974 node klzzwxh:11887= root klzzwxh:11975klzzwxh:11976 node klzzwxh:11888= backupklzzwxh:11889 klzzwxh:11890klzzwxh:12041klzzwxh:11977klzzwxh:11978klzzwxh:11979klzzwxh:11980klzzwxh:11981klzzwxh:11982klzzwxh:11983klzzwxh:11984klzzwxh:11985klzzwxh:11986klzzwxh:11987 removeklzzwxh:11891fromklzzwxh:11892treeklzzwxh:11893nodeklzzwxh:11894;klzzwxh:12042klzzwxh:11988klzzwxh:11989klzzwxh:11990klzzwxh:11991klzzwxh:11992klzzwxh:11993klzzwxh:11994klzzwxh:11995klzzwxh:11996klzzwxh:11997klzzwxh:11998 removeklzzwxh:11895fromklzzwxh:11896tableklzzwxh:11897nodeklzzwxh:11898;klzzwxh:12043klzzwxh:11999klzzwxh:12000klzzwxh:12001klzzwxh:12002klzzwxh:12003klzzwxh:12004klzzwxh:12005klzzwxh:12006klzzwxh:12007klzzwxh:12008klzzwxh:12009 deleteklzzwxh:11899nodeklzzwxh:11900nodeklzzwxh:11901;klzzwxh:12044klzzwxh:12010klzzwxh:12011klzzwxh:12012klzzwxh:12013klzzwxh:12014klzzwxh:12015klzzwxh:12016 klzzwxh:11902 else klzzwxh:11903klzzwxh:12045klzzwxh:12017klzzwxh:12018klzzwxh:12019klzzwxh:12020klzzwxh:12021klzzwxh:12022klzzwxh:12023klzzwxh:12024klzzwxh:12025klzzwxh:12026klzzwxh:12027 deleteklzzwxh:11904cacheklzzwxh:11905fileklzzwxh:11906nodeklzzwxh:11907;klzzwxh:12046klzzwxh:12028klzzwxh:12029klzzwxh:12030klzzwxh:12031klzzwxh:12032klzzwxh:12033klzzwxh:12034 klzzwxh:11908

      klzzwxh:12060klzzwxh:12061klzzwxh:12062 klzzwxh:12047 else if klzzwxh:12048klzzwxh:12049isklzzwxh:12050cachedklzzwxh:12051nodeklzzwxh:12052 || accessklzzwxh:12053node-klzzwxh:12063cacheklzzwxh:12054path, Fklzzwxh:12055OKklzzwxh:12056 klzzwxh:12057= 0klzzwxh:12058 klzzwxh:12059

      klzzwxh:12084klzzwxh:12085klzzwxh:12086klzzwxh:12087klzzwxh:12088klzzwxh:12089klzzwxh:12090 if klzzwxh:12064isklzzwxh:12065lockedklzzwxh:12066nodeklzzwxh:12067 klzzwxh:12091klzzwxh:12092 uploadklzzwxh:12068klzzwxh:12128klzzwxh:12093klzzwxh:12094klzzwxh:12095klzzwxh:12096klzzwxh:12097klzzwxh:12098klzzwxh:12099klzzwxh:12100klzzwxh:12101klzzwxh:12102klzzwxh:12103 davklzzwxh:12069unlockklzzwxh:12070node-klzzwxh:12104path, klzzwxh:12105node-klzzwxh:12106lockklzzwxh:12071expireklzzwxh:12072;klzzwxh:12129klzzwxh:12107klzzwxh:12108klzzwxh:12109klzzwxh:12110klzzwxh:12111klzzwxh:12112klzzwxh:12113 removeklzzwxh:12073fromklzzwxh:12074treeklzzwxh:12075nodeklzzwxh:12076;klzzwxh:12130klzzwxh:12114klzzwxh:12115klzzwxh:12116klzzwxh:12117klzzwxh:12118klzzwxh:12119klzzwxh:12120 removeklzzwxh:12077fromklzzwxh:12078tableklzzwxh:12079nodeklzzwxh:12080;klzzwxh:12131klzzwxh:12121klzzwxh:12122klzzwxh:12123klzzwxh:12124klzzwxh:12125klzzwxh:12126klzzwxh:12127 deleteklzzwxh:12081nodeklzzwxh:12082nodeklzzwxh:12083;

      klzzwxh:12144klzzwxh:12145klzzwxh:12146 klzzwxh:12132 else if klzzwxh:12133klzzwxh:12134isklzzwxh:12135dirtyklzzwxh:12136nodeklzzwxh:12137 || isklzzwxh:12138createdklzzwxh:12139nodeklzzwxh:12140klzzwxh:12141 klzzwxh:12147klzzwxh:12148 uploadklzzwxh:12142 klzzwxh:12143

      klzzwxh:12218klzzwxh:12219klzzwxh:12220klzzwxh:12221klzzwxh:12222klzzwxh:12223klzzwxh:12224 int setklzzwxh:12149execute = -1;klzzwxh:12575klzzwxh:12225klzzwxh:12226klzzwxh:12227klzzwxh:12228klzzwxh:12229klzzwxh:12230klzzwxh:12231 if klzzwxh:12150isklzzwxh:12151createdklzzwxh:12152nodeklzzwxh:12153klzzwxh:12576klzzwxh:12232klzzwxh:12233klzzwxh:12234klzzwxh:12235klzzwxh:12236klzzwxh:12237klzzwxh:12238klzzwxh:12239klzzwxh:12240klzzwxh:12241klzzwxh:12242klzzwxh:12243klzzwxh:12244klzzwxh:12245klzzwxh:12246 klzzwxh:12247klzzwxh:12248 node-klzzwxh:12249mode klzzwxh:12250 klzzwxh:12154Sklzzwxh:12155IXUSR | Sklzzwxh:12156IXGRP | Sklzzwxh:12157IXOTHklzzwxh:12158klzzwxh:12159klzzwxh:12577klzzwxh:12251klzzwxh:12252klzzwxh:12253klzzwxh:12254klzzwxh:12255klzzwxh:12256klzzwxh:12257klzzwxh:12258klzzwxh:12259klzzwxh:12260klzzwxh:12261 setklzzwxh:12160execute = 1;klzzwxh:12578klzzwxh:12262klzzwxh:12263klzzwxh:12264klzzwxh:12265klzzwxh:12266klzzwxh:12267klzzwxh:12268 int ret = davklzzwxh:12161putklzzwxh:12162node-klzzwxh:12269path, node-klzzwxh:12270cacheklzzwxh:12163path,klzzwxh:12579klzzwxh:12271klzzwxh:12272klzzwxh:12273klzzwxh:12274klzzwxh:12275klzzwxh:12276klzzwxh:12277klzzwxh:12278klzzwxh:12279klzzwxh:12280klzzwxh:12281klzzwxh:12282klzzwxh:12283klzzwxh:12284klzzwxh:12285klzzwxh:12286klzzwxh:12287klzzwxh:12288klzzwxh:12289klzzwxh:12290klzzwxh:12291klzzwxh:12292klzzwxh:12293klzzwxh:12294klzzwxh:12295 klzzwxh:12296node-klzzwxh:12297remoteklzzwxh:12164exists, klzzwxh:12298node-klzzwxh:12299lockklzzwxh:12165expire,klzzwxh:12580klzzwxh:12300klzzwxh:12301klzzwxh:12302klzzwxh:12303klzzwxh:12304klzzwxh:12305klzzwxh:12306klzzwxh:12307klzzwxh:12308klzzwxh:12309klzzwxh:12310klzzwxh:12311klzzwxh:12312klzzwxh:12313klzzwxh:12314klzzwxh:12315klzzwxh:12316klzzwxh:12317klzzwxh:12318klzzwxh:12319klzzwxh:12320klzzwxh:12321klzzwxh:12322klzzwxh:12323klzzwxh:12324 klzzwxh:12325node-klzzwxh:12326etag, klzzwxh:12327node-klzzwxh:12328smtime,klzzwxh:12581klzzwxh:12329klzzwxh:12330klzzwxh:12331klzzwxh:12332klzzwxh:12333klzzwxh:12334klzzwxh:12335klzzwxh:12336klzzwxh:12337klzzwxh:12338klzzwxh:12339klzzwxh:12340klzzwxh:12341klzzwxh:12342klzzwxh:12343klzzwxh:12344klzzwxh:12345klzzwxh:12346klzzwxh:12347klzzwxh:12348klzzwxh:12349klzzwxh:12350klzzwxh:12351klzzwxh:12352klzzwxh:12353 klzzwxh:12354node-klzzwxh:12355mimeklzzwxh:12166type, setklzzwxh:12167executeklzzwxh:12168;klzzwxh:12582klzzwxh:12356klzzwxh:12357klzzwxh:12358klzzwxh:12359klzzwxh:12360klzzwxh:12361klzzwxh:12362 if klzzwxh:12169isklzzwxh:12170lockedklzzwxh:12171nodeklzzwxh:12172klzzwxh:12173klzzwxh:12583klzzwxh:12363klzzwxh:12364klzzwxh:12365klzzwxh:12366klzzwxh:12367klzzwxh:12368klzzwxh:12369klzzwxh:12370klzzwxh:12371klzzwxh:12372klzzwxh:12373 davklzzwxh:12174unlockklzzwxh:12175node-klzzwxh:12374path, klzzwxh:12375node-klzzwxh:12376lockklzzwxh:12176expireklzzwxh:12177;klzzwxh:12584klzzwxh:12377klzzwxh:12378klzzwxh:12379klzzwxh:12380klzzwxh:12381klzzwxh:12382klzzwxh:12383 if klzzwxh:12178ret == 0klzzwxh:12179 klzzwxh:12180klzzwxh:12585klzzwxh:12384klzzwxh:12385klzzwxh:12386klzzwxh:12387klzzwxh:12388klzzwxh:12389klzzwxh:12390klzzwxh:12391klzzwxh:12392klzzwxh:12393klzzwxh:12394 node-klzzwxh:12395mtime = node-klzzwxh:12396smtime;klzzwxh:12586klzzwxh:12397klzzwxh:12398klzzwxh:12399klzzwxh:12400klzzwxh:12401klzzwxh:12402klzzwxh:12403klzzwxh:12404klzzwxh:12405klzzwxh:12406klzzwxh:12407 if klzzwxh:12181node-klzzwxh:12408mtime klzzwxh:12409 node-klzzwxh:12410atimeklzzwxh:12182klzzwxh:12587klzzwxh:12411klzzwxh:12412klzzwxh:12413klzzwxh:12414klzzwxh:12415klzzwxh:12416klzzwxh:12417klzzwxh:12418klzzwxh:12419klzzwxh:12420klzzwxh:12421klzzwxh:12422klzzwxh:12423klzzwxh:12424klzzwxh:12425 node-klzzwxh:12426atime = node-klzzwxh:12427mtime;klzzwxh:12588klzzwxh:12428klzzwxh:12429klzzwxh:12430klzzwxh:12431klzzwxh:12432klzzwxh:12433klzzwxh:12434klzzwxh:12435klzzwxh:12436klzzwxh:12437klzzwxh:12438 setklzzwxh:12183cacheklzzwxh:12184fileklzzwxh:12185timesklzzwxh:12186nodeklzzwxh:12187;klzzwxh:12589klzzwxh:12439klzzwxh:12440klzzwxh:12441klzzwxh:12442klzzwxh:12443klzzwxh:12444klzzwxh:12445klzzwxh:12446klzzwxh:12447klzzwxh:12448klzzwxh:12449 node-klzzwxh:12450dirty = 0;klzzwxh:12590klzzwxh:12451klzzwxh:12452klzzwxh:12453klzzwxh:12454klzzwxh:12455klzzwxh:12456klzzwxh:12457 klzzwxh:12188 else if klzzwxh:12189ret == EACCES || ret == EINVAL || ret == ENOENTklzzwxh:12591klzzwxh:12458klzzwxh:12459klzzwxh:12460klzzwxh:12461klzzwxh:12462klzzwxh:12463klzzwxh:12464klzzwxh:12465klzzwxh:12466klzzwxh:12467klzzwxh:12468klzzwxh:12469klzzwxh:12470klzzwxh:12471klzzwxh:12472klzzwxh:12473klzzwxh:12474klzzwxh:12475klzzwxh:12476klzzwxh:12477klzzwxh:12478 || ret == EPERM || ret == ENOSPC || ret == EEXISTklzzwxh:12190 klzzwxh:12191klzzwxh:12592klzzwxh:12479klzzwxh:12480klzzwxh:12481klzzwxh:12482klzzwxh:12483klzzwxh:12484klzzwxh:12485klzzwxh:12486klzzwxh:12487klzzwxh:12488klzzwxh:12489 backupklzzwxh:12192nodeklzzwxh:12193nodeklzzwxh:12194;klzzwxh:12593klzzwxh:12490klzzwxh:12491klzzwxh:12492klzzwxh:12493klzzwxh:12494klzzwxh:12495klzzwxh:12496klzzwxh:12497klzzwxh:12498klzzwxh:12499klzzwxh:12500 removeklzzwxh:12195fromklzzwxh:12196treeklzzwxh:12197nodeklzzwxh:12198;klzzwxh:12594klzzwxh:12501klzzwxh:12502klzzwxh:12503klzzwxh:12504klzzwxh:12505klzzwxh:12506klzzwxh:12507klzzwxh:12508klzzwxh:12509klzzwxh:12510klzzwxh:12511 removeklzzwxh:12199fromklzzwxh:12200tableklzzwxh:12201nodeklzzwxh:12202;klzzwxh:12595klzzwxh:12512klzzwxh:12513klzzwxh:12514klzzwxh:12515klzzwxh:12516klzzwxh:12517klzzwxh:12518klzzwxh:12519klzzwxh:12520klzzwxh:12521klzzwxh:12522 deleteklzzwxh:12203nodeklzzwxh:12204nodeklzzwxh:12205;klzzwxh:12596klzzwxh:12523klzzwxh:12524klzzwxh:12525klzzwxh:12526klzzwxh:12527klzzwxh:12528klzzwxh:12529 klzzwxh:12206klzzwxh:12597klzzwxh:12530klzzwxh:12531klzzwxh:12532 klzzwxh:12207 else klzzwxh:12208klzzwxh:12598klzzwxh:12533klzzwxh:12534klzzwxh:12535klzzwxh:12536klzzwxh:12537klzzwxh:12538klzzwxh:12539 node-klzzwxh:12540mtime = node-klzzwxh:12541smtime;klzzwxh:12599klzzwxh:12542klzzwxh:12543klzzwxh:12544klzzwxh:12545klzzwxh:12546klzzwxh:12547klzzwxh:12548 if klzzwxh:12209node-klzzwxh:12549mtime klzzwxh:12550 node-klzzwxh:12551atimeklzzwxh:12210klzzwxh:12600klzzwxh:12552klzzwxh:12553klzzwxh:12554klzzwxh:12555klzzwxh:12556klzzwxh:12557klzzwxh:12558klzzwxh:12559klzzwxh:12560klzzwxh:12561klzzwxh:12562 node-klzzwxh:12563atime = node-klzzwxh:12564mtime;klzzwxh:12601klzzwxh:12565klzzwxh:12566klzzwxh:12567klzzwxh:12568klzzwxh:12569klzzwxh:12570klzzwxh:12571 setklzzwxh:12211cacheklzzwxh:12212fileklzzwxh:12213timesklzzwxh:12214nodeklzzwxh:12215;klzzwxh:12602klzzwxh:12572klzzwxh:12573klzzwxh:12574 klzzwxh:12216klzzwxh:12603klzzwxh:12217

      /klzzwxh:12604 Frees any resources held by node and finally frees node.klzzwxh:12614klzzwxh:12612klzzwxh:12613 If there are open file descriptors, this will be closed. klzzwxh:12605/klzzwxh:12615static void deleteklzzwxh:12606nodeklzzwxh:12607davklzzwxh:12608node klzzwxh:12609nodeklzzwxh:12610 klzzwxh:12611

      klzzwxh:12665klzzwxh:12666klzzwxh:12667 if klzzwxh:12616debugklzzwxh:12617klzzwxh:12774klzzwxh:12668klzzwxh:12669klzzwxh:12670klzzwxh:12671klzzwxh:12672klzzwxh:12673klzzwxh:12674 syslogklzzwxh:12618LOGklzzwxh:12619MAKEPRIklzzwxh:12620LOGklzzwxh:12621DAEMON, LOGklzzwxh:12622DEBUGklzzwxh:12623, klzzwxh:12675deleting node %pklzzwxh:12676, nodeklzzwxh:12624;klzzwxh:12775klzzwxh:12677klzzwxh:12678klzzwxh:12679 if klzzwxh:12625node-klzzwxh:12680path klzzwxh:12626= NULLklzzwxh:12627klzzwxh:12776klzzwxh:12681klzzwxh:12682klzzwxh:12683klzzwxh:12684klzzwxh:12685klzzwxh:12686klzzwxh:12687 freeklzzwxh:12628node-klzzwxh:12688pathklzzwxh:12629;klzzwxh:12777klzzwxh:12689klzzwxh:12690klzzwxh:12691 if klzzwxh:12630node-klzzwxh:12692name klzzwxh:12631= NULLklzzwxh:12632klzzwxh:12778klzzwxh:12693klzzwxh:12694klzzwxh:12695klzzwxh:12696klzzwxh:12697klzzwxh:12698klzzwxh:12699 freeklzzwxh:12633node-klzzwxh:12700nameklzzwxh:12634;klzzwxh:12779klzzwxh:12701klzzwxh:12702klzzwxh:12703 deleteklzzwxh:12635cacheklzzwxh:12636fileklzzwxh:12637nodeklzzwxh:12638;klzzwxh:12780klzzwxh:12704klzzwxh:12705klzzwxh:12706 if klzzwxh:12639node-klzzwxh:12707etag klzzwxh:12640= NULLklzzwxh:12641klzzwxh:12781klzzwxh:12708klzzwxh:12709klzzwxh:12710klzzwxh:12711klzzwxh:12712klzzwxh:12713klzzwxh:12714 freeklzzwxh:12642node-klzzwxh:12715etagklzzwxh:12643;klzzwxh:12782klzzwxh:12716klzzwxh:12717klzzwxh:12718 if klzzwxh:12644node-klzzwxh:12719mimeklzzwxh:12645type klzzwxh:12646= NULLklzzwxh:12647klzzwxh:12783klzzwxh:12720klzzwxh:12721klzzwxh:12722klzzwxh:12723klzzwxh:12724klzzwxh:12725klzzwxh:12726 freeklzzwxh:12648node-klzzwxh:12727mimeklzzwxh:12649typeklzzwxh:12650;klzzwxh:12784klzzwxh:12728klzzwxh:12729klzzwxh:12730 while klzzwxh:12651node-klzzwxh:12731handles klzzwxh:12652= NULLklzzwxh:12653 klzzwxh:12654klzzwxh:12785klzzwxh:12732klzzwxh:12733klzzwxh:12734klzzwxh:12735klzzwxh:12736klzzwxh:12737klzzwxh:12738 davklzzwxh:12655handle klzzwxh:12656tofree = node-klzzwxh:12739handles;klzzwxh:12786klzzwxh:12740klzzwxh:12741klzzwxh:12742klzzwxh:12743klzzwxh:12744klzzwxh:12745klzzwxh:12746 node-klzzwxh:12747handles = node-klzzwxh:12748handles-klzzwxh:12749next;klzzwxh:12787klzzwxh:12750klzzwxh:12751klzzwxh:12752klzzwxh:12753klzzwxh:12754klzzwxh:12755klzzwxh:12756 closeklzzwxh:12657tofree-klzzwxh:12757fdklzzwxh:12658;klzzwxh:12788klzzwxh:12758klzzwxh:12759klzzwxh:12760klzzwxh:12761klzzwxh:12762klzzwxh:12763klzzwxh:12764 freeklzzwxh:12659tofreeklzzwxh:12660;klzzwxh:12789klzzwxh:12765klzzwxh:12766klzzwxh:12767 klzzwxh:12661klzzwxh:12790klzzwxh:12768klzzwxh:12769klzzwxh:12770 freeklzzwxh:12662nodeklzzwxh:12663;klzzwxh:12791klzzwxh:12771klzzwxh:12772klzzwxh:12773 nnodes--;klzzwxh:12792klzzwxh:12664

      /klzzwxh:12793 Deletes the tree starting at and including node. The tree is freedklzzwxh:12807klzzwxh:12801klzzwxh:12802 uncontionally, no checks for lost update problem and the like areklzzwxh:12808klzzwxh:12803klzzwxh:12804 done, also backup will be deleted if in tree.klzzwxh:12809klzzwxh:12805klzzwxh:12806 Exeption: the root node will not be deleted. klzzwxh:12794/klzzwxh:12810static void deleteklzzwxh:12795treeklzzwxh:12796davklzzwxh:12797node klzzwxh:12798nodeklzzwxh:12799 klzzwxh:12800

      klzzwxh:12817klzzwxh:12818klzzwxh:12819 while klzzwxh:12811node-klzzwxh:12820childs klzzwxh:12812= NULLklzzwxh:12813klzzwxh:12829klzzwxh:12821klzzwxh:12822klzzwxh:12823klzzwxh:12824klzzwxh:12825klzzwxh:12826klzzwxh:12827 deleteklzzwxh:12814treeklzzwxh:12815node-klzzwxh:12828childsklzzwxh:12816;

      klzzwxh:12849klzzwxh:12850klzzwxh:12851 if klzzwxh:12830node klzzwxh:12831= rootklzzwxh:12832 klzzwxh:12833klzzwxh:12894klzzwxh:12852klzzwxh:12853klzzwxh:12854klzzwxh:12855klzzwxh:12856klzzwxh:12857klzzwxh:12858 removeklzzwxh:12834fromklzzwxh:12835treeklzzwxh:12836nodeklzzwxh:12837;klzzwxh:12895klzzwxh:12859klzzwxh:12860klzzwxh:12861klzzwxh:12862klzzwxh:12863klzzwxh:12864klzzwxh:12865 removeklzzwxh:12838fromklzzwxh:12839tableklzzwxh:12840nodeklzzwxh:12841;klzzwxh:12896klzzwxh:12866klzzwxh:12867klzzwxh:12868klzzwxh:12869klzzwxh:12870klzzwxh:12871klzzwxh:12872 deleteklzzwxh:12842nodeklzzwxh:12843nodeklzzwxh:12844;klzzwxh:12897klzzwxh:12873klzzwxh:12874klzzwxh:12875klzzwxh:12876klzzwxh:12877klzzwxh:12878klzzwxh:12879 if klzzwxh:12845node == backupklzzwxh:12846klzzwxh:12898klzzwxh:12880klzzwxh:12881klzzwxh:12882klzzwxh:12883klzzwxh:12884klzzwxh:12885klzzwxh:12886klzzwxh:12887klzzwxh:12888klzzwxh:12889klzzwxh:12890 backup = NULL;klzzwxh:12899klzzwxh:12891klzzwxh:12892klzzwxh:12893 klzzwxh:12847klzzwxh:12900klzzwxh:12848

      /klzzwxh:12901 Moves directory src to dst using WebDAV method MOVE. klzzwxh:12902/klzzwxh:12935static int moveklzzwxh:12903dirklzzwxh:12904davklzzwxh:12905node klzzwxh:12906src, davklzzwxh:12907node klzzwxh:12908dst, davklzzwxh:12909node klzzwxh:12910dstklzzwxh:12911parent,klzzwxh:12936klzzwxh:12916klzzwxh:12917klzzwxh:12918klzzwxh:12919klzzwxh:12920klzzwxh:12921klzzwxh:12922klzzwxh:12923klzzwxh:12924klzzwxh:12925klzzwxh:12926klzzwxh:12927klzzwxh:12928klzzwxh:12929klzzwxh:12930klzzwxh:12931klzzwxh:12932klzzwxh:12933klzzwxh:12934 const char klzzwxh:12912dstklzzwxh:12913nameklzzwxh:12914 klzzwxh:12915

      klzzwxh:12950klzzwxh:12951klzzwxh:12952 if klzzwxh:12937dst klzzwxh:12938= NULL klzzwxh:12953klzzwxh:12954 klzzwxh:12939isklzzwxh:12940dirklzzwxh:12941dstklzzwxh:12942klzzwxh:12943klzzwxh:12974klzzwxh:12955klzzwxh:12956klzzwxh:12957klzzwxh:12958klzzwxh:12959klzzwxh:12960klzzwxh:12961 return ENOTDIR;klzzwxh:12975klzzwxh:12962klzzwxh:12963klzzwxh:12964 if klzzwxh:12944dst klzzwxh:12945= NULL klzzwxh:12965klzzwxh:12966 isklzzwxh:12946busyklzzwxh:12947dstklzzwxh:12948klzzwxh:12949klzzwxh:12976klzzwxh:12967klzzwxh:12968klzzwxh:12969klzzwxh:12970klzzwxh:12971klzzwxh:12972klzzwxh:12973 return EBUSY;

      klzzwxh:13007klzzwxh:13008klzzwxh:13009 char klzzwxh:12977dstklzzwxh:12978path;klzzwxh:13051klzzwxh:13010klzzwxh:13011klzzwxh:13012 if klzzwxh:12979dst == NULLklzzwxh:12980 klzzwxh:12981klzzwxh:13052klzzwxh:13013klzzwxh:13014klzzwxh:13015klzzwxh:13016klzzwxh:13017klzzwxh:13018klzzwxh:13019 char klzzwxh:12982dstklzzwxh:12983conv = davklzzwxh:12984convklzzwxh:12985toklzzwxh:12986serverklzzwxh:12987encklzzwxh:12988dstklzzwxh:12989nameklzzwxh:12990;klzzwxh:13053klzzwxh:13020klzzwxh:13021klzzwxh:13022klzzwxh:13023klzzwxh:13024klzzwxh:13025klzzwxh:13026 dstklzzwxh:12991path = neklzzwxh:12992concatklzzwxh:12993dstklzzwxh:12994parent-klzzwxh:13027path, dstklzzwxh:12995conv, klzzwxh:13028/klzzwxh:13029, NULLklzzwxh:12996;klzzwxh:13054klzzwxh:13030klzzwxh:13031klzzwxh:13032klzzwxh:13033klzzwxh:13034klzzwxh:13035klzzwxh:13036 freeklzzwxh:12997dstklzzwxh:12998convklzzwxh:12999;klzzwxh:13055klzzwxh:13037klzzwxh:13038klzzwxh:13039 klzzwxh:13000 else klzzwxh:13001klzzwxh:13056klzzwxh:13040klzzwxh:13041klzzwxh:13042klzzwxh:13043klzzwxh:13044klzzwxh:13045klzzwxh:13046 dstklzzwxh:13002path = neklzzwxh:13003strdupklzzwxh:13004dst-klzzwxh:13047pathklzzwxh:13005;klzzwxh:13057klzzwxh:13048klzzwxh:13049klzzwxh:13050 klzzwxh:13006

      klzzwxh:13070klzzwxh:13071klzzwxh:13072 if klzzwxh:13058davklzzwxh:13059moveklzzwxh:13060src-klzzwxh:13073path, dstklzzwxh:13061pathklzzwxh:13062 klzzwxh:13063= 0klzzwxh:13064 klzzwxh:13065klzzwxh:13091klzzwxh:13074klzzwxh:13075klzzwxh:13076klzzwxh:13077klzzwxh:13078klzzwxh:13079klzzwxh:13080 freeklzzwxh:13066dstklzzwxh:13067pathklzzwxh:13068;klzzwxh:13092klzzwxh:13081klzzwxh:13082klzzwxh:13083klzzwxh:13084klzzwxh:13085klzzwxh:13086klzzwxh:13087 return EIO;klzzwxh:13093klzzwxh:13088klzzwxh:13089klzzwxh:13090 klzzwxh:13069

      klzzwxh:13100klzzwxh:13101klzzwxh:13102 if klzzwxh:13094dst klzzwxh:13095= NULLklzzwxh:13096klzzwxh:13110klzzwxh:13103klzzwxh:13104klzzwxh:13105klzzwxh:13106klzzwxh:13107klzzwxh:13108klzzwxh:13109 removeklzzwxh:13097nodeklzzwxh:13098dstklzzwxh:13099;

      klzzwxh:13124klzzwxh:13125klzzwxh:13126 freeklzzwxh:13111src-klzzwxh:13127nameklzzwxh:13112;klzzwxh:13139klzzwxh:13128klzzwxh:13129klzzwxh:13130 src-klzzwxh:13131name = neklzzwxh:13113strdupklzzwxh:13114dstklzzwxh:13115nameklzzwxh:13116;klzzwxh:13140klzzwxh:13132klzzwxh:13133klzzwxh:13134 updateklzzwxh:13117pathklzzwxh:13118src, src-klzzwxh:13135path, dstklzzwxh:13119pathklzzwxh:13120;klzzwxh:13141klzzwxh:13136klzzwxh:13137klzzwxh:13138 freeklzzwxh:13121dstklzzwxh:13122pathklzzwxh:13123;

      klzzwxh:13143klzzwxh:13144klzzwxh:13145 return 0;klzzwxh:13146klzzwxh:13142

      /klzzwxh:13147 As the most recent version of file src is local, it deletes src and dstklzzwxh:13187klzzwxh:13162klzzwxh:13163 on the server and locks dst. klzzwxh:13188klzzwxh:13164klzzwxh:13165 CLEAN-UP-NEEDED: no longer used with dirty files. Remote must not exist. klzzwxh:13148/klzzwxh:13189static int moveklzzwxh:13149dirtyklzzwxh:13150davklzzwxh:13151node klzzwxh:13152src, davklzzwxh:13153node klzzwxh:13154dst, davklzzwxh:13155node klzzwxh:13156dstklzzwxh:13157parent,klzzwxh:13190klzzwxh:13166klzzwxh:13167klzzwxh:13168klzzwxh:13169klzzwxh:13170klzzwxh:13171klzzwxh:13172klzzwxh:13173klzzwxh:13174klzzwxh:13175klzzwxh:13176klzzwxh:13177klzzwxh:13178klzzwxh:13179klzzwxh:13180klzzwxh:13181klzzwxh:13182klzzwxh:13183klzzwxh:13184klzzwxh:13185klzzwxh:13186 const char klzzwxh:13158dstklzzwxh:13159nameklzzwxh:13160 klzzwxh:13161

      klzzwxh:13197klzzwxh:13198klzzwxh:13199 if klzzwxh:13191dst klzzwxh:13192= NULL klzzwxh:13200klzzwxh:13201 isklzzwxh:13193dirklzzwxh:13194dstklzzwxh:13195klzzwxh:13196klzzwxh:13209klzzwxh:13202klzzwxh:13203klzzwxh:13204klzzwxh:13205klzzwxh:13206klzzwxh:13207klzzwxh:13208 return EISDIR;

      klzzwxh:13240klzzwxh:13241klzzwxh:13242 char klzzwxh:13210dstklzzwxh:13211path;klzzwxh:13282klzzwxh:13243klzzwxh:13244klzzwxh:13245 if klzzwxh:13212dst == NULLklzzwxh:13213 klzzwxh:13214klzzwxh:13283klzzwxh:13246klzzwxh:13247klzzwxh:13248klzzwxh:13249klzzwxh:13250klzzwxh:13251klzzwxh:13252 char klzzwxh:13215dstklzzwxh:13216conv = davklzzwxh:13217convklzzwxh:13218toklzzwxh:13219serverklzzwxh:13220encklzzwxh:13221dstklzzwxh:13222nameklzzwxh:13223;klzzwxh:13284klzzwxh:13253klzzwxh:13254klzzwxh:13255klzzwxh:13256klzzwxh:13257klzzwxh:13258klzzwxh:13259 dstklzzwxh:13224path = neklzzwxh:13225concatklzzwxh:13226dstklzzwxh:13227parent-klzzwxh:13260path, dstklzzwxh:13228name, NULLklzzwxh:13229;klzzwxh:13285klzzwxh:13261klzzwxh:13262klzzwxh:13263klzzwxh:13264klzzwxh:13265klzzwxh:13266klzzwxh:13267 freeklzzwxh:13230dstklzzwxh:13231convklzzwxh:13232;klzzwxh:13286klzzwxh:13268klzzwxh:13269klzzwxh:13270 klzzwxh:13233 else klzzwxh:13234klzzwxh:13287klzzwxh:13271klzzwxh:13272klzzwxh:13273klzzwxh:13274klzzwxh:13275klzzwxh:13276klzzwxh:13277 dstklzzwxh:13235path = neklzzwxh:13236strdupklzzwxh:13237dst-klzzwxh:13278pathklzzwxh:13238;klzzwxh:13288klzzwxh:13279klzzwxh:13280klzzwxh:13281 klzzwxh:13239

      klzzwxh:13361klzzwxh:13362klzzwxh:13363 if klzzwxh:13289dst klzzwxh:13290= NULLklzzwxh:13291 klzzwxh:13292klzzwxh:13609klzzwxh:13364klzzwxh:13365klzzwxh:13366klzzwxh:13367klzzwxh:13368klzzwxh:13369klzzwxh:13370 int ret = 0;klzzwxh:13610klzzwxh:13371klzzwxh:13372klzzwxh:13373klzzwxh:13374klzzwxh:13375klzzwxh:13376klzzwxh:13377 if klzzwxh:13293isklzzwxh:13294createdklzzwxh:13295dstklzzwxh:13296klzzwxh:13297 klzzwxh:13298klzzwxh:13611klzzwxh:13378klzzwxh:13379klzzwxh:13380klzzwxh:13381klzzwxh:13382klzzwxh:13383klzzwxh:13384klzzwxh:13385klzzwxh:13386klzzwxh:13387klzzwxh:13388 if klzzwxh:13299isklzzwxh:13300lockedklzzwxh:13301dstklzzwxh:13302klzzwxh:13303klzzwxh:13612klzzwxh:13389klzzwxh:13390klzzwxh:13391klzzwxh:13392klzzwxh:13393klzzwxh:13394klzzwxh:13395klzzwxh:13396klzzwxh:13397klzzwxh:13398klzzwxh:13399klzzwxh:13400klzzwxh:13401klzzwxh:13402klzzwxh:13403 ret = davklzzwxh:13304unlockklzzwxh:13305dstklzzwxh:13306path, klzzwxh:13404dst-klzzwxh:13405lockklzzwxh:13307expireklzzwxh:13308;klzzwxh:13613klzzwxh:13406klzzwxh:13407klzzwxh:13408klzzwxh:13409klzzwxh:13410klzzwxh:13411klzzwxh:13412 klzzwxh:13309 else klzzwxh:13310klzzwxh:13614klzzwxh:13413klzzwxh:13414klzzwxh:13415klzzwxh:13416klzzwxh:13417klzzwxh:13418klzzwxh:13419klzzwxh:13420klzzwxh:13421klzzwxh:13422klzzwxh:13423 ret = davklzzwxh:13311deleteklzzwxh:13312dstklzzwxh:13313path, klzzwxh:13424dst-klzzwxh:13425lockklzzwxh:13314expireklzzwxh:13315;klzzwxh:13615klzzwxh:13426klzzwxh:13427klzzwxh:13428klzzwxh:13429klzzwxh:13430klzzwxh:13431klzzwxh:13432 klzzwxh:13316klzzwxh:13616klzzwxh:13433klzzwxh:13434klzzwxh:13435klzzwxh:13436klzzwxh:13437klzzwxh:13438klzzwxh:13439 if klzzwxh:13317ret == ENOENTklzzwxh:13318klzzwxh:13617klzzwxh:13440klzzwxh:13441klzzwxh:13442klzzwxh:13443klzzwxh:13444klzzwxh:13445klzzwxh:13446klzzwxh:13447klzzwxh:13448klzzwxh:13449klzzwxh:13450 ret = 0;klzzwxh:13618klzzwxh:13451klzzwxh:13452klzzwxh:13453klzzwxh:13454klzzwxh:13455klzzwxh:13456klzzwxh:13457 if klzzwxh:13319ret klzzwxh:13320= 0klzzwxh:13321 klzzwxh:13322klzzwxh:13619klzzwxh:13458klzzwxh:13459klzzwxh:13460klzzwxh:13461klzzwxh:13462klzzwxh:13463klzzwxh:13464klzzwxh:13465klzzwxh:13466klzzwxh:13467klzzwxh:13468 freeklzzwxh:13323dstklzzwxh:13324pathklzzwxh:13325;klzzwxh:13620klzzwxh:13469klzzwxh:13470klzzwxh:13471klzzwxh:13472klzzwxh:13473klzzwxh:13474klzzwxh:13475klzzwxh:13476klzzwxh:13477klzzwxh:13478klzzwxh:13479 return EIO;klzzwxh:13621klzzwxh:13480klzzwxh:13481klzzwxh:13482klzzwxh:13483klzzwxh:13484klzzwxh:13485klzzwxh:13486 klzzwxh:13326klzzwxh:13622klzzwxh:13487klzzwxh:13488klzzwxh:13489klzzwxh:13490klzzwxh:13491klzzwxh:13492klzzwxh:13493 removeklzzwxh:13327fromklzzwxh:13328treeklzzwxh:13329dstklzzwxh:13330;klzzwxh:13623klzzwxh:13494klzzwxh:13495klzzwxh:13496klzzwxh:13497klzzwxh:13498klzzwxh:13499klzzwxh:13500 removeklzzwxh:13331fromklzzwxh:13332changedklzzwxh:13333dstklzzwxh:13334;klzzwxh:13624klzzwxh:13501klzzwxh:13502klzzwxh:13503klzzwxh:13504klzzwxh:13505klzzwxh:13506klzzwxh:13507 if klzzwxh:13335isklzzwxh:13336openklzzwxh:13337dstklzzwxh:13338klzzwxh:13339 klzzwxh:13340klzzwxh:13625klzzwxh:13508klzzwxh:13509klzzwxh:13510klzzwxh:13511klzzwxh:13512klzzwxh:13513klzzwxh:13514klzzwxh:13515klzzwxh:13516klzzwxh:13517klzzwxh:13518 if klzzwxh:13341debugklzzwxh:13342klzzwxh:13626klzzwxh:13519klzzwxh:13520klzzwxh:13521klzzwxh:13522klzzwxh:13523klzzwxh:13524klzzwxh:13525klzzwxh:13526klzzwxh:13527klzzwxh:13528klzzwxh:13529klzzwxh:13530klzzwxh:13531klzzwxh:13532klzzwxh:13533 syslogklzzwxh:13343LOGklzzwxh:13344MAKEPRIklzzwxh:13345LOGklzzwxh:13346DAEMON, LOGklzzwxh:13347DEBUGklzzwxh:13348,klzzwxh:13627klzzwxh:13534klzzwxh:13535klzzwxh:13536klzzwxh:13537klzzwxh:13538klzzwxh:13539klzzwxh:13540klzzwxh:13541klzzwxh:13542klzzwxh:13543klzzwxh:13544klzzwxh:13545klzzwxh:13546klzzwxh:13547klzzwxh:13548klzzwxh:13549klzzwxh:13550klzzwxh:13551klzzwxh:13552klzzwxh:13553klzzwxh:13554klzzwxh:13555 klzzwxh:13556invalidating node %pklzzwxh:13557, dstklzzwxh:13349;klzzwxh:13628klzzwxh:13558klzzwxh:13559klzzwxh:13560klzzwxh:13561klzzwxh:13562klzzwxh:13563klzzwxh:13564klzzwxh:13565klzzwxh:13566klzzwxh:13567klzzwxh:13568 dst-klzzwxh:13569parent = NULL;klzzwxh:13629klzzwxh:13570klzzwxh:13571klzzwxh:13572klzzwxh:13573klzzwxh:13574klzzwxh:13575klzzwxh:13576 klzzwxh:13350 else klzzwxh:13351klzzwxh:13630klzzwxh:13577klzzwxh:13578klzzwxh:13579klzzwxh:13580klzzwxh:13581klzzwxh:13582klzzwxh:13583klzzwxh:13584klzzwxh:13585klzzwxh:13586klzzwxh:13587 removeklzzwxh:13352fromklzzwxh:13353tableklzzwxh:13354dstklzzwxh:13355;klzzwxh:13631klzzwxh:13588klzzwxh:13589klzzwxh:13590klzzwxh:13591klzzwxh:13592klzzwxh:13593klzzwxh:13594klzzwxh:13595klzzwxh:13596klzzwxh:13597klzzwxh:13598 deleteklzzwxh:13356nodeklzzwxh:13357dstklzzwxh:13358;klzzwxh:13632klzzwxh:13599klzzwxh:13600klzzwxh:13601klzzwxh:13602klzzwxh:13603klzzwxh:13604klzzwxh:13605 klzzwxh:13359klzzwxh:13633klzzwxh:13606klzzwxh:13607klzzwxh:13608 klzzwxh:13360

      klzzwxh:13647klzzwxh:13648klzzwxh:13649 if klzzwxh:13634isklzzwxh:13635createdklzzwxh:13636srcklzzwxh:13637 klzzwxh:13650klzzwxh:13651 isklzzwxh:13638lockedklzzwxh:13639srcklzzwxh:13640klzzwxh:13641klzzwxh:13670klzzwxh:13652klzzwxh:13653klzzwxh:13654klzzwxh:13655klzzwxh:13656klzzwxh:13657klzzwxh:13658klzzwxh:13659klzzwxh:13660klzzwxh:13661klzzwxh:13662 davklzzwxh:13642unlockklzzwxh:13643src-klzzwxh:13663path, klzzwxh:13664src-klzzwxh:13665lockklzzwxh:13644expireklzzwxh:13645;klzzwxh:13671klzzwxh:13666klzzwxh:13667klzzwxh:13668 src-klzzwxh:13669remoteklzzwxh:13646exists = 0;

      klzzwxh:13696klzzwxh:13697klzzwxh:13698 davklzzwxh:13672lockklzzwxh:13673dstklzzwxh:13674path, klzzwxh:13699src-klzzwxh:13700lockklzzwxh:13675expire, klzzwxh:13701src-klzzwxh:13702remoteklzzwxh:13676existsklzzwxh:13677;klzzwxh:13717klzzwxh:13703klzzwxh:13704klzzwxh:13705 if klzzwxh:13678klzzwxh:13679isklzzwxh:13680createdklzzwxh:13681srcklzzwxh:13682 klzzwxh:13706klzzwxh:13707 klzzwxh:13683src-klzzwxh:13708mode klzzwxh:13709 klzzwxh:13684Sklzzwxh:13685IXUSR | Sklzzwxh:13686IXGRP | Sklzzwxh:13687IXOTHklzzwxh:13688klzzwxh:13689klzzwxh:13690klzzwxh:13718klzzwxh:13710klzzwxh:13711klzzwxh:13712klzzwxh:13713klzzwxh:13714klzzwxh:13715klzzwxh:13716 davklzzwxh:13691setklzzwxh:13692executeklzzwxh:13693dstklzzwxh:13694path, 1klzzwxh:13695;

      klzzwxh:13737klzzwxh:13738klzzwxh:13739 freeklzzwxh:13719src-klzzwxh:13740nameklzzwxh:13720;klzzwxh:13780klzzwxh:13741klzzwxh:13742klzzwxh:13743 src-klzzwxh:13744name = neklzzwxh:13721strdupklzzwxh:13722dstklzzwxh:13723nameklzzwxh:13724;klzzwxh:13781klzzwxh:13745klzzwxh:13746klzzwxh:13747 freeklzzwxh:13725src-klzzwxh:13748pathklzzwxh:13726;klzzwxh:13782klzzwxh:13749klzzwxh:13750klzzwxh:13751 src-klzzwxh:13752path = dstklzzwxh:13727path;klzzwxh:13783klzzwxh:13753klzzwxh:13754klzzwxh:13755 if klzzwxh:13728src-klzzwxh:13756etag klzzwxh:13729= NULLklzzwxh:13730 klzzwxh:13731klzzwxh:13784klzzwxh:13757klzzwxh:13758klzzwxh:13759klzzwxh:13760klzzwxh:13761klzzwxh:13762klzzwxh:13763 freeklzzwxh:13732src-klzzwxh:13764etagklzzwxh:13733;klzzwxh:13785klzzwxh:13765klzzwxh:13766klzzwxh:13767klzzwxh:13768klzzwxh:13769klzzwxh:13770klzzwxh:13771 src-klzzwxh:13772etag = NULL;klzzwxh:13786klzzwxh:13773klzzwxh:13774klzzwxh:13775 klzzwxh:13734klzzwxh:13787klzzwxh:13776klzzwxh:13777klzzwxh:13778 src-klzzwxh:13779smtime = timeklzzwxh:13735NULLklzzwxh:13736;

      klzzwxh:13800klzzwxh:13801klzzwxh:13802 if klzzwxh:13788klzzwxh:13789isklzzwxh:13790createdklzzwxh:13791srcklzzwxh:13792klzzwxh:13793klzzwxh:13821klzzwxh:13803klzzwxh:13804klzzwxh:13805klzzwxh:13806klzzwxh:13807klzzwxh:13808klzzwxh:13809 davklzzwxh:13794headklzzwxh:13795src-klzzwxh:13810path, klzzwxh:13811src-klzzwxh:13812etag, klzzwxh:13813src-klzzwxh:13814smtime, NULL, klzzwxh:13815src-klzzwxh:13816mimeklzzwxh:13796typeklzzwxh:13797;klzzwxh:13822klzzwxh:13817klzzwxh:13818klzzwxh:13819 src-klzzwxh:13820utime = timeklzzwxh:13798NULLklzzwxh:13799;

      klzzwxh:13824klzzwxh:13825klzzwxh:13826 return 0;klzzwxh:13827klzzwxh:13823

      /klzzwxh:13828 Moves file src to dst using WebDAV method MOVE. klzzwxh:13829/klzzwxh:13862static int moveklzzwxh:13830regklzzwxh:13831davklzzwxh:13832node klzzwxh:13833src, davklzzwxh:13834node klzzwxh:13835dst, davklzzwxh:13836node klzzwxh:13837dstklzzwxh:13838parent,klzzwxh:13863klzzwxh:13843klzzwxh:13844klzzwxh:13845klzzwxh:13846klzzwxh:13847klzzwxh:13848klzzwxh:13849klzzwxh:13850klzzwxh:13851klzzwxh:13852klzzwxh:13853klzzwxh:13854klzzwxh:13855klzzwxh:13856klzzwxh:13857klzzwxh:13858klzzwxh:13859klzzwxh:13860klzzwxh:13861 const char klzzwxh:13839dstklzzwxh:13840nameklzzwxh:13841 klzzwxh:13842

      klzzwxh:13870klzzwxh:13871klzzwxh:13872 if klzzwxh:13864dst klzzwxh:13865= NULL klzzwxh:13873klzzwxh:13874 isklzzwxh:13866dirklzzwxh:13867dstklzzwxh:13868klzzwxh:13869klzzwxh:13882klzzwxh:13875klzzwxh:13876klzzwxh:13877klzzwxh:13878klzzwxh:13879klzzwxh:13880klzzwxh:13881 return EISDIR;

      klzzwxh:13913klzzwxh:13914klzzwxh:13915 char klzzwxh:13883dstklzzwxh:13884path;klzzwxh:13955klzzwxh:13916klzzwxh:13917klzzwxh:13918 if klzzwxh:13885dst == NULLklzzwxh:13886 klzzwxh:13887klzzwxh:13956klzzwxh:13919klzzwxh:13920klzzwxh:13921klzzwxh:13922klzzwxh:13923klzzwxh:13924klzzwxh:13925 char klzzwxh:13888dstklzzwxh:13889conv = davklzzwxh:13890convklzzwxh:13891toklzzwxh:13892serverklzzwxh:13893encklzzwxh:13894dstklzzwxh:13895nameklzzwxh:13896;klzzwxh:13957klzzwxh:13926klzzwxh:13927klzzwxh:13928klzzwxh:13929klzzwxh:13930klzzwxh:13931klzzwxh:13932 dstklzzwxh:13897path = neklzzwxh:13898concatklzzwxh:13899dstklzzwxh:13900parent-klzzwxh:13933path, dstklzzwxh:13901name, NULLklzzwxh:13902;klzzwxh:13958klzzwxh:13934klzzwxh:13935klzzwxh:13936klzzwxh:13937klzzwxh:13938klzzwxh:13939klzzwxh:13940 freeklzzwxh:13903dstklzzwxh:13904convklzzwxh:13905;klzzwxh:13959klzzwxh:13941klzzwxh:13942klzzwxh:13943 klzzwxh:13906 else klzzwxh:13907klzzwxh:13960klzzwxh:13944klzzwxh:13945klzzwxh:13946klzzwxh:13947klzzwxh:13948klzzwxh:13949klzzwxh:13950 dstklzzwxh:13908path = neklzzwxh:13909strdupklzzwxh:13910dst-klzzwxh:13951pathklzzwxh:13911;klzzwxh:13961klzzwxh:13952klzzwxh:13953klzzwxh:13954 klzzwxh:13912

      klzzwxh:13974klzzwxh:13975klzzwxh:13976 if klzzwxh:13962davklzzwxh:13963moveklzzwxh:13964src-klzzwxh:13977path, dstklzzwxh:13965pathklzzwxh:13966 klzzwxh:13967= 0klzzwxh:13968 klzzwxh:13969klzzwxh:13995klzzwxh:13978klzzwxh:13979klzzwxh:13980klzzwxh:13981klzzwxh:13982klzzwxh:13983klzzwxh:13984 freeklzzwxh:13970dstklzzwxh:13971pathklzzwxh:13972;klzzwxh:13996klzzwxh:13985klzzwxh:13986klzzwxh:13987klzzwxh:13988klzzwxh:13989klzzwxh:13990klzzwxh:13991 return EIO;klzzwxh:13997klzzwxh:13992klzzwxh:13993klzzwxh:13994 klzzwxh:13973

      klzzwxh:14065klzzwxh:14066klzzwxh:14067 if klzzwxh:13998isklzzwxh:13999lockedklzzwxh:14000srcklzzwxh:14001klzzwxh:14002 klzzwxh:14003klzzwxh:14242klzzwxh:14068klzzwxh:14069klzzwxh:14070klzzwxh:14071klzzwxh:14072klzzwxh:14073klzzwxh:14074 src-klzzwxh:14075lockklzzwxh:14004expire = 0;klzzwxh:14243klzzwxh:14076klzzwxh:14077klzzwxh:14078klzzwxh:14079klzzwxh:14080klzzwxh:14081klzzwxh:14082 if klzzwxh:14005isklzzwxh:14006dirtyklzzwxh:14007srcklzzwxh:14008klzzwxh:14009klzzwxh:14244klzzwxh:14083klzzwxh:14084klzzwxh:14085klzzwxh:14086klzzwxh:14087klzzwxh:14088klzzwxh:14089klzzwxh:14090klzzwxh:14091klzzwxh:14092klzzwxh:14093 davklzzwxh:14010lockklzzwxh:14011dstklzzwxh:14012path, klzzwxh:14094src-klzzwxh:14095lockklzzwxh:14013expire, klzzwxh:14096src-klzzwxh:14097remoteklzzwxh:14014existsklzzwxh:14015;klzzwxh:14245klzzwxh:14098klzzwxh:14099klzzwxh:14100 klzzwxh:14016klzzwxh:14246klzzwxh:14101klzzwxh:14102klzzwxh:14103 if klzzwxh:14017isklzzwxh:14018cachedklzzwxh:14019srcklzzwxh:14020klzzwxh:14021klzzwxh:14247klzzwxh:14104klzzwxh:14105klzzwxh:14106klzzwxh:14107klzzwxh:14108klzzwxh:14109klzzwxh:14110 davklzzwxh:14022headklzzwxh:14023dstklzzwxh:14024path, klzzwxh:14111src-klzzwxh:14112etag, klzzwxh:14113src-klzzwxh:14114smtime, NULL, klzzwxh:14115src-klzzwxh:14116mimeklzzwxh:14025typeklzzwxh:14026;klzzwxh:14248klzzwxh:14117klzzwxh:14118klzzwxh:14119 if klzzwxh:14027dst klzzwxh:14028= NULLklzzwxh:14029 klzzwxh:14030klzzwxh:14249klzzwxh:14120klzzwxh:14121klzzwxh:14122klzzwxh:14123klzzwxh:14124klzzwxh:14125klzzwxh:14126 removeklzzwxh:14031fromklzzwxh:14032treeklzzwxh:14033dstklzzwxh:14034;klzzwxh:14250klzzwxh:14127klzzwxh:14128klzzwxh:14129klzzwxh:14130klzzwxh:14131klzzwxh:14132klzzwxh:14133 removeklzzwxh:14035fromklzzwxh:14036changedklzzwxh:14037dstklzzwxh:14038;klzzwxh:14251klzzwxh:14134klzzwxh:14135klzzwxh:14136klzzwxh:14137klzzwxh:14138klzzwxh:14139klzzwxh:14140 if klzzwxh:14039isklzzwxh:14040openklzzwxh:14041dstklzzwxh:14042klzzwxh:14043 klzzwxh:14044klzzwxh:14252klzzwxh:14141klzzwxh:14142klzzwxh:14143klzzwxh:14144klzzwxh:14145klzzwxh:14146klzzwxh:14147klzzwxh:14148klzzwxh:14149klzzwxh:14150klzzwxh:14151 if klzzwxh:14045debugklzzwxh:14046klzzwxh:14253klzzwxh:14152klzzwxh:14153klzzwxh:14154klzzwxh:14155klzzwxh:14156klzzwxh:14157klzzwxh:14158klzzwxh:14159klzzwxh:14160klzzwxh:14161klzzwxh:14162klzzwxh:14163klzzwxh:14164klzzwxh:14165klzzwxh:14166 syslogklzzwxh:14047LOGklzzwxh:14048MAKEPRIklzzwxh:14049LOGklzzwxh:14050DAEMON, LOGklzzwxh:14051DEBUGklzzwxh:14052,klzzwxh:14254klzzwxh:14167klzzwxh:14168klzzwxh:14169klzzwxh:14170klzzwxh:14171klzzwxh:14172klzzwxh:14173klzzwxh:14174klzzwxh:14175klzzwxh:14176klzzwxh:14177klzzwxh:14178klzzwxh:14179klzzwxh:14180klzzwxh:14181klzzwxh:14182klzzwxh:14183klzzwxh:14184klzzwxh:14185klzzwxh:14186klzzwxh:14187klzzwxh:14188 klzzwxh:14189invalidating node %pklzzwxh:14190, dstklzzwxh:14053;klzzwxh:14255klzzwxh:14191klzzwxh:14192klzzwxh:14193klzzwxh:14194klzzwxh:14195klzzwxh:14196klzzwxh:14197klzzwxh:14198klzzwxh:14199klzzwxh:14200klzzwxh:14201 dst-klzzwxh:14202parent = NULL;klzzwxh:14256klzzwxh:14203klzzwxh:14204klzzwxh:14205klzzwxh:14206klzzwxh:14207klzzwxh:14208klzzwxh:14209 klzzwxh:14054 else klzzwxh:14055klzzwxh:14257klzzwxh:14210klzzwxh:14211klzzwxh:14212klzzwxh:14213klzzwxh:14214klzzwxh:14215klzzwxh:14216klzzwxh:14217klzzwxh:14218klzzwxh:14219klzzwxh:14220 removeklzzwxh:14056fromklzzwxh:14057tableklzzwxh:14058dstklzzwxh:14059;klzzwxh:14258klzzwxh:14221klzzwxh:14222klzzwxh:14223klzzwxh:14224klzzwxh:14225klzzwxh:14226klzzwxh:14227klzzwxh:14228klzzwxh:14229klzzwxh:14230klzzwxh:14231 deleteklzzwxh:14060nodeklzzwxh:14061dstklzzwxh:14062;klzzwxh:14259klzzwxh:14232klzzwxh:14233klzzwxh:14234klzzwxh:14235klzzwxh:14236klzzwxh:14237klzzwxh:14238 klzzwxh:14063klzzwxh:14260klzzwxh:14239klzzwxh:14240klzzwxh:14241 klzzwxh:14064

      klzzwxh:14270klzzwxh:14271klzzwxh:14272 freeklzzwxh:14261src-klzzwxh:14273nameklzzwxh:14262;klzzwxh:14290klzzwxh:14274klzzwxh:14275klzzwxh:14276 src-klzzwxh:14277name = neklzzwxh:14263strdupklzzwxh:14264dstklzzwxh:14265nameklzzwxh:14266;klzzwxh:14291klzzwxh:14278klzzwxh:14279klzzwxh:14280 freeklzzwxh:14267src-klzzwxh:14281pathklzzwxh:14268;klzzwxh:14292klzzwxh:14282klzzwxh:14283klzzwxh:14284 src-klzzwxh:14285path = dstklzzwxh:14269path;klzzwxh:14293klzzwxh:14286klzzwxh:14287klzzwxh:14288 src-klzzwxh:14289utime = 0;

      klzzwxh:14295klzzwxh:14296klzzwxh:14297 return 0;klzzwxh:14298klzzwxh:14294

      /klzzwxh:14299 Creates a new node. mode must have the Iklzzwxh:14300ISDIR or Iklzzwxh:14301ISREG bit set.klzzwxh:14329klzzwxh:14312klzzwxh:14313 node-klzzwxh:14314mode is set to mode, but checked against the umask. All otherklzzwxh:14330klzzwxh:14315klzzwxh:14316 members are set to reasonable defaults. The new node will be insertedklzzwxh:14331klzzwxh:14317klzzwxh:14318 into the child list of parent and the hash table. Member nref of theklzzwxh:14332klzzwxh:14319klzzwxh:14320 parent will be updated.klzzwxh:14333klzzwxh:14321klzzwxh:14322 parent : The parent of the new node, may be NULL.klzzwxh:14334klzzwxh:14323klzzwxh:14324 modeklzzwxh:14325klzzwxh:14326 : Tthe mode of the new node.klzzwxh:14335klzzwxh:14327klzzwxh:14328 return value : A pointer to the new node. klzzwxh:14302/klzzwxh:14336static davklzzwxh:14303node klzzwxh:14304newklzzwxh:14305nodeklzzwxh:14306davklzzwxh:14307node klzzwxh:14308parent, modeklzzwxh:14309t modeklzzwxh:14310 klzzwxh:14311

      klzzwxh:14349klzzwxh:14350klzzwxh:14351 davklzzwxh:14337node klzzwxh:14338node = klzzwxh:14339davklzzwxh:14340node klzzwxh:14341klzzwxh:14342 neklzzwxh:14343mallocklzzwxh:14344sizeofklzzwxh:14345davklzzwxh:14346nodeklzzwxh:14347klzzwxh:14348;

      klzzwxh:14364klzzwxh:14365klzzwxh:14366 node-klzzwxh:14367parent = parent;klzzwxh:14425klzzwxh:14368klzzwxh:14369klzzwxh:14370 node-klzzwxh:14371childs = NULL;klzzwxh:14426klzzwxh:14372klzzwxh:14373klzzwxh:14374 if klzzwxh:14352parent klzzwxh:14353= NULLklzzwxh:14354 klzzwxh:14355klzzwxh:14427klzzwxh:14375klzzwxh:14376klzzwxh:14377klzzwxh:14378klzzwxh:14379klzzwxh:14380klzzwxh:14381 if klzzwxh:14356Sklzzwxh:14357ISDIRklzzwxh:14358modeklzzwxh:14359klzzwxh:14360klzzwxh:14428klzzwxh:14382klzzwxh:14383klzzwxh:14384klzzwxh:14385klzzwxh:14386klzzwxh:14387klzzwxh:14388klzzwxh:14389klzzwxh:14390klzzwxh:14391klzzwxh:14392 ++parent-klzzwxh:14393nref;klzzwxh:14429klzzwxh:14394klzzwxh:14395klzzwxh:14396klzzwxh:14397klzzwxh:14398klzzwxh:14399klzzwxh:14400 node-klzzwxh:14401next = parent-klzzwxh:14402childs;klzzwxh:14430klzzwxh:14403klzzwxh:14404klzzwxh:14405klzzwxh:14406klzzwxh:14407klzzwxh:14408klzzwxh:14409 parent-klzzwxh:14410childs = node;klzzwxh:14431klzzwxh:14411klzzwxh:14412klzzwxh:14413 klzzwxh:14361 else klzzwxh:14362klzzwxh:14432klzzwxh:14414klzzwxh:14415klzzwxh:14416klzzwxh:14417klzzwxh:14418klzzwxh:14419klzzwxh:14420 node-klzzwxh:14421next = NULL;klzzwxh:14433klzzwxh:14422klzzwxh:14423klzzwxh:14424 klzzwxh:14363

      klzzwxh:14446klzzwxh:14447klzzwxh:14448 sizeklzzwxh:14434t i = klzzwxh:14435klzzwxh:14436sizeklzzwxh:14437tklzzwxh:14438 node / alignmentklzzwxh:14439 % tableklzzwxh:14440size;klzzwxh:14456klzzwxh:14449klzzwxh:14450klzzwxh:14451 node-klzzwxh:14452tableklzzwxh:14441next = tableklzzwxh:14442iklzzwxh:14443;klzzwxh:14457klzzwxh:14453klzzwxh:14454klzzwxh:14455 tableklzzwxh:14444iklzzwxh:14445 = node;

      klzzwxh:14460klzzwxh:14461klzzwxh:14462 node-klzzwxh:14463path = NULL;klzzwxh:14488klzzwxh:14464klzzwxh:14465klzzwxh:14466 node-klzzwxh:14467name = NULL;klzzwxh:14489klzzwxh:14468klzzwxh:14469klzzwxh:14470 node-klzzwxh:14471cacheklzzwxh:14458path = NULL;klzzwxh:14490klzzwxh:14472klzzwxh:14473klzzwxh:14474 node-klzzwxh:14475etag = NULL;klzzwxh:14491klzzwxh:14476klzzwxh:14477klzzwxh:14478 node-klzzwxh:14479mimeklzzwxh:14459type = NULL;klzzwxh:14492klzzwxh:14480klzzwxh:14481klzzwxh:14482 node-klzzwxh:14483handles = NULL;klzzwxh:14493klzzwxh:14484klzzwxh:14485klzzwxh:14486 node-klzzwxh:14487size = 0;

      klzzwxh:14497klzzwxh:14498klzzwxh:14499 node-klzzwxh:14500atime = timeklzzwxh:14494NULLklzzwxh:14495;klzzwxh:14523klzzwxh:14501klzzwxh:14502klzzwxh:14503 node-klzzwxh:14504mtime = node-klzzwxh:14505atime;klzzwxh:14524klzzwxh:14506klzzwxh:14507klzzwxh:14508 node-klzzwxh:14509ctime = node-klzzwxh:14510atime;klzzwxh:14525klzzwxh:14511klzzwxh:14512klzzwxh:14513 node-klzzwxh:14514utime = 0;klzzwxh:14526klzzwxh:14515klzzwxh:14516klzzwxh:14517 node-klzzwxh:14518smtime = 0;klzzwxh:14527klzzwxh:14519klzzwxh:14520klzzwxh:14521 node-klzzwxh:14522lockklzzwxh:14496expire = 0;

      klzzwxh:14542klzzwxh:14543klzzwxh:14544 if klzzwxh:14528Sklzzwxh:14529ISDIRklzzwxh:14530modeklzzwxh:14531klzzwxh:14532 klzzwxh:14533klzzwxh:14601klzzwxh:14545klzzwxh:14546klzzwxh:14547klzzwxh:14548klzzwxh:14549klzzwxh:14550klzzwxh:14551 node-klzzwxh:14552mode = mode klzzwxh:14553 ~dirklzzwxh:14534umask;klzzwxh:14602klzzwxh:14554klzzwxh:14555klzzwxh:14556klzzwxh:14557klzzwxh:14558klzzwxh:14559klzzwxh:14560 node-klzzwxh:14561nref = 2;klzzwxh:14603klzzwxh:14562klzzwxh:14563klzzwxh:14564 klzzwxh:14535 else klzzwxh:14536klzzwxh:14604klzzwxh:14565klzzwxh:14566klzzwxh:14567klzzwxh:14568klzzwxh:14569klzzwxh:14570klzzwxh:14571 node-klzzwxh:14572mode = mode klzzwxh:14573 ~fileklzzwxh:14537umask;klzzwxh:14605klzzwxh:14574klzzwxh:14575klzzwxh:14576klzzwxh:14577klzzwxh:14578klzzwxh:14579klzzwxh:14580 node-klzzwxh:14581nref = 1;klzzwxh:14606klzzwxh:14582klzzwxh:14583klzzwxh:14584 klzzwxh:14538klzzwxh:14607klzzwxh:14585klzzwxh:14586klzzwxh:14587 node-klzzwxh:14588remoteklzzwxh:14539exists = 0;klzzwxh:14608klzzwxh:14589klzzwxh:14590klzzwxh:14591 node-klzzwxh:14592dirty = 0;klzzwxh:14609klzzwxh:14593klzzwxh:14594klzzwxh:14595 node-klzzwxh:14596uid = defaultklzzwxh:14540uid;klzzwxh:14610klzzwxh:14597klzzwxh:14598klzzwxh:14599 node-klzzwxh:14600gid = defaultklzzwxh:14541gid;

      klzzwxh:14621klzzwxh:14622klzzwxh:14623 if klzzwxh:14611debugklzzwxh:14612klzzwxh:14655klzzwxh:14624klzzwxh:14625klzzwxh:14626klzzwxh:14627klzzwxh:14628klzzwxh:14629klzzwxh:14630 syslogklzzwxh:14613LOGklzzwxh:14614MAKEPRIklzzwxh:14615LOGklzzwxh:14616DAEMON, LOGklzzwxh:14617DEBUGklzzwxh:14618, klzzwxh:14631new node: %p-klzzwxh:14632%pklzzwxh:14633,klzzwxh:14656klzzwxh:14634klzzwxh:14635klzzwxh:14636klzzwxh:14637klzzwxh:14638klzzwxh:14639klzzwxh:14640klzzwxh:14641klzzwxh:14642klzzwxh:14643klzzwxh:14644klzzwxh:14645klzzwxh:14646klzzwxh:14647 node-klzzwxh:14648parent, nodeklzzwxh:14619;klzzwxh:14657klzzwxh:14649klzzwxh:14650klzzwxh:14651 nnodes++;klzzwxh:14658klzzwxh:14652klzzwxh:14653klzzwxh:14654 return node;klzzwxh:14659klzzwxh:14620

      /klzzwxh:14660 Removes a node from the list of changed nodes. klzzwxh:14661/klzzwxh:14669static void removeklzzwxh:14662fromklzzwxh:14663changedklzzwxh:14664davklzzwxh:14665node klzzwxh:14666nodeklzzwxh:14667 klzzwxh:14668

      klzzwxh:14702klzzwxh:14703klzzwxh:14704 davklzzwxh:14670nodeklzzwxh:14671listklzzwxh:14672item klzzwxh:14673klzzwxh:14674chp = klzzwxh:14705changed;klzzwxh:14756klzzwxh:14706klzzwxh:14707klzzwxh:14708 while klzzwxh:14675klzzwxh:14676chp klzzwxh:14709klzzwxh:14710 klzzwxh:14677klzzwxh:14678chpklzzwxh:14679-klzzwxh:14711node klzzwxh:14680= nodeklzzwxh:14681klzzwxh:14757klzzwxh:14712klzzwxh:14713klzzwxh:14714klzzwxh:14715klzzwxh:14716klzzwxh:14717klzzwxh:14718 chp = klzzwxh:14719klzzwxh:14682klzzwxh:14683chpklzzwxh:14684-klzzwxh:14720next;klzzwxh:14758klzzwxh:14721klzzwxh:14722klzzwxh:14723 if klzzwxh:14685klzzwxh:14686chpklzzwxh:14687 klzzwxh:14688klzzwxh:14759klzzwxh:14724klzzwxh:14725klzzwxh:14726klzzwxh:14727klzzwxh:14728klzzwxh:14729klzzwxh:14730 davklzzwxh:14689nodeklzzwxh:14690listklzzwxh:14691item klzzwxh:14692tofree = klzzwxh:14693chp;klzzwxh:14760klzzwxh:14731klzzwxh:14732klzzwxh:14733klzzwxh:14734klzzwxh:14735klzzwxh:14736klzzwxh:14737 klzzwxh:14694chp = klzzwxh:14695klzzwxh:14696chpklzzwxh:14697-klzzwxh:14738next;klzzwxh:14761klzzwxh:14739klzzwxh:14740klzzwxh:14741klzzwxh:14742klzzwxh:14743klzzwxh:14744klzzwxh:14745 freeklzzwxh:14698tofreeklzzwxh:14699;klzzwxh:14762klzzwxh:14746klzzwxh:14747klzzwxh:14748klzzwxh:14749klzzwxh:14750klzzwxh:14751klzzwxh:14752 nchanged--;klzzwxh:14763klzzwxh:14753klzzwxh:14754klzzwxh:14755 klzzwxh:14700klzzwxh:14764klzzwxh:14701

      /klzzwxh:14765 Removes a node from the hash table. The root node can not be removed. klzzwxh:14766/klzzwxh:14774static void removeklzzwxh:14767fromklzzwxh:14768tableklzzwxh:14769davklzzwxh:14770node klzzwxh:14771nodeklzzwxh:14772 klzzwxh:14773

      klzzwxh:14777klzzwxh:14778klzzwxh:14779 if klzzwxh:14775node == rootklzzwxh:14776klzzwxh:14787klzzwxh:14780klzzwxh:14781klzzwxh:14782klzzwxh:14783klzzwxh:14784klzzwxh:14785klzzwxh:14786 return;

      klzzwxh:14820klzzwxh:14821klzzwxh:14822 sizeklzzwxh:14788t i = klzzwxh:14789klzzwxh:14790sizeklzzwxh:14791tklzzwxh:14792 node / alignmentklzzwxh:14793 % tableklzzwxh:14794size;klzzwxh:14852klzzwxh:14823klzzwxh:14824klzzwxh:14825 davklzzwxh:14795node klzzwxh:14796klzzwxh:14797np = klzzwxh:14826tableklzzwxh:14798iklzzwxh:14799;klzzwxh:14853klzzwxh:14827klzzwxh:14828klzzwxh:14829 while klzzwxh:14800klzzwxh:14801np klzzwxh:14802= NULL klzzwxh:14830klzzwxh:14831 klzzwxh:14803np klzzwxh:14804= nodeklzzwxh:14805klzzwxh:14854klzzwxh:14832klzzwxh:14833klzzwxh:14834klzzwxh:14835klzzwxh:14836klzzwxh:14837klzzwxh:14838 np = klzzwxh:14839klzzwxh:14806klzzwxh:14807npklzzwxh:14808-klzzwxh:14840tableklzzwxh:14809next;klzzwxh:14855klzzwxh:14841klzzwxh:14842klzzwxh:14843 if klzzwxh:14810klzzwxh:14811np klzzwxh:14812= NULLklzzwxh:14813klzzwxh:14856klzzwxh:14844klzzwxh:14845klzzwxh:14846klzzwxh:14847klzzwxh:14848klzzwxh:14849klzzwxh:14850 klzzwxh:14814np = klzzwxh:14815klzzwxh:14816npklzzwxh:14817-klzzwxh:14851tableklzzwxh:14818next;klzzwxh:14857klzzwxh:14819

      /klzzwxh:14858 Removes a node from the directory tree. The root node can not be removed.klzzwxh:14871klzzwxh:14867klzzwxh:14868 If node is a directory, member nref of the parent will be decremented.klzzwxh:14872klzzwxh:14869klzzwxh:14870 But no other attributes of the parent directory will be changed. klzzwxh:14859/klzzwxh:14873static void removeklzzwxh:14860fromklzzwxh:14861treeklzzwxh:14862davklzzwxh:14863node klzzwxh:14864nodeklzzwxh:14865 klzzwxh:14866

      klzzwxh:14876klzzwxh:14877klzzwxh:14878 if klzzwxh:14874node == rootklzzwxh:14875klzzwxh:14886klzzwxh:14879klzzwxh:14880klzzwxh:14881klzzwxh:14882klzzwxh:14883klzzwxh:14884klzzwxh:14885 return;

      klzzwxh:14912klzzwxh:14913klzzwxh:14914 davklzzwxh:14887node klzzwxh:14888klzzwxh:14889np = klzzwxh:14915node-klzzwxh:14916parent-klzzwxh:14917childs;klzzwxh:14966klzzwxh:14918klzzwxh:14919klzzwxh:14920 while klzzwxh:14890klzzwxh:14891np klzzwxh:14892= NULL klzzwxh:14921klzzwxh:14922 klzzwxh:14893np klzzwxh:14894= nodeklzzwxh:14895klzzwxh:14967klzzwxh:14923klzzwxh:14924klzzwxh:14925klzzwxh:14926klzzwxh:14927klzzwxh:14928klzzwxh:14929 np = klzzwxh:14930klzzwxh:14896klzzwxh:14897npklzzwxh:14898-klzzwxh:14931next;klzzwxh:14968klzzwxh:14932klzzwxh:14933klzzwxh:14934 if klzzwxh:14899klzzwxh:14900np klzzwxh:14901= NULLklzzwxh:14902 klzzwxh:14903klzzwxh:14969klzzwxh:14935klzzwxh:14936klzzwxh:14937klzzwxh:14938klzzwxh:14939klzzwxh:14940klzzwxh:14941 klzzwxh:14904np = node-klzzwxh:14942next;klzzwxh:14970klzzwxh:14943klzzwxh:14944klzzwxh:14945klzzwxh:14946klzzwxh:14947klzzwxh:14948klzzwxh:14949 if klzzwxh:14905isklzzwxh:14906dirklzzwxh:14907nodeklzzwxh:14908klzzwxh:14909klzzwxh:14971klzzwxh:14950klzzwxh:14951klzzwxh:14952klzzwxh:14953klzzwxh:14954klzzwxh:14955klzzwxh:14956klzzwxh:14957klzzwxh:14958klzzwxh:14959klzzwxh:14960 --node-klzzwxh:14961parent-klzzwxh:14962nref;klzzwxh:14972klzzwxh:14963klzzwxh:14964klzzwxh:14965 klzzwxh:14910klzzwxh:14973klzzwxh:14911

      /klzzwxh:14974 Frees locks, removes the node from the tree and from the hash table,klzzwxh:15004klzzwxh:14982klzzwxh:14983 and deletes it.klzzwxh:15005klzzwxh:14984klzzwxh:14985 Depending on the kind of node and its state additional action will be taken:klzzwxh:15006klzzwxh:14986klzzwxh:14987 - For directories the complete tree below is removed too.klzzwxh:15007klzzwxh:14988klzzwxh:14989 - If a regular file is dirty, open for writing or created, a backup inklzzwxh:15008klzzwxh:14990klzzwxh:14991klzzwxh:14992klzzwxh:14993 driectory backup will be created, that holds the cached local copy of theklzzwxh:15009klzzwxh:14994klzzwxh:14995klzzwxh:14996klzzwxh:14997 file.klzzwxh:15010klzzwxh:14998klzzwxh:14999 - If a file is open, it will not be removed from the hash table to allowklzzwxh:15011klzzwxh:15000klzzwxh:15001klzzwxh:15002klzzwxh:15003 proper closing of open file descriptors. klzzwxh:14975/klzzwxh:15012static void removeklzzwxh:14976nodeklzzwxh:14977davklzzwxh:14978node klzzwxh:14979nodeklzzwxh:14980 klzzwxh:14981

      klzzwxh:15017klzzwxh:15018klzzwxh:15019 removeklzzwxh:15013fromklzzwxh:15014treeklzzwxh:15015nodeklzzwxh:15016;

      klzzwxh:15026klzzwxh:15027klzzwxh:15028 if klzzwxh:15020isklzzwxh:15021dirklzzwxh:15022nodeklzzwxh:15023klzzwxh:15024 klzzwxh:15025

      klzzwxh:15042klzzwxh:15043klzzwxh:15044klzzwxh:15045klzzwxh:15046klzzwxh:15047klzzwxh:15048 while klzzwxh:15029node-klzzwxh:15049childs klzzwxh:15030= NULLklzzwxh:15031klzzwxh:15076klzzwxh:15050klzzwxh:15051klzzwxh:15052klzzwxh:15053klzzwxh:15054klzzwxh:15055klzzwxh:15056klzzwxh:15057klzzwxh:15058klzzwxh:15059klzzwxh:15060 removeklzzwxh:15032nodeklzzwxh:15033node-klzzwxh:15061childsklzzwxh:15034;klzzwxh:15077klzzwxh:15062klzzwxh:15063klzzwxh:15064klzzwxh:15065klzzwxh:15066klzzwxh:15067klzzwxh:15068 removeklzzwxh:15035fromklzzwxh:15036tableklzzwxh:15037nodeklzzwxh:15038;klzzwxh:15078klzzwxh:15069klzzwxh:15070klzzwxh:15071klzzwxh:15072klzzwxh:15073klzzwxh:15074klzzwxh:15075 deleteklzzwxh:15039nodeklzzwxh:15040nodeklzzwxh:15041;

      klzzwxh:15081klzzwxh:15082klzzwxh:15083 klzzwxh:15079 else klzzwxh:15080

      klzzwxh:15088klzzwxh:15089klzzwxh:15090klzzwxh:15091klzzwxh:15092klzzwxh:15093klzzwxh:15094 removeklzzwxh:15084fromklzzwxh:15085changedklzzwxh:15086nodeklzzwxh:15087;

      klzzwxh:15104klzzwxh:15105klzzwxh:15106klzzwxh:15107klzzwxh:15108klzzwxh:15109klzzwxh:15110 if klzzwxh:15095isklzzwxh:15096lockedklzzwxh:15097nodeklzzwxh:15098klzzwxh:15099klzzwxh:15125klzzwxh:15111klzzwxh:15112klzzwxh:15113klzzwxh:15114klzzwxh:15115klzzwxh:15116klzzwxh:15117klzzwxh:15118klzzwxh:15119klzzwxh:15120klzzwxh:15121 davklzzwxh:15100unlockklzzwxh:15101node-klzzwxh:15122path, klzzwxh:15123node-klzzwxh:15124lockklzzwxh:15102expireklzzwxh:15103;

      klzzwxh:15141klzzwxh:15142klzzwxh:15143klzzwxh:15144klzzwxh:15145klzzwxh:15146klzzwxh:15147 if klzzwxh:15126isklzzwxh:15127dirtyklzzwxh:15128nodeklzzwxh:15129 || isklzzwxh:15130openklzzwxh:15131writeklzzwxh:15132nodeklzzwxh:15133 || isklzzwxh:15134createdklzzwxh:15135nodeklzzwxh:15136klzzwxh:15137klzzwxh:15159klzzwxh:15148klzzwxh:15149klzzwxh:15150klzzwxh:15151klzzwxh:15152klzzwxh:15153klzzwxh:15154klzzwxh:15155klzzwxh:15156klzzwxh:15157klzzwxh:15158 backupklzzwxh:15138nodeklzzwxh:15139nodeklzzwxh:15140;

      klzzwxh:15186klzzwxh:15187klzzwxh:15188klzzwxh:15189klzzwxh:15190klzzwxh:15191klzzwxh:15192 if klzzwxh:15160isklzzwxh:15161openklzzwxh:15162nodeklzzwxh:15163klzzwxh:15164 klzzwxh:15165klzzwxh:15315klzzwxh:15193klzzwxh:15194klzzwxh:15195klzzwxh:15196klzzwxh:15197klzzwxh:15198klzzwxh:15199klzzwxh:15200klzzwxh:15201klzzwxh:15202klzzwxh:15203 if klzzwxh:15166debugklzzwxh:15167klzzwxh:15316klzzwxh:15204klzzwxh:15205klzzwxh:15206klzzwxh:15207klzzwxh:15208klzzwxh:15209klzzwxh:15210klzzwxh:15211klzzwxh:15212klzzwxh:15213klzzwxh:15214klzzwxh:15215klzzwxh:15216klzzwxh:15217klzzwxh:15218 syslogklzzwxh:15168LOGklzzwxh:15169MAKEPRIklzzwxh:15170LOGklzzwxh:15171DAEMON, LOGklzzwxh:15172DEBUGklzzwxh:15173,klzzwxh:15317klzzwxh:15219klzzwxh:15220klzzwxh:15221klzzwxh:15222klzzwxh:15223klzzwxh:15224klzzwxh:15225klzzwxh:15226klzzwxh:15227klzzwxh:15228klzzwxh:15229klzzwxh:15230klzzwxh:15231klzzwxh:15232klzzwxh:15233klzzwxh:15234klzzwxh:15235klzzwxh:15236klzzwxh:15237klzzwxh:15238klzzwxh:15239klzzwxh:15240 klzzwxh:15241invalidating node %pklzzwxh:15242, nodeklzzwxh:15174;klzzwxh:15318klzzwxh:15243klzzwxh:15244klzzwxh:15245klzzwxh:15246klzzwxh:15247klzzwxh:15248klzzwxh:15249klzzwxh:15250klzzwxh:15251klzzwxh:15252klzzwxh:15253 node-klzzwxh:15254parent = NULL;klzzwxh:15319klzzwxh:15255klzzwxh:15256klzzwxh:15257klzzwxh:15258klzzwxh:15259klzzwxh:15260klzzwxh:15261klzzwxh:15262klzzwxh:15263klzzwxh:15264klzzwxh:15265 node-klzzwxh:15266dirty = 0;klzzwxh:15320klzzwxh:15267klzzwxh:15268klzzwxh:15269klzzwxh:15270klzzwxh:15271klzzwxh:15272klzzwxh:15273klzzwxh:15274klzzwxh:15275klzzwxh:15276klzzwxh:15277 node-klzzwxh:15278remoteklzzwxh:15175exists = 0;klzzwxh:15321klzzwxh:15279klzzwxh:15280klzzwxh:15281klzzwxh:15282klzzwxh:15283klzzwxh:15284klzzwxh:15285 klzzwxh:15176 else klzzwxh:15177klzzwxh:15322klzzwxh:15286klzzwxh:15287klzzwxh:15288klzzwxh:15289klzzwxh:15290klzzwxh:15291klzzwxh:15292klzzwxh:15293klzzwxh:15294klzzwxh:15295klzzwxh:15296 removeklzzwxh:15178fromklzzwxh:15179tableklzzwxh:15180nodeklzzwxh:15181;klzzwxh:15323klzzwxh:15297klzzwxh:15298klzzwxh:15299klzzwxh:15300klzzwxh:15301klzzwxh:15302klzzwxh:15303klzzwxh:15304klzzwxh:15305klzzwxh:15306klzzwxh:15307 deleteklzzwxh:15182nodeklzzwxh:15183nodeklzzwxh:15184;klzzwxh:15324klzzwxh:15308klzzwxh:15309klzzwxh:15310klzzwxh:15311klzzwxh:15312klzzwxh:15313klzzwxh:15314 klzzwxh:15185

      klzzwxh:15326klzzwxh:15327klzzwxh:15328 klzzwxh:15325

      klzzwxh:15329

      /klzzwxh:15330 Gets a property list from the server and updates node dir and its childsklzzwxh:15359klzzwxh:15339klzzwxh:15340 accordingly.klzzwxh:15360klzzwxh:15341klzzwxh:15342 If there are inconsistencies between the information from the server andklzzwxh:15361klzzwxh:15343klzzwxh:15344 the locally stored state, the local information is updated. Backups areklzzwxh:15362klzzwxh:15345klzzwxh:15346 created if necessary.klzzwxh:15363klzzwxh:15347klzzwxh:15348 This will only be done if the utime of dear is reached, otherwise thisklzzwxh:15364klzzwxh:15349klzzwxh:15350 function will do nothing.klzzwxh:15365klzzwxh:15351klzzwxh:15352 utime and retry will be updated.klzzwxh:15366klzzwxh:15353klzzwxh:15354 If the contents or the mtime of the dir has changed, the dir-cache-fileklzzwxh:15367klzzwxh:15355klzzwxh:15356 will be deleted and the flush flag will be set to force new lookupsklzzwxh:15368klzzwxh:15357klzzwxh:15358 by the kernel. klzzwxh:15331/klzzwxh:15369static int updateklzzwxh:15332directoryklzzwxh:15333davklzzwxh:15334node klzzwxh:15335dir, timeklzzwxh:15336t refreshklzzwxh:15337 klzzwxh:15338

      klzzwxh:15376klzzwxh:15377klzzwxh:15378 if klzzwxh:15370dir == backup || timeklzzwxh:15371NULLklzzwxh:15372 klzzwxh:15379= klzzwxh:15373dir-klzzwxh:15380utime + refreshklzzwxh:15374klzzwxh:15375klzzwxh:15388klzzwxh:15381klzzwxh:15382klzzwxh:15383klzzwxh:15384klzzwxh:15385klzzwxh:15386klzzwxh:15387 return 0;

      klzzwxh:15395klzzwxh:15396klzzwxh:15397 davklzzwxh:15389props klzzwxh:15390props = NULL;klzzwxh:15403klzzwxh:15398klzzwxh:15399klzzwxh:15400 int ret = davklzzwxh:15391getklzzwxh:15392collectionklzzwxh:15393dir-klzzwxh:15401path, klzzwxh:15402propsklzzwxh:15394;

      klzzwxh:15432klzzwxh:15433klzzwxh:15434 dir-klzzwxh:15435utime = timeklzzwxh:15404NULLklzzwxh:15405;klzzwxh:15525klzzwxh:15436klzzwxh:15437klzzwxh:15438 if klzzwxh:15406ret klzzwxh:15407= 0klzzwxh:15408 klzzwxh:15409klzzwxh:15526klzzwxh:15439klzzwxh:15440klzzwxh:15441klzzwxh:15442klzzwxh:15443klzzwxh:15444klzzwxh:15445 if klzzwxh:15410retry == dirklzzwxh:15411refreshklzzwxh:15412 klzzwxh:15413klzzwxh:15527klzzwxh:15446klzzwxh:15447klzzwxh:15448klzzwxh:15449klzzwxh:15450klzzwxh:15451klzzwxh:15452klzzwxh:15453klzzwxh:15454klzzwxh:15455klzzwxh:15456 retry = minklzzwxh:15414retry;klzzwxh:15528klzzwxh:15457klzzwxh:15458klzzwxh:15459klzzwxh:15460klzzwxh:15461klzzwxh:15462klzzwxh:15463 klzzwxh:15415 else klzzwxh:15416klzzwxh:15529klzzwxh:15464klzzwxh:15465klzzwxh:15466klzzwxh:15467klzzwxh:15468klzzwxh:15469klzzwxh:15470klzzwxh:15471klzzwxh:15472klzzwxh:15473klzzwxh:15474 retry klzzwxh:15417= 2;klzzwxh:15530klzzwxh:15475klzzwxh:15476klzzwxh:15477klzzwxh:15478klzzwxh:15479klzzwxh:15480klzzwxh:15481klzzwxh:15482klzzwxh:15483klzzwxh:15484klzzwxh:15485 retry = klzzwxh:15418retry klzzwxh:15486 maxklzzwxh:15419retryklzzwxh:15420 ? maxklzzwxh:15421retry : retry;klzzwxh:15531klzzwxh:15487klzzwxh:15488klzzwxh:15489klzzwxh:15490klzzwxh:15491klzzwxh:15492klzzwxh:15493klzzwxh:15494klzzwxh:15495klzzwxh:15496klzzwxh:15497 retry = klzzwxh:15422retry == dirklzzwxh:15423refreshklzzwxh:15424 ? klzzwxh:15425retry + 1klzzwxh:15426 : retry;klzzwxh:15532klzzwxh:15498klzzwxh:15499klzzwxh:15500klzzwxh:15501klzzwxh:15502klzzwxh:15503klzzwxh:15504 klzzwxh:15427klzzwxh:15533klzzwxh:15505klzzwxh:15506klzzwxh:15507klzzwxh:15508klzzwxh:15509klzzwxh:15510klzzwxh:15511 return ret;klzzwxh:15534klzzwxh:15512klzzwxh:15513klzzwxh:15514 klzzwxh:15428 else klzzwxh:15429klzzwxh:15535klzzwxh:15515klzzwxh:15516klzzwxh:15517klzzwxh:15518klzzwxh:15519klzzwxh:15520klzzwxh:15521 retry = dirklzzwxh:15430refresh;klzzwxh:15536klzzwxh:15522klzzwxh:15523klzzwxh:15524 klzzwxh:15431

      klzzwxh:15594klzzwxh:15595klzzwxh:15596 int changed = 0;klzzwxh:15789klzzwxh:15597klzzwxh:15598klzzwxh:15599 davklzzwxh:15537node klzzwxh:15538child = dir-klzzwxh:15600childs;klzzwxh:15790klzzwxh:15601klzzwxh:15602klzzwxh:15603 while klzzwxh:15539child klzzwxh:15540= NULLklzzwxh:15541 klzzwxh:15542klzzwxh:15791klzzwxh:15604klzzwxh:15605klzzwxh:15606klzzwxh:15607klzzwxh:15608klzzwxh:15609klzzwxh:15610 davklzzwxh:15543node klzzwxh:15544next = child-klzzwxh:15611next;klzzwxh:15792klzzwxh:15612klzzwxh:15613klzzwxh:15614klzzwxh:15615klzzwxh:15616klzzwxh:15617klzzwxh:15618 if klzzwxh:15545klzzwxh:15546isklzzwxh:15547backupklzzwxh:15548childklzzwxh:15549klzzwxh:15550 klzzwxh:15551klzzwxh:15793klzzwxh:15619klzzwxh:15620klzzwxh:15621klzzwxh:15622klzzwxh:15623klzzwxh:15624klzzwxh:15625klzzwxh:15626klzzwxh:15627klzzwxh:15628klzzwxh:15629 davklzzwxh:15552props klzzwxh:15553klzzwxh:15554pp = klzzwxh:15630props;klzzwxh:15794klzzwxh:15631klzzwxh:15632klzzwxh:15633klzzwxh:15634klzzwxh:15635klzzwxh:15636klzzwxh:15637klzzwxh:15638klzzwxh:15639klzzwxh:15640klzzwxh:15641 while klzzwxh:15555klzzwxh:15556pp klzzwxh:15557= NULL klzzwxh:15642klzzwxh:15643 strcmpklzzwxh:15558klzzwxh:15559klzzwxh:15560ppklzzwxh:15561-klzzwxh:15644path, child-klzzwxh:15645pathklzzwxh:15562 klzzwxh:15563= 0klzzwxh:15564klzzwxh:15795klzzwxh:15646klzzwxh:15647klzzwxh:15648klzzwxh:15649klzzwxh:15650klzzwxh:15651klzzwxh:15652klzzwxh:15653klzzwxh:15654klzzwxh:15655klzzwxh:15656klzzwxh:15657klzzwxh:15658klzzwxh:15659klzzwxh:15660 pp = klzzwxh:15661klzzwxh:15565klzzwxh:15566ppklzzwxh:15567-klzzwxh:15662next;klzzwxh:15796klzzwxh:15663klzzwxh:15664klzzwxh:15665klzzwxh:15666klzzwxh:15667klzzwxh:15668klzzwxh:15669klzzwxh:15670klzzwxh:15671klzzwxh:15672klzzwxh:15673 if klzzwxh:15568klzzwxh:15569pp klzzwxh:15570= NULLklzzwxh:15571 klzzwxh:15572klzzwxh:15797klzzwxh:15674klzzwxh:15675klzzwxh:15676klzzwxh:15677klzzwxh:15678klzzwxh:15679klzzwxh:15680klzzwxh:15681klzzwxh:15682klzzwxh:15683klzzwxh:15684klzzwxh:15685klzzwxh:15686klzzwxh:15687klzzwxh:15688 davklzzwxh:15573props klzzwxh:15574p = klzzwxh:15575pp;klzzwxh:15798klzzwxh:15689klzzwxh:15690klzzwxh:15691klzzwxh:15692klzzwxh:15693klzzwxh:15694klzzwxh:15695klzzwxh:15696klzzwxh:15697klzzwxh:15698klzzwxh:15699klzzwxh:15700klzzwxh:15701klzzwxh:15702klzzwxh:15703 klzzwxh:15576pp = p-klzzwxh:15704next;klzzwxh:15799klzzwxh:15705klzzwxh:15706klzzwxh:15707klzzwxh:15708klzzwxh:15709klzzwxh:15710klzzwxh:15711klzzwxh:15712klzzwxh:15713klzzwxh:15714klzzwxh:15715klzzwxh:15716klzzwxh:15717klzzwxh:15718klzzwxh:15719 changed |= updateklzzwxh:15577nodeklzzwxh:15578child, pklzzwxh:15579;klzzwxh:15800klzzwxh:15720klzzwxh:15721klzzwxh:15722klzzwxh:15723klzzwxh:15724klzzwxh:15725klzzwxh:15726klzzwxh:15727klzzwxh:15728klzzwxh:15729klzzwxh:15730 klzzwxh:15580 else if klzzwxh:15581klzzwxh:15582isklzzwxh:15583createdklzzwxh:15584childklzzwxh:15585klzzwxh:15586 klzzwxh:15587klzzwxh:15801klzzwxh:15731klzzwxh:15732klzzwxh:15733klzzwxh:15734klzzwxh:15735klzzwxh:15736klzzwxh:15737klzzwxh:15738klzzwxh:15739klzzwxh:15740klzzwxh:15741klzzwxh:15742klzzwxh:15743klzzwxh:15744klzzwxh:15745 removeklzzwxh:15588nodeklzzwxh:15589childklzzwxh:15590;klzzwxh:15802klzzwxh:15746klzzwxh:15747klzzwxh:15748klzzwxh:15749klzzwxh:15750klzzwxh:15751klzzwxh:15752klzzwxh:15753klzzwxh:15754klzzwxh:15755klzzwxh:15756klzzwxh:15757klzzwxh:15758klzzwxh:15759klzzwxh:15760 changed = 1;klzzwxh:15803klzzwxh:15761klzzwxh:15762klzzwxh:15763klzzwxh:15764klzzwxh:15765klzzwxh:15766klzzwxh:15767klzzwxh:15768klzzwxh:15769klzzwxh:15770klzzwxh:15771 klzzwxh:15591klzzwxh:15804klzzwxh:15772klzzwxh:15773klzzwxh:15774klzzwxh:15775klzzwxh:15776klzzwxh:15777klzzwxh:15778 klzzwxh:15592klzzwxh:15805klzzwxh:15779klzzwxh:15780klzzwxh:15781klzzwxh:15782klzzwxh:15783klzzwxh:15784klzzwxh:15785 child = next;klzzwxh:15806klzzwxh:15786klzzwxh:15787klzzwxh:15788 klzzwxh:15593

      klzzwxh:15838klzzwxh:15839klzzwxh:15840 while klzzwxh:15807props klzzwxh:15808= NULLklzzwxh:15809 klzzwxh:15810klzzwxh:16043klzzwxh:15841klzzwxh:15842klzzwxh:15843klzzwxh:15844klzzwxh:15845klzzwxh:15846klzzwxh:15847 davklzzwxh:15811props klzzwxh:15812next = props-klzzwxh:15848next;klzzwxh:16044klzzwxh:15849klzzwxh:15850klzzwxh:15851klzzwxh:15852klzzwxh:15853klzzwxh:15854klzzwxh:15855 if klzzwxh:15813strlenklzzwxh:15814props-klzzwxh:15856nameklzzwxh:15815 klzzwxh:15857 0klzzwxh:15816 klzzwxh:15817klzzwxh:16045klzzwxh:15858klzzwxh:15859klzzwxh:15860klzzwxh:15861klzzwxh:15862klzzwxh:15863klzzwxh:15864klzzwxh:15865klzzwxh:15866klzzwxh:15867klzzwxh:15868 addklzzwxh:15818nodeklzzwxh:15819dir, propsklzzwxh:15820;klzzwxh:16046klzzwxh:15869klzzwxh:15870klzzwxh:15871klzzwxh:15872klzzwxh:15873klzzwxh:15874klzzwxh:15875klzzwxh:15876klzzwxh:15877klzzwxh:15878klzzwxh:15879 changed = 1;klzzwxh:16047klzzwxh:15880klzzwxh:15881klzzwxh:15882klzzwxh:15883klzzwxh:15884klzzwxh:15885klzzwxh:15886 klzzwxh:15821 else klzzwxh:15822klzzwxh:16048klzzwxh:15887klzzwxh:15888klzzwxh:15889klzzwxh:15890klzzwxh:15891klzzwxh:15892klzzwxh:15893klzzwxh:15894klzzwxh:15895klzzwxh:15896klzzwxh:15897 dir-klzzwxh:15898mtime = props-klzzwxh:15899mtime;klzzwxh:16049klzzwxh:15900klzzwxh:15901klzzwxh:15902klzzwxh:15903klzzwxh:15904klzzwxh:15905klzzwxh:15906klzzwxh:15907klzzwxh:15908klzzwxh:15909klzzwxh:15910 if klzzwxh:15823props-klzzwxh:15911ctime klzzwxh:15912 dir-klzzwxh:15913ctimeklzzwxh:15824klzzwxh:16050klzzwxh:15914klzzwxh:15915klzzwxh:15916klzzwxh:15917klzzwxh:15918klzzwxh:15919klzzwxh:15920klzzwxh:15921klzzwxh:15922klzzwxh:15923klzzwxh:15924klzzwxh:15925klzzwxh:15926klzzwxh:15927klzzwxh:15928 dir-klzzwxh:15929ctime = props-klzzwxh:15930ctime;klzzwxh:16051klzzwxh:15931klzzwxh:15932klzzwxh:15933klzzwxh:15934klzzwxh:15935klzzwxh:15936klzzwxh:15937klzzwxh:15938klzzwxh:15939klzzwxh:15940klzzwxh:15941 if klzzwxh:15825dir-klzzwxh:15942mtime klzzwxh:15943 dir-klzzwxh:15944ctimeklzzwxh:15826klzzwxh:16052klzzwxh:15945klzzwxh:15946klzzwxh:15947klzzwxh:15948klzzwxh:15949klzzwxh:15950klzzwxh:15951klzzwxh:15952klzzwxh:15953klzzwxh:15954klzzwxh:15955klzzwxh:15956klzzwxh:15957klzzwxh:15958klzzwxh:15959 dir-klzzwxh:15960ctime = dir-klzzwxh:15961mtime;klzzwxh:16053klzzwxh:15962klzzwxh:15963klzzwxh:15964klzzwxh:15965klzzwxh:15966klzzwxh:15967klzzwxh:15968klzzwxh:15969klzzwxh:15970klzzwxh:15971klzzwxh:15972 if klzzwxh:15827dir-klzzwxh:15973etag klzzwxh:15828= NULLklzzwxh:15829klzzwxh:16054klzzwxh:15974klzzwxh:15975klzzwxh:15976klzzwxh:15977klzzwxh:15978klzzwxh:15979klzzwxh:15980klzzwxh:15981klzzwxh:15982klzzwxh:15983klzzwxh:15984klzzwxh:15985klzzwxh:15986klzzwxh:15987klzzwxh:15988 freeklzzwxh:15830dir-klzzwxh:15989etagklzzwxh:15831;klzzwxh:16055klzzwxh:15990klzzwxh:15991klzzwxh:15992klzzwxh:15993klzzwxh:15994klzzwxh:15995klzzwxh:15996klzzwxh:15997klzzwxh:15998klzzwxh:15999klzzwxh:16000 dir-klzzwxh:16001etag = props-klzzwxh:16002etag;klzzwxh:16056klzzwxh:16003klzzwxh:16004klzzwxh:16005klzzwxh:16006klzzwxh:16007klzzwxh:16008klzzwxh:16009klzzwxh:16010klzzwxh:16011klzzwxh:16012klzzwxh:16013 props-klzzwxh:16014etag = NULL;klzzwxh:16057klzzwxh:16015klzzwxh:16016klzzwxh:16017klzzwxh:16018klzzwxh:16019klzzwxh:16020klzzwxh:16021klzzwxh:16022klzzwxh:16023klzzwxh:16024klzzwxh:16025 davklzzwxh:15832deleteklzzwxh:15833propsklzzwxh:15834propsklzzwxh:15835;klzzwxh:16058klzzwxh:16026klzzwxh:16027klzzwxh:16028klzzwxh:16029klzzwxh:16030klzzwxh:16031klzzwxh:16032 klzzwxh:15836klzzwxh:16059klzzwxh:16033klzzwxh:16034klzzwxh:16035klzzwxh:16036klzzwxh:16037klzzwxh:16038klzzwxh:16039 props = next;klzzwxh:16060klzzwxh:16040klzzwxh:16041klzzwxh:16042 klzzwxh:15837

      klzzwxh:16070klzzwxh:16071klzzwxh:16072 if klzzwxh:16061changedklzzwxh:16062 klzzwxh:16063klzzwxh:16090klzzwxh:16073klzzwxh:16074klzzwxh:16075klzzwxh:16076klzzwxh:16077klzzwxh:16078klzzwxh:16079 deleteklzzwxh:16064cacheklzzwxh:16065fileklzzwxh:16066dirklzzwxh:16067;klzzwxh:16091klzzwxh:16080klzzwxh:16081klzzwxh:16082klzzwxh:16083klzzwxh:16084klzzwxh:16085klzzwxh:16086 klzzwxh:16068flush = 1;klzzwxh:16092klzzwxh:16087klzzwxh:16088klzzwxh:16089 klzzwxh:16069

      klzzwxh:16112klzzwxh:16113klzzwxh:16114 if klzzwxh:16093debugklzzwxh:16094 klzzwxh:16095klzzwxh:16157klzzwxh:16115klzzwxh:16116klzzwxh:16117klzzwxh:16118klzzwxh:16119klzzwxh:16120klzzwxh:16121 syslogklzzwxh:16096LOGklzzwxh:16097MAKEPRIklzzwxh:16098LOGklzzwxh:16099DAEMON, LOGklzzwxh:16100DEBUGklzzwxh:16101, klzzwxh:16122directory updated: %p-klzzwxh:16123%pklzzwxh:16124,klzzwxh:16158klzzwxh:16125klzzwxh:16126klzzwxh:16127klzzwxh:16128klzzwxh:16129klzzwxh:16130klzzwxh:16131klzzwxh:16132klzzwxh:16133klzzwxh:16134klzzwxh:16135klzzwxh:16136klzzwxh:16137klzzwxh:16138 dir-klzzwxh:16139parent, dirklzzwxh:16102;klzzwxh:16159klzzwxh:16140klzzwxh:16141klzzwxh:16142klzzwxh:16143klzzwxh:16144klzzwxh:16145klzzwxh:16146 syslogklzzwxh:16103LOGklzzwxh:16104MAKEPRIklzzwxh:16105LOGklzzwxh:16106DAEMON, LOGklzzwxh:16107DEBUGklzzwxh:16108, klzzwxh:16147klzzwxh:16148 %sklzzwxh:16149, dir-klzzwxh:16150pathklzzwxh:16109;klzzwxh:16160klzzwxh:16151klzzwxh:16152klzzwxh:16153 klzzwxh:16110klzzwxh:16161klzzwxh:16154klzzwxh:16155klzzwxh:16156 return 0;klzzwxh:16162klzzwxh:16111

      /klzzwxh:16163 Updates the properties of node according to props and frees props.klzzwxh:16234klzzwxh:16173klzzwxh:16174 If props is incompatibel with node or indicates a lost update problem,klzzwxh:16235klzzwxh:16175klzzwxh:16176 a new node is created from props and the old node is deleted, creatingklzzwxh:16236klzzwxh:16177klzzwxh:16178 a local back up if necessary.klzzwxh:16237klzzwxh:16179klzzwxh:16180 If nodes are removed or created, flag flush is set, to force new lookupsklzzwxh:16238klzzwxh:16181klzzwxh:16182 by the kernel.klzzwxh:16239klzzwxh:16183klzzwxh:16184 nodeklzzwxh:16185 : The node to be updated. It must not be the root node and have aklzzwxh:16240klzzwxh:16186klzzwxh:16187klzzwxh:16188klzzwxh:16189klzzwxh:16190klzzwxh:16191klzzwxh:16192klzzwxh:16193klzzwxh:16194klzzwxh:16195 valid parent.klzzwxh:16241klzzwxh:16196klzzwxh:16197 props : The properties retrieved from the server. They will be freed.klzzwxh:16242klzzwxh:16198klzzwxh:16199 return value: Value 1 indicates that the contents of the parent directoryklzzwxh:16243klzzwxh:16200klzzwxh:16201klzzwxh:16202klzzwxh:16203klzzwxh:16204klzzwxh:16205klzzwxh:16206klzzwxh:16207klzzwxh:16208klzzwxh:16209klzzwxh:16210klzzwxh:16211klzzwxh:16212klzzwxh:16213klzzwxh:16214klzzwxh:16215 has changed and therefore the parents dir-cache-file has toklzzwxh:16244klzzwxh:16216klzzwxh:16217klzzwxh:16218klzzwxh:16219klzzwxh:16220klzzwxh:16221klzzwxh:16222klzzwxh:16223klzzwxh:16224klzzwxh:16225klzzwxh:16226klzzwxh:16227klzzwxh:16228klzzwxh:16229klzzwxh:16230klzzwxh:16231 be updated; 0 otherwise.klzzwxh:16245klzzwxh:16232klzzwxh:16233 NOTE: node may be removed and the pointer node may become invalid. klzzwxh:16164/klzzwxh:16246static int updateklzzwxh:16165nodeklzzwxh:16166davklzzwxh:16167node klzzwxh:16168node, davklzzwxh:16169props klzzwxh:16170propsklzzwxh:16171 klzzwxh:16172

      klzzwxh:16265klzzwxh:16266klzzwxh:16267 if klzzwxh:16247debugklzzwxh:16248 klzzwxh:16249klzzwxh:16307klzzwxh:16268klzzwxh:16269klzzwxh:16270klzzwxh:16271klzzwxh:16272klzzwxh:16273klzzwxh:16274 syslogklzzwxh:16250LOGklzzwxh:16251MAKEPRIklzzwxh:16252LOGklzzwxh:16253DAEMON, LOGklzzwxh:16254DEBUGklzzwxh:16255, klzzwxh:16275updating node: %p-klzzwxh:16276%pklzzwxh:16277,klzzwxh:16308klzzwxh:16278klzzwxh:16279klzzwxh:16280klzzwxh:16281klzzwxh:16282klzzwxh:16283klzzwxh:16284klzzwxh:16285klzzwxh:16286klzzwxh:16287klzzwxh:16288klzzwxh:16289klzzwxh:16290klzzwxh:16291 node-klzzwxh:16292parent, nodeklzzwxh:16256;klzzwxh:16309klzzwxh:16293klzzwxh:16294klzzwxh:16295klzzwxh:16296klzzwxh:16297klzzwxh:16298klzzwxh:16299 syslogklzzwxh:16257LOGklzzwxh:16258MAKEPRIklzzwxh:16259LOGklzzwxh:16260DAEMON, LOGklzzwxh:16261DEBUGklzzwxh:16262, klzzwxh:16300klzzwxh:16301 %sklzzwxh:16302, node-klzzwxh:16303pathklzzwxh:16263;klzzwxh:16310klzzwxh:16304klzzwxh:16305klzzwxh:16306 klzzwxh:16264

      klzzwxh:16313klzzwxh:16314klzzwxh:16315 if klzzwxh:16311node-klzzwxh:16316parent == NULLklzzwxh:16312klzzwxh:16327klzzwxh:16317klzzwxh:16318klzzwxh:16319klzzwxh:16320klzzwxh:16321klzzwxh:16322klzzwxh:16323 return 0;klzzwxh:16328klzzwxh:16324klzzwxh:16325klzzwxh:16326 int ret = 0;

      klzzwxh:16354klzzwxh:16355klzzwxh:16356 if klzzwxh:16329klzzwxh:16330isklzzwxh:16331dirklzzwxh:16332nodeklzzwxh:16333 klzzwxh:16357klzzwxh:16358 klzzwxh:16334props-klzzwxh:16359isklzzwxh:16335dirklzzwxh:16336klzzwxh:16406klzzwxh:16360klzzwxh:16361klzzwxh:16362klzzwxh:16363klzzwxh:16364klzzwxh:16365klzzwxh:16366klzzwxh:16367klzzwxh:16368klzzwxh:16369klzzwxh:16370 || klzzwxh:16337klzzwxh:16338isklzzwxh:16339dirklzzwxh:16340nodeklzzwxh:16341 klzzwxh:16371klzzwxh:16372 props-klzzwxh:16373isklzzwxh:16342dirklzzwxh:16343klzzwxh:16344 klzzwxh:16345klzzwxh:16407klzzwxh:16374klzzwxh:16375klzzwxh:16376klzzwxh:16377klzzwxh:16378klzzwxh:16379klzzwxh:16380 addklzzwxh:16346nodeklzzwxh:16347node-klzzwxh:16381parent, propsklzzwxh:16348;klzzwxh:16408klzzwxh:16382klzzwxh:16383klzzwxh:16384klzzwxh:16385klzzwxh:16386klzzwxh:16387klzzwxh:16388 removeklzzwxh:16349nodeklzzwxh:16350nodeklzzwxh:16351;klzzwxh:16409klzzwxh:16389klzzwxh:16390klzzwxh:16391klzzwxh:16392klzzwxh:16393klzzwxh:16394klzzwxh:16395 klzzwxh:16352flush = 1;klzzwxh:16410klzzwxh:16396klzzwxh:16397klzzwxh:16398klzzwxh:16399klzzwxh:16400klzzwxh:16401klzzwxh:16402 return 1;klzzwxh:16411klzzwxh:16403klzzwxh:16404klzzwxh:16405 klzzwxh:16353

      klzzwxh:16425klzzwxh:16426klzzwxh:16427 if klzzwxh:16412strcmpklzzwxh:16413node-klzzwxh:16428name, props-klzzwxh:16429nameklzzwxh:16414 klzzwxh:16415= 0klzzwxh:16416 klzzwxh:16417klzzwxh:16464klzzwxh:16430klzzwxh:16431klzzwxh:16432klzzwxh:16433klzzwxh:16434klzzwxh:16435klzzwxh:16436 freeklzzwxh:16418node-klzzwxh:16437nameklzzwxh:16419;klzzwxh:16465klzzwxh:16438klzzwxh:16439klzzwxh:16440klzzwxh:16441klzzwxh:16442klzzwxh:16443klzzwxh:16444 node-klzzwxh:16445name = neklzzwxh:16420strdupklzzwxh:16421props-klzzwxh:16446nameklzzwxh:16422;klzzwxh:16466klzzwxh:16447klzzwxh:16448klzzwxh:16449klzzwxh:16450klzzwxh:16451klzzwxh:16452klzzwxh:16453 ret = 1;klzzwxh:16467klzzwxh:16454klzzwxh:16455klzzwxh:16456klzzwxh:16457klzzwxh:16458klzzwxh:16459klzzwxh:16460 klzzwxh:16423flush = 1;klzzwxh:16468klzzwxh:16461klzzwxh:16462klzzwxh:16463 klzzwxh:16424

      klzzwxh:16503klzzwxh:16504klzzwxh:16505 if klzzwxh:16469isklzzwxh:16470createdklzzwxh:16471nodeklzzwxh:16472klzzwxh:16473 klzzwxh:16474klzzwxh:16601klzzwxh:16506klzzwxh:16507klzzwxh:16508klzzwxh:16509klzzwxh:16510klzzwxh:16511klzzwxh:16512 if klzzwxh:16475klzzwxh:16476isklzzwxh:16477openklzzwxh:16478nodeklzzwxh:16479 klzzwxh:16513klzzwxh:16514 klzzwxh:16480klzzwxh:16481isklzzwxh:16482lockedklzzwxh:16483nodeklzzwxh:16484 || props-klzzwxh:16515size klzzwxh:16516 0klzzwxh:16485klzzwxh:16486 klzzwxh:16487klzzwxh:16602klzzwxh:16517klzzwxh:16518klzzwxh:16519klzzwxh:16520klzzwxh:16521klzzwxh:16522klzzwxh:16523klzzwxh:16524klzzwxh:16525klzzwxh:16526klzzwxh:16527 addklzzwxh:16488nodeklzzwxh:16489node-klzzwxh:16528parent, propsklzzwxh:16490;klzzwxh:16603klzzwxh:16529klzzwxh:16530klzzwxh:16531klzzwxh:16532klzzwxh:16533klzzwxh:16534klzzwxh:16535klzzwxh:16536klzzwxh:16537klzzwxh:16538klzzwxh:16539 removeklzzwxh:16491nodeklzzwxh:16492nodeklzzwxh:16493;klzzwxh:16604klzzwxh:16540klzzwxh:16541klzzwxh:16542klzzwxh:16543klzzwxh:16544klzzwxh:16545klzzwxh:16546klzzwxh:16547klzzwxh:16548klzzwxh:16549klzzwxh:16550 klzzwxh:16494flush = 1;klzzwxh:16605klzzwxh:16551klzzwxh:16552klzzwxh:16553klzzwxh:16554klzzwxh:16555klzzwxh:16556klzzwxh:16557klzzwxh:16558klzzwxh:16559klzzwxh:16560klzzwxh:16561 return 1;klzzwxh:16606klzzwxh:16562klzzwxh:16563klzzwxh:16564klzzwxh:16565klzzwxh:16566klzzwxh:16567klzzwxh:16568 klzzwxh:16495 else klzzwxh:16496klzzwxh:16607klzzwxh:16569klzzwxh:16570klzzwxh:16571klzzwxh:16572klzzwxh:16573klzzwxh:16574klzzwxh:16575klzzwxh:16576klzzwxh:16577klzzwxh:16578klzzwxh:16579 davklzzwxh:16497deleteklzzwxh:16498propsklzzwxh:16499propsklzzwxh:16500;klzzwxh:16608klzzwxh:16580klzzwxh:16581klzzwxh:16582klzzwxh:16583klzzwxh:16584klzzwxh:16585klzzwxh:16586klzzwxh:16587klzzwxh:16588klzzwxh:16589klzzwxh:16590 return ret;klzzwxh:16609klzzwxh:16591klzzwxh:16592klzzwxh:16593klzzwxh:16594klzzwxh:16595klzzwxh:16596klzzwxh:16597 klzzwxh:16501klzzwxh:16610klzzwxh:16598klzzwxh:16599klzzwxh:16600 klzzwxh:16502

      klzzwxh:16671klzzwxh:16672klzzwxh:16673 if klzzwxh:16611isklzzwxh:16612cachedklzzwxh:16613nodeklzzwxh:16614klzzwxh:16615 klzzwxh:16616klzzwxh:16961klzzwxh:16674klzzwxh:16675klzzwxh:16676klzzwxh:16677klzzwxh:16678klzzwxh:16679klzzwxh:16680 if klzzwxh:16617klzzwxh:16618node-klzzwxh:16681etag == NULL klzzwxh:16682klzzwxh:16683 props-klzzwxh:16684mtime klzzwxh:16685 node-klzzwxh:16686smtimeklzzwxh:16619klzzwxh:16962klzzwxh:16687klzzwxh:16688klzzwxh:16689klzzwxh:16690klzzwxh:16691klzzwxh:16692klzzwxh:16693klzzwxh:16694klzzwxh:16695klzzwxh:16696klzzwxh:16697klzzwxh:16698klzzwxh:16699klzzwxh:16700klzzwxh:16701 || klzzwxh:16620node-klzzwxh:16702etag klzzwxh:16621= NULL klzzwxh:16703klzzwxh:16704 props-klzzwxh:16705etag klzzwxh:16622= NULLklzzwxh:16963klzzwxh:16706klzzwxh:16707klzzwxh:16708klzzwxh:16709klzzwxh:16710klzzwxh:16711klzzwxh:16712klzzwxh:16713klzzwxh:16714klzzwxh:16715klzzwxh:16716klzzwxh:16717klzzwxh:16718klzzwxh:16719klzzwxh:16720klzzwxh:16721klzzwxh:16722klzzwxh:16723klzzwxh:16724 klzzwxh:16725klzzwxh:16726 strcmpklzzwxh:16623node-klzzwxh:16727etag, props-klzzwxh:16728etagklzzwxh:16624 klzzwxh:16625= 0klzzwxh:16626klzzwxh:16627 klzzwxh:16628klzzwxh:16964klzzwxh:16729klzzwxh:16730klzzwxh:16731klzzwxh:16732klzzwxh:16733klzzwxh:16734klzzwxh:16735klzzwxh:16736klzzwxh:16737klzzwxh:16738klzzwxh:16739 if klzzwxh:16629isklzzwxh:16630openklzzwxh:16631nodeklzzwxh:16632klzzwxh:16633 klzzwxh:16634klzzwxh:16965klzzwxh:16740klzzwxh:16741klzzwxh:16742klzzwxh:16743klzzwxh:16744klzzwxh:16745klzzwxh:16746klzzwxh:16747klzzwxh:16748klzzwxh:16749klzzwxh:16750klzzwxh:16751klzzwxh:16752klzzwxh:16753klzzwxh:16754 node-klzzwxh:16755utime = 0;klzzwxh:16966klzzwxh:16756klzzwxh:16757klzzwxh:16758klzzwxh:16759klzzwxh:16760klzzwxh:16761klzzwxh:16762klzzwxh:16763klzzwxh:16764klzzwxh:16765klzzwxh:16766klzzwxh:16767klzzwxh:16768klzzwxh:16769klzzwxh:16770 davklzzwxh:16635deleteklzzwxh:16636propsklzzwxh:16637propsklzzwxh:16638;klzzwxh:16967klzzwxh:16771klzzwxh:16772klzzwxh:16773klzzwxh:16774klzzwxh:16775klzzwxh:16776klzzwxh:16777klzzwxh:16778klzzwxh:16779klzzwxh:16780klzzwxh:16781klzzwxh:16782klzzwxh:16783klzzwxh:16784klzzwxh:16785 return ret;klzzwxh:16968klzzwxh:16786klzzwxh:16787klzzwxh:16788klzzwxh:16789klzzwxh:16790klzzwxh:16791klzzwxh:16792klzzwxh:16793klzzwxh:16794klzzwxh:16795klzzwxh:16796 klzzwxh:16639 else if klzzwxh:16640isklzzwxh:16641dirtyklzzwxh:16642nodeklzzwxh:16643klzzwxh:16644 klzzwxh:16645klzzwxh:16969klzzwxh:16797klzzwxh:16798klzzwxh:16799klzzwxh:16800klzzwxh:16801klzzwxh:16802klzzwxh:16803klzzwxh:16804klzzwxh:16805klzzwxh:16806klzzwxh:16807klzzwxh:16808klzzwxh:16809klzzwxh:16810klzzwxh:16811 addklzzwxh:16646nodeklzzwxh:16647node-klzzwxh:16812parent, propsklzzwxh:16648;klzzwxh:16970klzzwxh:16813klzzwxh:16814klzzwxh:16815klzzwxh:16816klzzwxh:16817klzzwxh:16818klzzwxh:16819klzzwxh:16820klzzwxh:16821klzzwxh:16822klzzwxh:16823klzzwxh:16824klzzwxh:16825klzzwxh:16826klzzwxh:16827 removeklzzwxh:16649nodeklzzwxh:16650nodeklzzwxh:16651;klzzwxh:16971klzzwxh:16828klzzwxh:16829klzzwxh:16830klzzwxh:16831klzzwxh:16832klzzwxh:16833klzzwxh:16834klzzwxh:16835klzzwxh:16836klzzwxh:16837klzzwxh:16838klzzwxh:16839klzzwxh:16840klzzwxh:16841klzzwxh:16842 klzzwxh:16652flush = 1;klzzwxh:16972klzzwxh:16843klzzwxh:16844klzzwxh:16845klzzwxh:16846klzzwxh:16847klzzwxh:16848klzzwxh:16849klzzwxh:16850klzzwxh:16851klzzwxh:16852klzzwxh:16853klzzwxh:16854klzzwxh:16855klzzwxh:16856klzzwxh:16857 return 1;klzzwxh:16973klzzwxh:16858klzzwxh:16859klzzwxh:16860klzzwxh:16861klzzwxh:16862klzzwxh:16863klzzwxh:16864klzzwxh:16865klzzwxh:16866klzzwxh:16867klzzwxh:16868 klzzwxh:16653 else klzzwxh:16654klzzwxh:16974klzzwxh:16869klzzwxh:16870klzzwxh:16871klzzwxh:16872klzzwxh:16873klzzwxh:16874klzzwxh:16875klzzwxh:16876klzzwxh:16877klzzwxh:16878klzzwxh:16879klzzwxh:16880klzzwxh:16881klzzwxh:16882klzzwxh:16883 deleteklzzwxh:16655cacheklzzwxh:16656fileklzzwxh:16657nodeklzzwxh:16658;klzzwxh:16975klzzwxh:16884klzzwxh:16885klzzwxh:16886klzzwxh:16887klzzwxh:16888klzzwxh:16889klzzwxh:16890klzzwxh:16891klzzwxh:16892klzzwxh:16893klzzwxh:16894klzzwxh:16895klzzwxh:16896klzzwxh:16897klzzwxh:16898 klzzwxh:16659flush = 1;klzzwxh:16976klzzwxh:16899klzzwxh:16900klzzwxh:16901klzzwxh:16902klzzwxh:16903klzzwxh:16904klzzwxh:16905klzzwxh:16906klzzwxh:16907klzzwxh:16908klzzwxh:16909 klzzwxh:16660klzzwxh:16977klzzwxh:16910klzzwxh:16911klzzwxh:16912klzzwxh:16913klzzwxh:16914klzzwxh:16915klzzwxh:16916 klzzwxh:16661 else klzzwxh:16662klzzwxh:16978klzzwxh:16917klzzwxh:16918klzzwxh:16919klzzwxh:16920klzzwxh:16921klzzwxh:16922klzzwxh:16923klzzwxh:16924klzzwxh:16925klzzwxh:16926klzzwxh:16927 node-klzzwxh:16928utime = timeklzzwxh:16663NULLklzzwxh:16664;klzzwxh:16979klzzwxh:16929klzzwxh:16930klzzwxh:16931klzzwxh:16932klzzwxh:16933klzzwxh:16934klzzwxh:16935klzzwxh:16936klzzwxh:16937klzzwxh:16938klzzwxh:16939 davklzzwxh:16665deleteklzzwxh:16666propsklzzwxh:16667propsklzzwxh:16668;klzzwxh:16980klzzwxh:16940klzzwxh:16941klzzwxh:16942klzzwxh:16943klzzwxh:16944klzzwxh:16945klzzwxh:16946klzzwxh:16947klzzwxh:16948klzzwxh:16949klzzwxh:16950 return ret;klzzwxh:16981klzzwxh:16951klzzwxh:16952klzzwxh:16953klzzwxh:16954klzzwxh:16955klzzwxh:16956klzzwxh:16957 klzzwxh:16669klzzwxh:16982klzzwxh:16958klzzwxh:16959klzzwxh:16960 klzzwxh:16670

      klzzwxh:16996klzzwxh:16997klzzwxh:16998 if klzzwxh:16983props-klzzwxh:16999mtime klzzwxh:17000 node-klzzwxh:17001atimeklzzwxh:16984klzzwxh:17075klzzwxh:17002klzzwxh:17003klzzwxh:17004klzzwxh:17005klzzwxh:17006klzzwxh:17007klzzwxh:17008 node-klzzwxh:17009atime = props-klzzwxh:17010mtime;klzzwxh:17076klzzwxh:17011klzzwxh:17012klzzwxh:17013 if klzzwxh:16985props-klzzwxh:17014mtime klzzwxh:17015 node-klzzwxh:17016smtimeklzzwxh:16986 klzzwxh:16987klzzwxh:17077klzzwxh:17017klzzwxh:17018klzzwxh:17019klzzwxh:17020klzzwxh:17021klzzwxh:17022klzzwxh:17023 node-klzzwxh:17024mtime = props-klzzwxh:17025mtime;klzzwxh:17078klzzwxh:17026klzzwxh:17027klzzwxh:17028klzzwxh:17029klzzwxh:17030klzzwxh:17031klzzwxh:17032 node-klzzwxh:17033smtime = props-klzzwxh:17034mtime;klzzwxh:17079klzzwxh:17035klzzwxh:17036klzzwxh:17037klzzwxh:17038klzzwxh:17039klzzwxh:17040klzzwxh:17041 node-klzzwxh:17042utime = 0;klzzwxh:17080klzzwxh:17043klzzwxh:17044klzzwxh:17045klzzwxh:17046klzzwxh:17047klzzwxh:17048klzzwxh:17049 deleteklzzwxh:16988cacheklzzwxh:16989fileklzzwxh:16990nodeklzzwxh:16991;klzzwxh:17081klzzwxh:17050klzzwxh:17051klzzwxh:17052klzzwxh:17053klzzwxh:17054klzzwxh:17055klzzwxh:17056 klzzwxh:16992flush = 1;klzzwxh:17082klzzwxh:17057klzzwxh:17058klzzwxh:17059 klzzwxh:16993klzzwxh:17083klzzwxh:17060klzzwxh:17061klzzwxh:17062 if klzzwxh:16994props-klzzwxh:17063ctime klzzwxh:17064 node-klzzwxh:17065ctimeklzzwxh:16995klzzwxh:17084klzzwxh:17066klzzwxh:17067klzzwxh:17068klzzwxh:17069klzzwxh:17070klzzwxh:17071klzzwxh:17072 node-klzzwxh:17073ctime = props-klzzwxh:17074ctime;

      klzzwxh:17090klzzwxh:17091klzzwxh:17092 if klzzwxh:17085node-klzzwxh:17093etag klzzwxh:17086= NULLklzzwxh:17087klzzwxh:17111klzzwxh:17094klzzwxh:17095klzzwxh:17096klzzwxh:17097klzzwxh:17098klzzwxh:17099klzzwxh:17100 freeklzzwxh:17088node-klzzwxh:17101etagklzzwxh:17089;klzzwxh:17112klzzwxh:17102klzzwxh:17103klzzwxh:17104 node-klzzwxh:17105etag = props-klzzwxh:17106etag;klzzwxh:17113klzzwxh:17107klzzwxh:17108klzzwxh:17109 props-klzzwxh:17110etag = NULL;

      klzzwxh:17173klzzwxh:17174klzzwxh:17175 if klzzwxh:17114isklzzwxh:17115regklzzwxh:17116nodeklzzwxh:17117klzzwxh:17118 klzzwxh:17119klzzwxh:17373klzzwxh:17176klzzwxh:17177klzzwxh:17178klzzwxh:17179klzzwxh:17180klzzwxh:17181klzzwxh:17182 if klzzwxh:17120props-klzzwxh:17183isklzzwxh:17121exec == 1klzzwxh:17374klzzwxh:17184klzzwxh:17185klzzwxh:17186klzzwxh:17187klzzwxh:17188klzzwxh:17189klzzwxh:17190klzzwxh:17191klzzwxh:17192klzzwxh:17193klzzwxh:17194klzzwxh:17195klzzwxh:17196klzzwxh:17197klzzwxh:17198 klzzwxh:17199klzzwxh:17200 klzzwxh:17122node-klzzwxh:17201mode klzzwxh:17202 klzzwxh:17123Sklzzwxh:17124IXUSR | Sklzzwxh:17125IXGRP | Sklzzwxh:17126IXOTHklzzwxh:17127klzzwxh:17128 == 0klzzwxh:17129 klzzwxh:17130klzzwxh:17375klzzwxh:17203klzzwxh:17204klzzwxh:17205klzzwxh:17206klzzwxh:17207klzzwxh:17208klzzwxh:17209klzzwxh:17210klzzwxh:17211klzzwxh:17212klzzwxh:17213 node-klzzwxh:17214mode |= klzzwxh:17131node-klzzwxh:17215mode klzzwxh:17216 Sklzzwxh:17132IWUSRklzzwxh:17133 ? Sklzzwxh:17134IXUSR : 0;klzzwxh:17376klzzwxh:17217klzzwxh:17218klzzwxh:17219klzzwxh:17220klzzwxh:17221klzzwxh:17222klzzwxh:17223klzzwxh:17224klzzwxh:17225klzzwxh:17226klzzwxh:17227 node-klzzwxh:17228mode |= klzzwxh:17135node-klzzwxh:17229mode klzzwxh:17230 Sklzzwxh:17136IWGRPklzzwxh:17137 ? Sklzzwxh:17138IXGRP : 0;klzzwxh:17377klzzwxh:17231klzzwxh:17232klzzwxh:17233klzzwxh:17234klzzwxh:17235klzzwxh:17236klzzwxh:17237klzzwxh:17238klzzwxh:17239klzzwxh:17240klzzwxh:17241 node-klzzwxh:17242mode |= klzzwxh:17139node-klzzwxh:17243mode klzzwxh:17244 Sklzzwxh:17140IWOTHklzzwxh:17141 ? Sklzzwxh:17142IXOTH : 0;klzzwxh:17378klzzwxh:17245klzzwxh:17246klzzwxh:17247klzzwxh:17248klzzwxh:17249klzzwxh:17250klzzwxh:17251klzzwxh:17252klzzwxh:17253klzzwxh:17254klzzwxh:17255 node-klzzwxh:17256mode klzzwxh:17257= ~fileklzzwxh:17143umask;klzzwxh:17379klzzwxh:17258klzzwxh:17259klzzwxh:17260klzzwxh:17261klzzwxh:17262klzzwxh:17263klzzwxh:17264klzzwxh:17265klzzwxh:17266klzzwxh:17267klzzwxh:17268 klzzwxh:17144flush = 1;klzzwxh:17380klzzwxh:17269klzzwxh:17270klzzwxh:17271klzzwxh:17272klzzwxh:17273klzzwxh:17274klzzwxh:17275 klzzwxh:17145 else if klzzwxh:17146props-klzzwxh:17276isklzzwxh:17147exec == 0klzzwxh:17381klzzwxh:17277klzzwxh:17278klzzwxh:17279klzzwxh:17280klzzwxh:17281klzzwxh:17282klzzwxh:17283klzzwxh:17284klzzwxh:17285klzzwxh:17286klzzwxh:17287klzzwxh:17288klzzwxh:17289klzzwxh:17290klzzwxh:17291 klzzwxh:17292klzzwxh:17293 klzzwxh:17148node-klzzwxh:17294mode klzzwxh:17295 klzzwxh:17149Sklzzwxh:17150IXUSR | Sklzzwxh:17151IXGRP | Sklzzwxh:17152IXOTHklzzwxh:17153klzzwxh:17154 klzzwxh:17155= 0klzzwxh:17156 klzzwxh:17157klzzwxh:17382klzzwxh:17296klzzwxh:17297klzzwxh:17298klzzwxh:17299klzzwxh:17300klzzwxh:17301klzzwxh:17302klzzwxh:17303klzzwxh:17304klzzwxh:17305klzzwxh:17306 node-klzzwxh:17307mode klzzwxh:17308= ~klzzwxh:17158Sklzzwxh:17159IXUSR | Sklzzwxh:17160IXGRP | Sklzzwxh:17161IXOTHklzzwxh:17162;klzzwxh:17383klzzwxh:17309klzzwxh:17310klzzwxh:17311klzzwxh:17312klzzwxh:17313klzzwxh:17314klzzwxh:17315klzzwxh:17316klzzwxh:17317klzzwxh:17318klzzwxh:17319 klzzwxh:17163flush = 1;klzzwxh:17384klzzwxh:17320klzzwxh:17321klzzwxh:17322klzzwxh:17323klzzwxh:17324klzzwxh:17325klzzwxh:17326 klzzwxh:17164klzzwxh:17385klzzwxh:17327klzzwxh:17328klzzwxh:17329klzzwxh:17330klzzwxh:17331klzzwxh:17332klzzwxh:17333 if klzzwxh:17165props-klzzwxh:17334size klzzwxh:17166= 0 klzzwxh:17335klzzwxh:17336 props-klzzwxh:17337size klzzwxh:17167= node-klzzwxh:17338sizeklzzwxh:17168 klzzwxh:17169klzzwxh:17386klzzwxh:17339klzzwxh:17340klzzwxh:17341klzzwxh:17342klzzwxh:17343klzzwxh:17344klzzwxh:17345klzzwxh:17346klzzwxh:17347klzzwxh:17348klzzwxh:17349 node-klzzwxh:17350size = props-klzzwxh:17351size;klzzwxh:17387klzzwxh:17352klzzwxh:17353klzzwxh:17354klzzwxh:17355klzzwxh:17356klzzwxh:17357klzzwxh:17358klzzwxh:17359klzzwxh:17360klzzwxh:17361klzzwxh:17362 klzzwxh:17170flush = 1;klzzwxh:17388klzzwxh:17363klzzwxh:17364klzzwxh:17365klzzwxh:17366klzzwxh:17367klzzwxh:17368klzzwxh:17369 klzzwxh:17171klzzwxh:17389klzzwxh:17370klzzwxh:17371klzzwxh:17372 klzzwxh:17172

      klzzwxh:17394klzzwxh:17395klzzwxh:17396 davklzzwxh:17390deleteklzzwxh:17391propsklzzwxh:17392propsklzzwxh:17393;

      klzzwxh:17398klzzwxh:17399klzzwxh:17400 return ret;klzzwxh:17401klzzwxh:17397

      /klzzwxh:17402 For node and all nodes in the tree below nodethe compinent srcklzzwxh:17403path in itsklzzwxh:17448klzzwxh:17419klzzwxh:17420 path will be replaced by dstklzzwxh:17404path. If the path of a node does not start withklzzwxh:17449klzzwxh:17421klzzwxh:17422 srcklzzwxh:17405path the node will klzzwxh:17406notklzzwxh:17407 be removed, but its parent directory will beklzzwxh:17450klzzwxh:17423klzzwxh:17424 invalidated, so an update is forced. klzzwxh:17408/klzzwxh:17451static void updateklzzwxh:17409pathklzzwxh:17410davklzzwxh:17411node klzzwxh:17412node, const char klzzwxh:17413srcklzzwxh:17414path,klzzwxh:17452klzzwxh:17425klzzwxh:17426klzzwxh:17427klzzwxh:17428klzzwxh:17429klzzwxh:17430klzzwxh:17431klzzwxh:17432klzzwxh:17433klzzwxh:17434klzzwxh:17435klzzwxh:17436klzzwxh:17437klzzwxh:17438klzzwxh:17439klzzwxh:17440klzzwxh:17441klzzwxh:17442klzzwxh:17443klzzwxh:17444klzzwxh:17445klzzwxh:17446klzzwxh:17447 const char klzzwxh:17415dstklzzwxh:17416pathklzzwxh:17417 klzzwxh:17418

      klzzwxh:17465klzzwxh:17466klzzwxh:17467 davklzzwxh:17453node klzzwxh:17454n = node-klzzwxh:17468childs;klzzwxh:17490klzzwxh:17469klzzwxh:17470klzzwxh:17471 while klzzwxh:17455n klzzwxh:17456= NULLklzzwxh:17457 klzzwxh:17458klzzwxh:17491klzzwxh:17472klzzwxh:17473klzzwxh:17474klzzwxh:17475klzzwxh:17476klzzwxh:17477klzzwxh:17478 updateklzzwxh:17459pathklzzwxh:17460n, srcklzzwxh:17461path, dstklzzwxh:17462pathklzzwxh:17463;klzzwxh:17492klzzwxh:17479klzzwxh:17480klzzwxh:17481klzzwxh:17482klzzwxh:17483klzzwxh:17484klzzwxh:17485 n = n-klzzwxh:17486next;klzzwxh:17493klzzwxh:17487klzzwxh:17488klzzwxh:17489 klzzwxh:17464

      klzzwxh:17507klzzwxh:17508klzzwxh:17509 if klzzwxh:17494node-klzzwxh:17510path == NULL || strstrklzzwxh:17495node-klzzwxh:17511path, srcklzzwxh:17496pathklzzwxh:17497 klzzwxh:17498= node-klzzwxh:17512pathklzzwxh:17499 klzzwxh:17500klzzwxh:17547klzzwxh:17513klzzwxh:17514klzzwxh:17515klzzwxh:17516klzzwxh:17517klzzwxh:17518klzzwxh:17519 deleteklzzwxh:17501cacheklzzwxh:17502fileklzzwxh:17503node-klzzwxh:17520parentklzzwxh:17504;klzzwxh:17548klzzwxh:17521klzzwxh:17522klzzwxh:17523klzzwxh:17524klzzwxh:17525klzzwxh:17526klzzwxh:17527 node-klzzwxh:17528parent-klzzwxh:17529utime = 0;klzzwxh:17549klzzwxh:17530klzzwxh:17531klzzwxh:17532klzzwxh:17533klzzwxh:17534klzzwxh:17535klzzwxh:17536 klzzwxh:17505flush = 1;klzzwxh:17550klzzwxh:17537klzzwxh:17538klzzwxh:17539klzzwxh:17540klzzwxh:17541klzzwxh:17542klzzwxh:17543 return;klzzwxh:17551klzzwxh:17544klzzwxh:17545klzzwxh:17546 klzzwxh:17506

      klzzwxh:17563klzzwxh:17564klzzwxh:17565 char klzzwxh:17552path = neklzzwxh:17553concatklzzwxh:17554dstklzzwxh:17555path, node-klzzwxh:17566path + strlenklzzwxh:17556srcklzzwxh:17557pathklzzwxh:17558, NULLklzzwxh:17559;klzzwxh:17575klzzwxh:17567klzzwxh:17568klzzwxh:17569 freeklzzwxh:17560node-klzzwxh:17570pathklzzwxh:17561;klzzwxh:17576klzzwxh:17571klzzwxh:17572klzzwxh:17573 node-klzzwxh:17574path = path;klzzwxh:17577klzzwxh:17562

      /klzzwxh:17578 Get information about node. klzzwxh:17579/

      static int existsklzzwxh:17580const davklzzwxh:17581node klzzwxh:17582nodeklzzwxh:17583 klzzwxh:17584

      klzzwxh:17601klzzwxh:17602klzzwxh:17603 sizeklzzwxh:17585t i = klzzwxh:17586klzzwxh:17587sizeklzzwxh:17588tklzzwxh:17589 node / alignmentklzzwxh:17590 % tableklzzwxh:17591size;klzzwxh:17620klzzwxh:17604klzzwxh:17605klzzwxh:17606 davklzzwxh:17592node klzzwxh:17593n = tableklzzwxh:17594iklzzwxh:17595;klzzwxh:17621klzzwxh:17607klzzwxh:17608klzzwxh:17609 while klzzwxh:17596n klzzwxh:17597= NULL klzzwxh:17610klzzwxh:17611 n klzzwxh:17598= nodeklzzwxh:17599klzzwxh:17622klzzwxh:17612klzzwxh:17613klzzwxh:17614klzzwxh:17615klzzwxh:17616klzzwxh:17617klzzwxh:17618 n = n-klzzwxh:17619tableklzzwxh:17600next;

      klzzwxh:17632klzzwxh:17633klzzwxh:17634 if klzzwxh:17623n klzzwxh:17624= NULLklzzwxh:17625 klzzwxh:17626klzzwxh:17662klzzwxh:17635klzzwxh:17636klzzwxh:17637klzzwxh:17638klzzwxh:17639klzzwxh:17640klzzwxh:17641 return 1;klzzwxh:17663klzzwxh:17642klzzwxh:17643klzzwxh:17644 klzzwxh:17627 else klzzwxh:17628klzzwxh:17664klzzwxh:17645klzzwxh:17646klzzwxh:17647klzzwxh:17648klzzwxh:17649klzzwxh:17650klzzwxh:17651 klzzwxh:17629flush = 1;klzzwxh:17665klzzwxh:17652klzzwxh:17653klzzwxh:17654klzzwxh:17655klzzwxh:17656klzzwxh:17657klzzwxh:17658 return 0;klzzwxh:17666klzzwxh:17659klzzwxh:17660klzzwxh:17661 klzzwxh:17630klzzwxh:17667klzzwxh:17631

      static davklzzwxh:17668handle klzzwxh:17669getklzzwxh:17670fileklzzwxh:17671handleklzzwxh:17672davklzzwxh:17673node klzzwxh:17674 node, int fd, int accmode,klzzwxh:17713klzzwxh:17679klzzwxh:17680klzzwxh:17681klzzwxh:17682klzzwxh:17683klzzwxh:17684klzzwxh:17685klzzwxh:17686klzzwxh:17687klzzwxh:17688klzzwxh:17689klzzwxh:17690klzzwxh:17691klzzwxh:17692klzzwxh:17693klzzwxh:17694klzzwxh:17695klzzwxh:17696klzzwxh:17697klzzwxh:17698klzzwxh:17699klzzwxh:17700klzzwxh:17701klzzwxh:17702klzzwxh:17703klzzwxh:17704klzzwxh:17705klzzwxh:17706klzzwxh:17707klzzwxh:17708klzzwxh:17709klzzwxh:17710klzzwxh:17711klzzwxh:17712 pidklzzwxh:17675t pid, pidklzzwxh:17676t pgidklzzwxh:17677 klzzwxh:17678

      klzzwxh:17745klzzwxh:17746klzzwxh:17747 davklzzwxh:17714handle klzzwxh:17715fh = node-klzzwxh:17748handles;klzzwxh:17894klzzwxh:17749klzzwxh:17750klzzwxh:17751 if klzzwxh:17716fd klzzwxh:17717= 0klzzwxh:17718 klzzwxh:17719klzzwxh:17895klzzwxh:17752klzzwxh:17753klzzwxh:17754klzzwxh:17755klzzwxh:17756klzzwxh:17757klzzwxh:17758 while klzzwxh:17720fh klzzwxh:17721= NULL klzzwxh:17759klzzwxh:17760 fh-klzzwxh:17761fd klzzwxh:17722= fdklzzwxh:17723klzzwxh:17896klzzwxh:17762klzzwxh:17763klzzwxh:17764klzzwxh:17765klzzwxh:17766klzzwxh:17767klzzwxh:17768klzzwxh:17769klzzwxh:17770klzzwxh:17771klzzwxh:17772 fh = fh-klzzwxh:17773next;klzzwxh:17897klzzwxh:17774klzzwxh:17775klzzwxh:17776 klzzwxh:17724 else klzzwxh:17725klzzwxh:17898klzzwxh:17777klzzwxh:17778klzzwxh:17779klzzwxh:17780klzzwxh:17781klzzwxh:17782klzzwxh:17783 while klzzwxh:17726fh klzzwxh:17727= NULLklzzwxh:17899klzzwxh:17784klzzwxh:17785klzzwxh:17786klzzwxh:17787klzzwxh:17788klzzwxh:17789klzzwxh:17790klzzwxh:17791klzzwxh:17792klzzwxh:17793klzzwxh:17794klzzwxh:17795klzzwxh:17796klzzwxh:17797klzzwxh:17798 klzzwxh:17799klzzwxh:17800 klzzwxh:17728fh-klzzwxh:17801flags klzzwxh:17729= accmode || fh-klzzwxh:17802pid klzzwxh:17730= pidklzzwxh:17731klzzwxh:17732klzzwxh:17900klzzwxh:17803klzzwxh:17804klzzwxh:17805klzzwxh:17806klzzwxh:17807klzzwxh:17808klzzwxh:17809klzzwxh:17810klzzwxh:17811klzzwxh:17812klzzwxh:17813 fh = fh-klzzwxh:17814next;klzzwxh:17901klzzwxh:17815klzzwxh:17816klzzwxh:17817klzzwxh:17818klzzwxh:17819klzzwxh:17820klzzwxh:17821 if klzzwxh:17733fh == NULLklzzwxh:17734 klzzwxh:17735klzzwxh:17902klzzwxh:17822klzzwxh:17823klzzwxh:17824klzzwxh:17825klzzwxh:17826klzzwxh:17827klzzwxh:17828klzzwxh:17829klzzwxh:17830klzzwxh:17831klzzwxh:17832 fh = node-klzzwxh:17833handles;klzzwxh:17903klzzwxh:17834klzzwxh:17835klzzwxh:17836klzzwxh:17837klzzwxh:17838klzzwxh:17839klzzwxh:17840klzzwxh:17841klzzwxh:17842klzzwxh:17843klzzwxh:17844 while klzzwxh:17736fh klzzwxh:17737= NULLklzzwxh:17904klzzwxh:17845klzzwxh:17846klzzwxh:17847klzzwxh:17848klzzwxh:17849klzzwxh:17850klzzwxh:17851klzzwxh:17852klzzwxh:17853klzzwxh:17854klzzwxh:17855klzzwxh:17856klzzwxh:17857klzzwxh:17858klzzwxh:17859klzzwxh:17860klzzwxh:17861klzzwxh:17862klzzwxh:17863 klzzwxh:17864klzzwxh:17865 klzzwxh:17738fh-klzzwxh:17866flags klzzwxh:17739= accmode || fh-klzzwxh:17867pgid klzzwxh:17740= pgidklzzwxh:17741klzzwxh:17742klzzwxh:17905klzzwxh:17868klzzwxh:17869klzzwxh:17870klzzwxh:17871klzzwxh:17872klzzwxh:17873klzzwxh:17874klzzwxh:17875klzzwxh:17876klzzwxh:17877klzzwxh:17878klzzwxh:17879klzzwxh:17880klzzwxh:17881klzzwxh:17882 fh = fh-klzzwxh:17883next;klzzwxh:17906klzzwxh:17884klzzwxh:17885klzzwxh:17886klzzwxh:17887klzzwxh:17888klzzwxh:17889klzzwxh:17890 klzzwxh:17743klzzwxh:17907klzzwxh:17891klzzwxh:17892klzzwxh:17893 klzzwxh:17744

      klzzwxh:17909klzzwxh:17910klzzwxh:17911 return fh;klzzwxh:17912klzzwxh:17908

      /klzzwxh:17913 Checks whether user uid has access to node according to how.klzzwxh:17962klzzwxh:17926klzzwxh:17927 In any case the user must have execute permission for the parent of nodeklzzwxh:17963klzzwxh:17928klzzwxh:17929 and all of its parents up to the root node.klzzwxh:17964klzzwxh:17930klzzwxh:17931 int how : How to acces the node. May be any combination of Rklzzwxh:17914OK, Wklzzwxh:17915OK, Xklzzwxh:17916OKklzzwxh:17965klzzwxh:17932klzzwxh:17933klzzwxh:17934klzzwxh:17935klzzwxh:17936klzzwxh:17937klzzwxh:17938klzzwxh:17939klzzwxh:17940klzzwxh:17941klzzwxh:17942klzzwxh:17943 and Fklzzwxh:17917OK.klzzwxh:17966klzzwxh:17944klzzwxh:17945 return value: 1 access is allowed.klzzwxh:17967klzzwxh:17946klzzwxh:17947klzzwxh:17948klzzwxh:17949klzzwxh:17950klzzwxh:17951klzzwxh:17952klzzwxh:17953klzzwxh:17954klzzwxh:17955klzzwxh:17956klzzwxh:17957klzzwxh:17958klzzwxh:17959klzzwxh:17960klzzwxh:17961 0 access is denied. klzzwxh:17918/klzzwxh:17968static int hasklzzwxh:17919permissionklzzwxh:17920const davklzzwxh:17921node klzzwxh:17922node, uidklzzwxh:17923t uid, int howklzzwxh:17924 klzzwxh:17925

      klzzwxh:17971klzzwxh:17972klzzwxh:17973 if klzzwxh:17969uid == 0klzzwxh:17970klzzwxh:17981klzzwxh:17974klzzwxh:17975klzzwxh:17976klzzwxh:17977klzzwxh:17978klzzwxh:17979klzzwxh:17980 return 1;

      klzzwxh:17990klzzwxh:17991klzzwxh:17992 if klzzwxh:17982node-klzzwxh:17993parent klzzwxh:17983= NULL klzzwxh:17994klzzwxh:17995 klzzwxh:17984hasklzzwxh:17985permissionklzzwxh:17986node-klzzwxh:17996parent, uid, Xklzzwxh:17987OKklzzwxh:17988klzzwxh:17989klzzwxh:18004klzzwxh:17997klzzwxh:17998klzzwxh:17999klzzwxh:18000klzzwxh:18001klzzwxh:18002klzzwxh:18003 return 0;

      klzzwxh:18033klzzwxh:18034klzzwxh:18035 modeklzzwxh:18005t aklzzwxh:18006mode = klzzwxh:18007how klzzwxh:18036 Rklzzwxh:18008OKklzzwxh:18009 ? klzzwxh:18010Sklzzwxh:18011IRUSR | Sklzzwxh:18012IRGRP | Sklzzwxh:18013IROTHklzzwxh:18014 : 0;klzzwxh:18045klzzwxh:18037klzzwxh:18038klzzwxh:18039 aklzzwxh:18015mode |= klzzwxh:18016how klzzwxh:18040 Wklzzwxh:18017OKklzzwxh:18018 ? klzzwxh:18019Sklzzwxh:18020IWUSR | Sklzzwxh:18021IWGRP | Sklzzwxh:18022IWOTHklzzwxh:18023 : 0;klzzwxh:18046klzzwxh:18041klzzwxh:18042klzzwxh:18043 aklzzwxh:18024mode |= klzzwxh:18025how klzzwxh:18044 Xklzzwxh:18026OKklzzwxh:18027 ? klzzwxh:18028Sklzzwxh:18029IXUSR | Sklzzwxh:18030IXGRP | Sklzzwxh:18031IXOTHklzzwxh:18032 : 0;

      klzzwxh:18054klzzwxh:18055klzzwxh:18056 if klzzwxh:18047klzzwxh:18048klzzwxh:18049~node-klzzwxh:18057mode klzzwxh:18058 Sklzzwxh:18050IRWXO klzzwxh:18059 aklzzwxh:18051modeklzzwxh:18052klzzwxh:18053klzzwxh:18067klzzwxh:18060klzzwxh:18061klzzwxh:18062klzzwxh:18063klzzwxh:18064klzzwxh:18065klzzwxh:18066 return 1;

      klzzwxh:18075klzzwxh:18076klzzwxh:18077 if klzzwxh:18068node-klzzwxh:18078uid == uid klzzwxh:18079klzzwxh:18080 klzzwxh:18069klzzwxh:18070~node-klzzwxh:18081mode klzzwxh:18082 Sklzzwxh:18071IRWXU klzzwxh:18083 aklzzwxh:18072modeklzzwxh:18073klzzwxh:18074klzzwxh:18091klzzwxh:18084klzzwxh:18085klzzwxh:18086klzzwxh:18087klzzwxh:18088klzzwxh:18089klzzwxh:18090 return 1;

      klzzwxh:18129klzzwxh:18130klzzwxh:18131 struct passwd klzzwxh:18092pw = getpwuidklzzwxh:18093uidklzzwxh:18094;klzzwxh:18236klzzwxh:18132klzzwxh:18133klzzwxh:18134 if klzzwxh:18095pw == NULLklzzwxh:18096klzzwxh:18237klzzwxh:18135klzzwxh:18136klzzwxh:18137klzzwxh:18138klzzwxh:18139klzzwxh:18140klzzwxh:18141 return 0;klzzwxh:18238klzzwxh:18142klzzwxh:18143klzzwxh:18144 if klzzwxh:18097pw-klzzwxh:18145pwklzzwxh:18098gid klzzwxh:18099= node-klzzwxh:18146gidklzzwxh:18100 klzzwxh:18101klzzwxh:18239klzzwxh:18147klzzwxh:18148klzzwxh:18149klzzwxh:18150klzzwxh:18151klzzwxh:18152klzzwxh:18153 struct group klzzwxh:18102grp = getgrgidklzzwxh:18103node-klzzwxh:18154gidklzzwxh:18104;klzzwxh:18240klzzwxh:18155klzzwxh:18156klzzwxh:18157klzzwxh:18158klzzwxh:18159klzzwxh:18160klzzwxh:18161 if klzzwxh:18105grp == NULLklzzwxh:18106klzzwxh:18241klzzwxh:18162klzzwxh:18163klzzwxh:18164klzzwxh:18165klzzwxh:18166klzzwxh:18167klzzwxh:18168klzzwxh:18169klzzwxh:18170klzzwxh:18171klzzwxh:18172 return 0;klzzwxh:18242klzzwxh:18173klzzwxh:18174klzzwxh:18175klzzwxh:18176klzzwxh:18177klzzwxh:18178klzzwxh:18179 char klzzwxh:18107klzzwxh:18108members = grp-klzzwxh:18180grklzzwxh:18109mem;klzzwxh:18243klzzwxh:18181klzzwxh:18182klzzwxh:18183klzzwxh:18184klzzwxh:18185klzzwxh:18186klzzwxh:18187 while klzzwxh:18110klzzwxh:18111members klzzwxh:18112= NULL klzzwxh:18188klzzwxh:18189 strcmpklzzwxh:18113klzzwxh:18114members, pw-klzzwxh:18190pwklzzwxh:18115nameklzzwxh:18116 == 0klzzwxh:18117klzzwxh:18244klzzwxh:18191klzzwxh:18192klzzwxh:18193klzzwxh:18194klzzwxh:18195klzzwxh:18196klzzwxh:18197klzzwxh:18198klzzwxh:18199klzzwxh:18200klzzwxh:18201 members++;klzzwxh:18245klzzwxh:18202klzzwxh:18203klzzwxh:18204klzzwxh:18205klzzwxh:18206klzzwxh:18207klzzwxh:18208 if klzzwxh:18118klzzwxh:18119members == NULLklzzwxh:18120klzzwxh:18246klzzwxh:18209klzzwxh:18210klzzwxh:18211klzzwxh:18212klzzwxh:18213klzzwxh:18214klzzwxh:18215klzzwxh:18216klzzwxh:18217klzzwxh:18218klzzwxh:18219 return 0;klzzwxh:18247klzzwxh:18220klzzwxh:18221klzzwxh:18222 klzzwxh:18121klzzwxh:18248klzzwxh:18223klzzwxh:18224klzzwxh:18225 if klzzwxh:18122klzzwxh:18123klzzwxh:18124~node-klzzwxh:18226mode klzzwxh:18227 Sklzzwxh:18125IRWXG klzzwxh:18228 aklzzwxh:18126modeklzzwxh:18127klzzwxh:18128klzzwxh:18249klzzwxh:18229klzzwxh:18230klzzwxh:18231klzzwxh:18232klzzwxh:18233klzzwxh:18234klzzwxh:18235 return 1;

      klzzwxh:18251klzzwxh:18252klzzwxh:18253 return 0;klzzwxh:18254klzzwxh:18250

      /klzzwxh:18255 A node is considered busy if it is open for writing or, in case of aklzzwxh:18267klzzwxh:18263klzzwxh:18264 directory, if in the tree below the node there is any file open for write.klzzwxh:18268klzzwxh:18265klzzwxh:18266 return value : 1 if busy, 0 if not. klzzwxh:18256/klzzwxh:18269static int isklzzwxh:18257busyklzzwxh:18258const davklzzwxh:18259node klzzwxh:18260nodeklzzwxh:18261 klzzwxh:18262

      klzzwxh:18282klzzwxh:18283klzzwxh:18284 davklzzwxh:18270node klzzwxh:18271child = node-klzzwxh:18285childs;klzzwxh:18310klzzwxh:18286klzzwxh:18287klzzwxh:18288 while klzzwxh:18272child klzzwxh:18273= NULLklzzwxh:18274 klzzwxh:18275klzzwxh:18311klzzwxh:18289klzzwxh:18290klzzwxh:18291klzzwxh:18292klzzwxh:18293klzzwxh:18294klzzwxh:18295 if klzzwxh:18276isklzzwxh:18277busyklzzwxh:18278childklzzwxh:18279klzzwxh:18280klzzwxh:18312klzzwxh:18296klzzwxh:18297klzzwxh:18298klzzwxh:18299klzzwxh:18300klzzwxh:18301klzzwxh:18302klzzwxh:18303klzzwxh:18304klzzwxh:18305klzzwxh:18306 return 1;klzzwxh:18313klzzwxh:18307klzzwxh:18308klzzwxh:18309 klzzwxh:18281

      klzzwxh:18324klzzwxh:18325klzzwxh:18326 return klzzwxh:18314isklzzwxh:18315regklzzwxh:18316nodeklzzwxh:18317 klzzwxh:18327klzzwxh:18328 isklzzwxh:18318openklzzwxh:18319writeklzzwxh:18320nodeklzzwxh:18321klzzwxh:18322;klzzwxh:18329klzzwxh:18323

      /klzzwxh:18330 Checks whether node exists and is valid. The parent directory isklzzwxh:18340klzzwxh:18338klzzwxh:18339 updated if necessary. klzzwxh:18331/klzzwxh:18341static int isklzzwxh:18332validklzzwxh:18333const davklzzwxh:18334node klzzwxh:18335nodeklzzwxh:18336 klzzwxh:18337

      klzzwxh:18350klzzwxh:18351klzzwxh:18352 if klzzwxh:18342klzzwxh:18343existsklzzwxh:18344nodeklzzwxh:18345 || klzzwxh:18346node-klzzwxh:18353parent == NULL klzzwxh:18354klzzwxh:18355 node klzzwxh:18347= rootklzzwxh:18348klzzwxh:18349klzzwxh:18363klzzwxh:18356klzzwxh:18357klzzwxh:18358klzzwxh:18359klzzwxh:18360klzzwxh:18361klzzwxh:18362 return 0;

      klzzwxh:18366klzzwxh:18367klzzwxh:18368 if klzzwxh:18364node == root || node == backupklzzwxh:18365klzzwxh:18376klzzwxh:18369klzzwxh:18370klzzwxh:18371klzzwxh:18372klzzwxh:18373klzzwxh:18374klzzwxh:18375 return 1;

      klzzwxh:18388klzzwxh:18389klzzwxh:18390 updateklzzwxh:18377directoryklzzwxh:18378node-klzzwxh:18391parent, retryklzzwxh:18379;klzzwxh:18405klzzwxh:18392klzzwxh:18393klzzwxh:18394 if klzzwxh:18380klzzwxh:18381existsklzzwxh:18382nodeklzzwxh:18383 || klzzwxh:18384node-klzzwxh:18395parent == NULL klzzwxh:18396klzzwxh:18397 node klzzwxh:18385= rootklzzwxh:18386klzzwxh:18387klzzwxh:18406klzzwxh:18398klzzwxh:18399klzzwxh:18400klzzwxh:18401klzzwxh:18402klzzwxh:18403klzzwxh:18404 return 0;

      klzzwxh:18408klzzwxh:18409klzzwxh:18410 return 1;klzzwxh:18411klzzwxh:18407

      /klzzwxh:18412 Cache file functions. klzzwxh:18413/

      static void closeklzzwxh:18414fhklzzwxh:18415davklzzwxh:18416node klzzwxh:18417node, davklzzwxh:18418handle klzzwxh:18419fhklzzwxh:18420 klzzwxh:18421

      klzzwxh:18424klzzwxh:18425klzzwxh:18426 closeklzzwxh:18422fh-klzzwxh:18427fdklzzwxh:18423;

      klzzwxh:18455klzzwxh:18456klzzwxh:18457 davklzzwxh:18428handle klzzwxh:18429klzzwxh:18430fhp = klzzwxh:18458node-klzzwxh:18459handles;klzzwxh:18488klzzwxh:18460klzzwxh:18461klzzwxh:18462 while klzzwxh:18431klzzwxh:18432klzzwxh:18433fhpklzzwxh:18434 klzzwxh:18435= NULL klzzwxh:18463klzzwxh:18464 klzzwxh:18436klzzwxh:18437fhpklzzwxh:18438 klzzwxh:18439= fhklzzwxh:18440klzzwxh:18489klzzwxh:18465klzzwxh:18466klzzwxh:18467klzzwxh:18468klzzwxh:18469klzzwxh:18470klzzwxh:18471 fhp = klzzwxh:18472klzzwxh:18441klzzwxh:18442fhpklzzwxh:18443-klzzwxh:18473next;klzzwxh:18490klzzwxh:18474klzzwxh:18475klzzwxh:18476 if klzzwxh:18444klzzwxh:18445fhp klzzwxh:18446= NULLklzzwxh:18447klzzwxh:18491klzzwxh:18477klzzwxh:18478klzzwxh:18479klzzwxh:18480klzzwxh:18481klzzwxh:18482klzzwxh:18483 klzzwxh:18448fhp = klzzwxh:18449klzzwxh:18450fhpklzzwxh:18451-klzzwxh:18484next;klzzwxh:18492klzzwxh:18485klzzwxh:18486klzzwxh:18487 freeklzzwxh:18452fhklzzwxh:18453;klzzwxh:18493klzzwxh:18454

      /klzzwxh:18494 It creates a new empty cache file for node. If a cache file already exists,klzzwxh:18507klzzwxh:18503klzzwxh:18504 it does nothing.klzzwxh:18508klzzwxh:18505klzzwxh:18506 return value : 0 on success, EIO if no cache file could be created. klzzwxh:18495/klzzwxh:18509static int createklzzwxh:18496cacheklzzwxh:18497fileklzzwxh:18498davklzzwxh:18499node klzzwxh:18500nodeklzzwxh:18501 klzzwxh:18502

      klzzwxh:18529klzzwxh:18530klzzwxh:18531 if klzzwxh:18510node-klzzwxh:18532cacheklzzwxh:18511path klzzwxh:18512= NULLklzzwxh:18513 klzzwxh:18514klzzwxh:18581klzzwxh:18533klzzwxh:18534klzzwxh:18535klzzwxh:18536klzzwxh:18537klzzwxh:18538klzzwxh:18539 if klzzwxh:18515accessklzzwxh:18516node-klzzwxh:18540cacheklzzwxh:18517path, Fklzzwxh:18518OKklzzwxh:18519 == 0klzzwxh:18520 klzzwxh:18521klzzwxh:18582klzzwxh:18541klzzwxh:18542klzzwxh:18543klzzwxh:18544klzzwxh:18545klzzwxh:18546klzzwxh:18547klzzwxh:18548klzzwxh:18549klzzwxh:18550klzzwxh:18551 return 0;klzzwxh:18583klzzwxh:18552klzzwxh:18553klzzwxh:18554klzzwxh:18555klzzwxh:18556klzzwxh:18557klzzwxh:18558 klzzwxh:18522 else klzzwxh:18523klzzwxh:18584klzzwxh:18559klzzwxh:18560klzzwxh:18561klzzwxh:18562klzzwxh:18563klzzwxh:18564klzzwxh:18565klzzwxh:18566klzzwxh:18567klzzwxh:18568klzzwxh:18569 freeklzzwxh:18524node-klzzwxh:18570cacheklzzwxh:18525pathklzzwxh:18526;klzzwxh:18585klzzwxh:18571klzzwxh:18572klzzwxh:18573klzzwxh:18574klzzwxh:18575klzzwxh:18576klzzwxh:18577 klzzwxh:18527klzzwxh:18586klzzwxh:18578klzzwxh:18579klzzwxh:18580 klzzwxh:18528

      klzzwxh:18592klzzwxh:18593klzzwxh:18594 node-klzzwxh:18595cacheklzzwxh:18587path = neklzzwxh:18588concatklzzwxh:18589cacheklzzwxh:18590dir, klzzwxh:18596/klzzwxh:18597, node-klzzwxh:18598name, klzzwxh:18599-XXXXXXklzzwxh:18600, NULLklzzwxh:18591;

      klzzwxh:18632klzzwxh:18633klzzwxh:18634 int fd = mkstempklzzwxh:18601node-klzzwxh:18635cacheklzzwxh:18602pathklzzwxh:18603;klzzwxh:18697klzzwxh:18636klzzwxh:18637klzzwxh:18638 if klzzwxh:18604fd klzzwxh:18639= 0klzzwxh:18605 klzzwxh:18606klzzwxh:18698klzzwxh:18640klzzwxh:18641klzzwxh:18642klzzwxh:18643klzzwxh:18644klzzwxh:18645klzzwxh:18646 syslogklzzwxh:18607LOGklzzwxh:18608MAKEPRIklzzwxh:18609LOGklzzwxh:18610DAEMON, LOGklzzwxh:18611ERRklzzwxh:18612,klzzwxh:18699klzzwxh:18647klzzwxh:18648klzzwxh:18649klzzwxh:18650klzzwxh:18651klzzwxh:18652klzzwxh:18653klzzwxh:18654klzzwxh:18655klzzwxh:18656klzzwxh:18657klzzwxh:18658klzzwxh:18659klzzwxh:18660 klzzwxh:18613klzzwxh:18614klzzwxh:18661can't create cache file %sklzzwxh:18662klzzwxh:18615, node-klzzwxh:18663cacheklzzwxh:18616pathklzzwxh:18617;klzzwxh:18700klzzwxh:18664klzzwxh:18665klzzwxh:18666klzzwxh:18667klzzwxh:18668klzzwxh:18669klzzwxh:18670 syslogklzzwxh:18618LOGklzzwxh:18619MAKEPRIklzzwxh:18620LOGklzzwxh:18621DAEMON, LOGklzzwxh:18622ERRklzzwxh:18623, strerrorklzzwxh:18624errnoklzzwxh:18625klzzwxh:18626;klzzwxh:18701klzzwxh:18671klzzwxh:18672klzzwxh:18673klzzwxh:18674klzzwxh:18675klzzwxh:18676klzzwxh:18677 freeklzzwxh:18627node-klzzwxh:18678cacheklzzwxh:18628pathklzzwxh:18629;klzzwxh:18702klzzwxh:18679klzzwxh:18680klzzwxh:18681klzzwxh:18682klzzwxh:18683klzzwxh:18684klzzwxh:18685 node-klzzwxh:18686cacheklzzwxh:18630path = NULL;klzzwxh:18703klzzwxh:18687klzzwxh:18688klzzwxh:18689klzzwxh:18690klzzwxh:18691klzzwxh:18692klzzwxh:18693 return EIO;klzzwxh:18704klzzwxh:18694klzzwxh:18695klzzwxh:18696 klzzwxh:18631

      klzzwxh:18708klzzwxh:18709klzzwxh:18710 closeklzzwxh:18705fdklzzwxh:18706;klzzwxh:18714klzzwxh:18711klzzwxh:18712klzzwxh:18713 return 0;klzzwxh:18715klzzwxh:18707

      /klzzwxh:18716 Creates a file in the cache that holds dir-entries of directory dir.klzzwxh:18738klzzwxh:18728klzzwxh:18729 dir will be updated if necessary.klzzwxh:18739klzzwxh:18730klzzwxh:18731 If this file already exists, it does nothing.klzzwxh:18740klzzwxh:18732klzzwxh:18733 To write the dir-entries it calls the writeklzzwxh:18717dirklzzwxh:18718entry function of theklzzwxh:18741klzzwxh:18734klzzwxh:18735 kernel interface.klzzwxh:18742klzzwxh:18736klzzwxh:18737 return value : 0 on success, EIO if no cache file could be created. klzzwxh:18719/klzzwxh:18743static int createklzzwxh:18720dirklzzwxh:18721cacheklzzwxh:18722fileklzzwxh:18723davklzzwxh:18724node klzzwxh:18725dirklzzwxh:18726 klzzwxh:18727

      klzzwxh:18763klzzwxh:18764klzzwxh:18765 if klzzwxh:18744dir-klzzwxh:18766cacheklzzwxh:18745path klzzwxh:18746= NULLklzzwxh:18747 klzzwxh:18748klzzwxh:18815klzzwxh:18767klzzwxh:18768klzzwxh:18769klzzwxh:18770klzzwxh:18771klzzwxh:18772klzzwxh:18773 if klzzwxh:18749accessklzzwxh:18750dir-klzzwxh:18774cacheklzzwxh:18751path, Fklzzwxh:18752OKklzzwxh:18753 == 0klzzwxh:18754 klzzwxh:18755klzzwxh:18816klzzwxh:18775klzzwxh:18776klzzwxh:18777klzzwxh:18778klzzwxh:18779klzzwxh:18780klzzwxh:18781klzzwxh:18782klzzwxh:18783klzzwxh:18784klzzwxh:18785 return 0;klzzwxh:18817klzzwxh:18786klzzwxh:18787klzzwxh:18788klzzwxh:18789klzzwxh:18790klzzwxh:18791klzzwxh:18792 klzzwxh:18756 else klzzwxh:18757klzzwxh:18818klzzwxh:18793klzzwxh:18794klzzwxh:18795klzzwxh:18796klzzwxh:18797klzzwxh:18798klzzwxh:18799klzzwxh:18800klzzwxh:18801klzzwxh:18802klzzwxh:18803 freeklzzwxh:18758dir-klzzwxh:18804cacheklzzwxh:18759pathklzzwxh:18760;klzzwxh:18819klzzwxh:18805klzzwxh:18806klzzwxh:18807klzzwxh:18808klzzwxh:18809klzzwxh:18810klzzwxh:18811 klzzwxh:18761klzzwxh:18820klzzwxh:18812klzzwxh:18813klzzwxh:18814 klzzwxh:18762

      klzzwxh:18857klzzwxh:18858klzzwxh:18859 dir-klzzwxh:18860cacheklzzwxh:18821path = neklzzwxh:18822concatklzzwxh:18823cacheklzzwxh:18824dir, klzzwxh:18861/dir-klzzwxh:18862, dir-klzzwxh:18863name, klzzwxh:18864-XXXXXXklzzwxh:18865,klzzwxh:18963klzzwxh:18866klzzwxh:18867klzzwxh:18868klzzwxh:18869klzzwxh:18870klzzwxh:18871klzzwxh:18872klzzwxh:18873klzzwxh:18874klzzwxh:18875klzzwxh:18876klzzwxh:18877klzzwxh:18878klzzwxh:18879klzzwxh:18880klzzwxh:18881klzzwxh:18882klzzwxh:18883klzzwxh:18884klzzwxh:18885klzzwxh:18886klzzwxh:18887klzzwxh:18888klzzwxh:18889klzzwxh:18890klzzwxh:18891klzzwxh:18892klzzwxh:18893klzzwxh:18894klzzwxh:18895klzzwxh:18896klzzwxh:18897 NULLklzzwxh:18825;klzzwxh:18964klzzwxh:18898klzzwxh:18899klzzwxh:18900 int fd = mkstempklzzwxh:18826dir-klzzwxh:18901cacheklzzwxh:18827pathklzzwxh:18828;klzzwxh:18965klzzwxh:18902klzzwxh:18903klzzwxh:18904 if klzzwxh:18829fd klzzwxh:18905= 0klzzwxh:18830 klzzwxh:18831klzzwxh:18966klzzwxh:18906klzzwxh:18907klzzwxh:18908klzzwxh:18909klzzwxh:18910klzzwxh:18911klzzwxh:18912 syslogklzzwxh:18832LOGklzzwxh:18833MAKEPRIklzzwxh:18834LOGklzzwxh:18835DAEMON, LOGklzzwxh:18836ERRklzzwxh:18837,klzzwxh:18967klzzwxh:18913klzzwxh:18914klzzwxh:18915klzzwxh:18916klzzwxh:18917klzzwxh:18918klzzwxh:18919klzzwxh:18920klzzwxh:18921klzzwxh:18922klzzwxh:18923klzzwxh:18924klzzwxh:18925klzzwxh:18926 klzzwxh:18838klzzwxh:18839klzzwxh:18927can't create cache file %sklzzwxh:18928klzzwxh:18840, dir-klzzwxh:18929cacheklzzwxh:18841pathklzzwxh:18842;klzzwxh:18968klzzwxh:18930klzzwxh:18931klzzwxh:18932klzzwxh:18933klzzwxh:18934klzzwxh:18935klzzwxh:18936 syslogklzzwxh:18843LOGklzzwxh:18844MAKEPRIklzzwxh:18845LOGklzzwxh:18846DAEMON, LOGklzzwxh:18847ERRklzzwxh:18848, strerrorklzzwxh:18849errnoklzzwxh:18850klzzwxh:18851;klzzwxh:18969klzzwxh:18937klzzwxh:18938klzzwxh:18939klzzwxh:18940klzzwxh:18941klzzwxh:18942klzzwxh:18943 freeklzzwxh:18852dir-klzzwxh:18944cacheklzzwxh:18853pathklzzwxh:18854;klzzwxh:18970klzzwxh:18945klzzwxh:18946klzzwxh:18947klzzwxh:18948klzzwxh:18949klzzwxh:18950klzzwxh:18951 dir-klzzwxh:18952cacheklzzwxh:18855path = NULL;klzzwxh:18971klzzwxh:18953klzzwxh:18954klzzwxh:18955klzzwxh:18956klzzwxh:18957klzzwxh:18958klzzwxh:18959 return EIO;klzzwxh:18972klzzwxh:18960klzzwxh:18961klzzwxh:18962 klzzwxh:18856

      klzzwxh:18996klzzwxh:18997klzzwxh:18998 offklzzwxh:18973t size = writeklzzwxh:18974dirklzzwxh:18975entryklzzwxh:18976fd, 0, dir, klzzwxh:18999.klzzwxh:19000klzzwxh:18977;klzzwxh:19047klzzwxh:19001klzzwxh:19002klzzwxh:19003 if klzzwxh:18978size klzzwxh:19004 0 klzzwxh:19005klzzwxh:19006 dir-klzzwxh:19007parent klzzwxh:18979= NULLklzzwxh:18980klzzwxh:19048klzzwxh:19008klzzwxh:19009klzzwxh:19010klzzwxh:19011klzzwxh:19012klzzwxh:19013klzzwxh:19014 size = writeklzzwxh:18981dirklzzwxh:18982entryklzzwxh:18983fd, size, dir-klzzwxh:19015parent, klzzwxh:19016..klzzwxh:19017klzzwxh:18984;klzzwxh:19049klzzwxh:19018klzzwxh:19019klzzwxh:19020 davklzzwxh:18985node klzzwxh:18986node = dir-klzzwxh:19021childs;klzzwxh:19050klzzwxh:19022klzzwxh:19023klzzwxh:19024 while klzzwxh:18987size klzzwxh:19025 0 klzzwxh:19026klzzwxh:19027 node klzzwxh:18988= NULLklzzwxh:18989 klzzwxh:18990klzzwxh:19051klzzwxh:19028klzzwxh:19029klzzwxh:19030klzzwxh:19031klzzwxh:19032klzzwxh:19033klzzwxh:19034 size = writeklzzwxh:18991dirklzzwxh:18992entryklzzwxh:18993fd, size, node, node-klzzwxh:19035nameklzzwxh:18994;klzzwxh:19052klzzwxh:19036klzzwxh:19037klzzwxh:19038klzzwxh:19039klzzwxh:19040klzzwxh:19041klzzwxh:19042 node = node-klzzwxh:19043next;klzzwxh:19053klzzwxh:19044klzzwxh:19045klzzwxh:19046 klzzwxh:18995

      klzzwxh:19062klzzwxh:19063klzzwxh:19064 if klzzwxh:19054size klzzwxh:19065 0klzzwxh:19055klzzwxh:19076klzzwxh:19066klzzwxh:19067klzzwxh:19068klzzwxh:19069klzzwxh:19070klzzwxh:19071klzzwxh:19072 size = writeklzzwxh:19056dirklzzwxh:19057entryklzzwxh:19058fd, size, NULL, NULLklzzwxh:19059;klzzwxh:19077klzzwxh:19073klzzwxh:19074klzzwxh:19075 closeklzzwxh:19060fdklzzwxh:19061;

      klzzwxh:19103klzzwxh:19104klzzwxh:19105 if klzzwxh:19078size klzzwxh:19106 0klzzwxh:19079 klzzwxh:19080klzzwxh:19183klzzwxh:19107klzzwxh:19108klzzwxh:19109klzzwxh:19110klzzwxh:19111klzzwxh:19112klzzwxh:19113 dir-klzzwxh:19114size = size;klzzwxh:19184klzzwxh:19115klzzwxh:19116klzzwxh:19117klzzwxh:19118klzzwxh:19119klzzwxh:19120klzzwxh:19121 return 0;klzzwxh:19185klzzwxh:19122klzzwxh:19123klzzwxh:19124 klzzwxh:19081 else klzzwxh:19082klzzwxh:19186klzzwxh:19125klzzwxh:19126klzzwxh:19127klzzwxh:19128klzzwxh:19129klzzwxh:19130klzzwxh:19131 syslogklzzwxh:19083LOGklzzwxh:19084MAKEPRIklzzwxh:19085LOGklzzwxh:19086DAEMON, LOGklzzwxh:19087ERRklzzwxh:19088,klzzwxh:19187klzzwxh:19132klzzwxh:19133klzzwxh:19134klzzwxh:19135klzzwxh:19136klzzwxh:19137klzzwxh:19138klzzwxh:19139klzzwxh:19140klzzwxh:19141klzzwxh:19142klzzwxh:19143klzzwxh:19144klzzwxh:19145 klzzwxh:19089klzzwxh:19090klzzwxh:19146error writing directory %sklzzwxh:19147klzzwxh:19091, dir-klzzwxh:19148cacheklzzwxh:19092pathklzzwxh:19093;klzzwxh:19188klzzwxh:19149klzzwxh:19150klzzwxh:19151klzzwxh:19152klzzwxh:19153klzzwxh:19154klzzwxh:19155 removeklzzwxh:19094dir-klzzwxh:19156cacheklzzwxh:19095pathklzzwxh:19096;klzzwxh:19189klzzwxh:19157klzzwxh:19158klzzwxh:19159klzzwxh:19160klzzwxh:19161klzzwxh:19162klzzwxh:19163 freeklzzwxh:19097dir-klzzwxh:19164cacheklzzwxh:19098pathklzzwxh:19099;klzzwxh:19190klzzwxh:19165klzzwxh:19166klzzwxh:19167klzzwxh:19168klzzwxh:19169klzzwxh:19170klzzwxh:19171 dir-klzzwxh:19172cacheklzzwxh:19100path = NULL;klzzwxh:19191klzzwxh:19173klzzwxh:19174klzzwxh:19175klzzwxh:19176klzzwxh:19177klzzwxh:19178klzzwxh:19179 return EIO;klzzwxh:19192klzzwxh:19180klzzwxh:19181klzzwxh:19182 klzzwxh:19101klzzwxh:19193klzzwxh:19102

      /klzzwxh:19194 Opens the cache file of node using flags and stores the file descriptorklzzwxh:19233klzzwxh:19207klzzwxh:19208 in fd. A new structure davklzzwxh:19195handle is created and added to the listklzzwxh:19234klzzwxh:19209klzzwxh:19210 of handles.klzzwxh:19235klzzwxh:19211klzzwxh:19212 return value : 0 on success, EIO if the file could not be opend. klzzwxh:19196/klzzwxh:19236static int openklzzwxh:19197fileklzzwxh:19198int klzzwxh:19199fd, davklzzwxh:19200node klzzwxh:19201node, int flags, pidklzzwxh:19202t pid, pidklzzwxh:19203t pgid,klzzwxh:19237klzzwxh:19213klzzwxh:19214klzzwxh:19215klzzwxh:19216klzzwxh:19217klzzwxh:19218klzzwxh:19219klzzwxh:19220klzzwxh:19221klzzwxh:19222klzzwxh:19223klzzwxh:19224klzzwxh:19225klzzwxh:19226klzzwxh:19227klzzwxh:19228klzzwxh:19229klzzwxh:19230klzzwxh:19231klzzwxh:19232 uidklzzwxh:19204t uidklzzwxh:19205 klzzwxh:19206

      klzzwxh:19269klzzwxh:19270klzzwxh:19271 klzzwxh:19238fd = openklzzwxh:19239node-klzzwxh:19272cacheklzzwxh:19240path, flagsklzzwxh:19241;klzzwxh:19334klzzwxh:19273klzzwxh:19274klzzwxh:19275 if klzzwxh:19242klzzwxh:19243fd klzzwxh:19276= 0klzzwxh:19244klzzwxh:19335klzzwxh:19277klzzwxh:19278klzzwxh:19279klzzwxh:19280klzzwxh:19281klzzwxh:19282klzzwxh:19283 return EIO;klzzwxh:19336klzzwxh:19284klzzwxh:19285klzzwxh:19286 davklzzwxh:19245handle klzzwxh:19246fh = klzzwxh:19247davklzzwxh:19248handle klzzwxh:19249klzzwxh:19250 neklzzwxh:19251mallocklzzwxh:19252sizeofklzzwxh:19253davklzzwxh:19254handleklzzwxh:19255klzzwxh:19256;klzzwxh:19337klzzwxh:19287klzzwxh:19288klzzwxh:19289 fh-klzzwxh:19290fd = klzzwxh:19257fd;klzzwxh:19338klzzwxh:19291klzzwxh:19292klzzwxh:19293 fh-klzzwxh:19294flags = Oklzzwxh:19258ACCMODE klzzwxh:19295 flags;klzzwxh:19339klzzwxh:19296klzzwxh:19297klzzwxh:19298 fh-klzzwxh:19299pid = pid;klzzwxh:19340klzzwxh:19300klzzwxh:19301klzzwxh:19302 fh-klzzwxh:19303pgid = pgid;klzzwxh:19341klzzwxh:19304klzzwxh:19305klzzwxh:19306 fh-klzzwxh:19307uid = uid;klzzwxh:19342klzzwxh:19308klzzwxh:19309klzzwxh:19310 fh-klzzwxh:19311next = node-klzzwxh:19312handles;klzzwxh:19343klzzwxh:19313klzzwxh:19314klzzwxh:19315 node-klzzwxh:19316handles = fh;klzzwxh:19344klzzwxh:19317klzzwxh:19318klzzwxh:19319 if klzzwxh:19259klzzwxh:19260Oklzzwxh:19261ACCMODE klzzwxh:19320 flagsklzzwxh:19262 == Oklzzwxh:19263WRONLY || klzzwxh:19264Oklzzwxh:19265ACCMODE klzzwxh:19321 flagsklzzwxh:19266 == Oklzzwxh:19267RDWRklzzwxh:19268klzzwxh:19345klzzwxh:19322klzzwxh:19323klzzwxh:19324klzzwxh:19325klzzwxh:19326klzzwxh:19327klzzwxh:19328klzzwxh:19329klzzwxh:19330klzzwxh:19331klzzwxh:19332 node-klzzwxh:19333dirty = 1;

      klzzwxh:19347klzzwxh:19348klzzwxh:19349 return 0;klzzwxh:19350klzzwxh:19346

      /klzzwxh:19351 Updates the cached file from the server if necessary and possible, orklzzwxh:19380klzzwxh:19362klzzwxh:19363 retrieves one from the server if no cache file exists.klzzwxh:19381klzzwxh:19364klzzwxh:19365 It is not necessary or possible ifklzzwxh:19382klzzwxh:19366klzzwxh:19367 - node is in directory backupklzzwxh:19383klzzwxh:19368klzzwxh:19369 - node is created klzzwxh:19352does not yet exist on the serverklzzwxh:19353klzzwxh:19384klzzwxh:19370klzzwxh:19371 - node is open for writingklzzwxh:19385klzzwxh:19372klzzwxh:19373 - it has been updated within the last secondklzzwxh:19386klzzwxh:19374klzzwxh:19375 - node is dirty.klzzwxh:19387klzzwxh:19376klzzwxh:19377 If the node is dirty but not open for write, it will be stored back onklzzwxh:19388klzzwxh:19378klzzwxh:19379 the server. klzzwxh:19354/klzzwxh:19389static int updateklzzwxh:19355cacheklzzwxh:19356fileklzzwxh:19357davklzzwxh:19358node klzzwxh:19359nodeklzzwxh:19360 klzzwxh:19361

      klzzwxh:19421klzzwxh:19422klzzwxh:19423 if klzzwxh:19390isklzzwxh:19391backupklzzwxh:19392nodeklzzwxh:19393 || isklzzwxh:19394createdklzzwxh:19395nodeklzzwxh:19396 || isklzzwxh:19397openklzzwxh:19398writeklzzwxh:19399nodeklzzwxh:19400klzzwxh:19468klzzwxh:19424klzzwxh:19425klzzwxh:19426klzzwxh:19427klzzwxh:19428klzzwxh:19429klzzwxh:19430klzzwxh:19431klzzwxh:19432klzzwxh:19433klzzwxh:19434 || klzzwxh:19401isklzzwxh:19402dirtyklzzwxh:19403nodeklzzwxh:19404 klzzwxh:19435klzzwxh:19436 isklzzwxh:19405lockedklzzwxh:19406nodeklzzwxh:19407klzzwxh:19408klzzwxh:19409 klzzwxh:19410klzzwxh:19469klzzwxh:19437klzzwxh:19438klzzwxh:19439klzzwxh:19440klzzwxh:19441klzzwxh:19442klzzwxh:19443 if klzzwxh:19411debugklzzwxh:19412klzzwxh:19470klzzwxh:19444klzzwxh:19445klzzwxh:19446klzzwxh:19447klzzwxh:19448klzzwxh:19449klzzwxh:19450klzzwxh:19451klzzwxh:19452klzzwxh:19453klzzwxh:19454 syslogklzzwxh:19413LOGklzzwxh:19414MAKEPRIklzzwxh:19415LOGklzzwxh:19416DAEMON, LOGklzzwxh:19417DEBUGklzzwxh:19418, klzzwxh:19455klzzwxh:19456 no updateklzzwxh:19457klzzwxh:19419;klzzwxh:19471klzzwxh:19458klzzwxh:19459klzzwxh:19460klzzwxh:19461klzzwxh:19462klzzwxh:19463klzzwxh:19464 return 0;klzzwxh:19472klzzwxh:19465klzzwxh:19466klzzwxh:19467 klzzwxh:19420

      klzzwxh:19473klzzwxh:19474klzzwxh:19475 int ret = 0;

      klzzwxh:19512klzzwxh:19513klzzwxh:19514 if klzzwxh:19476isklzzwxh:19477dirtyklzzwxh:19478nodeklzzwxh:19479klzzwxh:19480 klzzwxh:19481klzzwxh:19718klzzwxh:19515klzzwxh:19516klzzwxh:19517klzzwxh:19518klzzwxh:19519klzzwxh:19520klzzwxh:19521 ret = davklzzwxh:19482putklzzwxh:19483node-klzzwxh:19522path, node-klzzwxh:19523cacheklzzwxh:19484path, klzzwxh:19524node-klzzwxh:19525remoteklzzwxh:19485exists,klzzwxh:19719klzzwxh:19526klzzwxh:19527klzzwxh:19528klzzwxh:19529klzzwxh:19530klzzwxh:19531klzzwxh:19532klzzwxh:19533klzzwxh:19534klzzwxh:19535klzzwxh:19536klzzwxh:19537klzzwxh:19538klzzwxh:19539klzzwxh:19540klzzwxh:19541klzzwxh:19542klzzwxh:19543klzzwxh:19544klzzwxh:19545klzzwxh:19546 klzzwxh:19547node-klzzwxh:19548lockklzzwxh:19486expire, klzzwxh:19549node-klzzwxh:19550etag, klzzwxh:19551node-klzzwxh:19552smtime,klzzwxh:19720klzzwxh:19553klzzwxh:19554klzzwxh:19555klzzwxh:19556klzzwxh:19557klzzwxh:19558klzzwxh:19559klzzwxh:19560klzzwxh:19561klzzwxh:19562klzzwxh:19563klzzwxh:19564klzzwxh:19565klzzwxh:19566klzzwxh:19567klzzwxh:19568klzzwxh:19569klzzwxh:19570klzzwxh:19571klzzwxh:19572klzzwxh:19573 klzzwxh:19574node-klzzwxh:19575mimeklzzwxh:19487type, -1klzzwxh:19488;klzzwxh:19721klzzwxh:19576klzzwxh:19577klzzwxh:19578klzzwxh:19579klzzwxh:19580klzzwxh:19581klzzwxh:19582 if klzzwxh:19489ret == 0klzzwxh:19490 klzzwxh:19491klzzwxh:19722klzzwxh:19583klzzwxh:19584klzzwxh:19585klzzwxh:19586klzzwxh:19587klzzwxh:19588klzzwxh:19589klzzwxh:19590klzzwxh:19591klzzwxh:19592klzzwxh:19593 node-klzzwxh:19594utime = timeklzzwxh:19492NULLklzzwxh:19493;klzzwxh:19723klzzwxh:19595klzzwxh:19596klzzwxh:19597klzzwxh:19598klzzwxh:19599klzzwxh:19600klzzwxh:19601klzzwxh:19602klzzwxh:19603klzzwxh:19604klzzwxh:19605 node-klzzwxh:19606dirty = 0;klzzwxh:19724klzzwxh:19607klzzwxh:19608klzzwxh:19609klzzwxh:19610klzzwxh:19611klzzwxh:19612klzzwxh:19613klzzwxh:19614klzzwxh:19615klzzwxh:19616klzzwxh:19617 removeklzzwxh:19494fromklzzwxh:19495changedklzzwxh:19496nodeklzzwxh:19497;klzzwxh:19725klzzwxh:19618klzzwxh:19619klzzwxh:19620klzzwxh:19621klzzwxh:19622klzzwxh:19623klzzwxh:19624 klzzwxh:19498 else if klzzwxh:19499ret == EACCES || ret == EINVAL || ret == ENOENTklzzwxh:19726klzzwxh:19625klzzwxh:19626klzzwxh:19627klzzwxh:19628klzzwxh:19629klzzwxh:19630klzzwxh:19631klzzwxh:19632klzzwxh:19633klzzwxh:19634klzzwxh:19635klzzwxh:19636klzzwxh:19637klzzwxh:19638klzzwxh:19639klzzwxh:19640klzzwxh:19641klzzwxh:19642 || ret == EPERM || ret == ENOSPCklzzwxh:19500 klzzwxh:19501klzzwxh:19727klzzwxh:19643klzzwxh:19644klzzwxh:19645klzzwxh:19646klzzwxh:19647klzzwxh:19648klzzwxh:19649klzzwxh:19650klzzwxh:19651klzzwxh:19652klzzwxh:19653 deleteklzzwxh:19502cacheklzzwxh:19503fileklzzwxh:19504node-klzzwxh:19654parentklzzwxh:19505;klzzwxh:19728klzzwxh:19655klzzwxh:19656klzzwxh:19657klzzwxh:19658klzzwxh:19659klzzwxh:19660klzzwxh:19661klzzwxh:19662klzzwxh:19663klzzwxh:19664klzzwxh:19665 node-klzzwxh:19666parent-klzzwxh:19667utime = 0;klzzwxh:19729klzzwxh:19668klzzwxh:19669klzzwxh:19670klzzwxh:19671klzzwxh:19672klzzwxh:19673klzzwxh:19674klzzwxh:19675klzzwxh:19676klzzwxh:19677klzzwxh:19678 klzzwxh:19506flush = 1;klzzwxh:19730klzzwxh:19679klzzwxh:19680klzzwxh:19681klzzwxh:19682klzzwxh:19683klzzwxh:19684klzzwxh:19685klzzwxh:19686klzzwxh:19687klzzwxh:19688klzzwxh:19689 removeklzzwxh:19507nodeklzzwxh:19508nodeklzzwxh:19509;klzzwxh:19731klzzwxh:19690klzzwxh:19691klzzwxh:19692klzzwxh:19693klzzwxh:19694klzzwxh:19695klzzwxh:19696klzzwxh:19697klzzwxh:19698klzzwxh:19699klzzwxh:19700 ret = EIO;klzzwxh:19732klzzwxh:19701klzzwxh:19702klzzwxh:19703klzzwxh:19704klzzwxh:19705klzzwxh:19706klzzwxh:19707 klzzwxh:19510klzzwxh:19733klzzwxh:19708klzzwxh:19709klzzwxh:19710klzzwxh:19711klzzwxh:19712klzzwxh:19713klzzwxh:19714 return ret;klzzwxh:19734klzzwxh:19715klzzwxh:19716klzzwxh:19717 klzzwxh:19511

      klzzwxh:19757klzzwxh:19758klzzwxh:19759 if klzzwxh:19735guiklzzwxh:19736optimize klzzwxh:19760klzzwxh:19761 isklzzwxh:19737cachedklzzwxh:19738nodeklzzwxh:19739klzzwxh:19815klzzwxh:19762klzzwxh:19763klzzwxh:19764klzzwxh:19765klzzwxh:19766klzzwxh:19767klzzwxh:19768klzzwxh:19769klzzwxh:19770klzzwxh:19771klzzwxh:19772klzzwxh:19773klzzwxh:19774klzzwxh:19775klzzwxh:19776klzzwxh:19777klzzwxh:19778klzzwxh:19779klzzwxh:19780 klzzwxh:19781klzzwxh:19782 timeklzzwxh:19740NULLklzzwxh:19741 klzzwxh:19783 klzzwxh:19742node-klzzwxh:19784utime +fileklzzwxh:19743refreshklzzwxh:19744klzzwxh:19745 klzzwxh:19746klzzwxh:19816klzzwxh:19785klzzwxh:19786klzzwxh:19787klzzwxh:19788klzzwxh:19789klzzwxh:19790klzzwxh:19791 updateklzzwxh:19747directoryklzzwxh:19748node-klzzwxh:19792parent, fileklzzwxh:19749refreshklzzwxh:19750;klzzwxh:19817klzzwxh:19793klzzwxh:19794klzzwxh:19795klzzwxh:19796klzzwxh:19797klzzwxh:19798klzzwxh:19799 if klzzwxh:19751klzzwxh:19752existsklzzwxh:19753nodeklzzwxh:19754 || node-klzzwxh:19800parent == NULLklzzwxh:19755klzzwxh:19818klzzwxh:19801klzzwxh:19802klzzwxh:19803klzzwxh:19804klzzwxh:19805klzzwxh:19806klzzwxh:19807klzzwxh:19808klzzwxh:19809klzzwxh:19810klzzwxh:19811 return ENOENT;klzzwxh:19819klzzwxh:19812klzzwxh:19813klzzwxh:19814 klzzwxh:19756

      klzzwxh:19910klzzwxh:19911klzzwxh:19912 if klzzwxh:19820isklzzwxh:19821cachedklzzwxh:19822nodeklzzwxh:19823 klzzwxh:19913klzzwxh:19914 accessklzzwxh:19824node-klzzwxh:19915cacheklzzwxh:19825path, Fklzzwxh:19826OKklzzwxh:19827 == 0klzzwxh:19828 klzzwxh:19829klzzwxh:20409klzzwxh:19916klzzwxh:19917klzzwxh:19918klzzwxh:19919klzzwxh:19920klzzwxh:19921klzzwxh:19922 if klzzwxh:19830timeklzzwxh:19831NULLklzzwxh:19832 klzzwxh:19923= klzzwxh:19833node-klzzwxh:19924utime + fileklzzwxh:19834refreshklzzwxh:19835klzzwxh:19836klzzwxh:20410klzzwxh:19925klzzwxh:19926klzzwxh:19927klzzwxh:19928klzzwxh:19929klzzwxh:19930klzzwxh:19931klzzwxh:19932klzzwxh:19933klzzwxh:19934klzzwxh:19935 return 0;klzzwxh:20411klzzwxh:19936klzzwxh:19937klzzwxh:19938klzzwxh:19939klzzwxh:19940klzzwxh:19941klzzwxh:19942 int modified = 0;klzzwxh:20412klzzwxh:19943klzzwxh:19944klzzwxh:19945klzzwxh:19946klzzwxh:19947klzzwxh:19948klzzwxh:19949 offklzzwxh:19837t oldklzzwxh:19838size = node-klzzwxh:19950size;klzzwxh:20413klzzwxh:19951klzzwxh:19952klzzwxh:19953klzzwxh:19954klzzwxh:19955klzzwxh:19956klzzwxh:19957 ret = davklzzwxh:19839getklzzwxh:19840fileklzzwxh:19841node-klzzwxh:19958path, node-klzzwxh:19959cacheklzzwxh:19842path, klzzwxh:19960node-klzzwxh:19961size,klzzwxh:20414klzzwxh:19962klzzwxh:19963klzzwxh:19964klzzwxh:19965klzzwxh:19966klzzwxh:19967klzzwxh:19968klzzwxh:19969klzzwxh:19970klzzwxh:19971klzzwxh:19972klzzwxh:19973klzzwxh:19974klzzwxh:19975klzzwxh:19976klzzwxh:19977klzzwxh:19978klzzwxh:19979klzzwxh:19980klzzwxh:19981klzzwxh:19982klzzwxh:19983klzzwxh:19984klzzwxh:19985klzzwxh:19986klzzwxh:19987 klzzwxh:19988node-klzzwxh:19989etag, klzzwxh:19990node-klzzwxh:19991smtime, klzzwxh:19992node-klzzwxh:19993mimeklzzwxh:19843type,klzzwxh:20415klzzwxh:19994klzzwxh:19995klzzwxh:19996klzzwxh:19997klzzwxh:19998klzzwxh:19999klzzwxh:20000klzzwxh:20001klzzwxh:20002klzzwxh:20003klzzwxh:20004klzzwxh:20005klzzwxh:20006klzzwxh:20007klzzwxh:20008klzzwxh:20009klzzwxh:20010klzzwxh:20011klzzwxh:20012klzzwxh:20013klzzwxh:20014klzzwxh:20015klzzwxh:20016klzzwxh:20017klzzwxh:20018klzzwxh:20019 klzzwxh:20020modifiedklzzwxh:19844;klzzwxh:20416klzzwxh:20021klzzwxh:20022klzzwxh:20023klzzwxh:20024klzzwxh:20025klzzwxh:20026klzzwxh:20027 if klzzwxh:19845ret == 0klzzwxh:19846 klzzwxh:19847klzzwxh:20417klzzwxh:20028klzzwxh:20029klzzwxh:20030klzzwxh:20031klzzwxh:20032klzzwxh:20033klzzwxh:20034klzzwxh:20035klzzwxh:20036klzzwxh:20037klzzwxh:20038 if klzzwxh:19848modifiedklzzwxh:19849 klzzwxh:19850klzzwxh:20418klzzwxh:20039klzzwxh:20040klzzwxh:20041klzzwxh:20042klzzwxh:20043klzzwxh:20044klzzwxh:20045klzzwxh:20046klzzwxh:20047klzzwxh:20048klzzwxh:20049klzzwxh:20050klzzwxh:20051klzzwxh:20052klzzwxh:20053 node-klzzwxh:20054mtime = node-klzzwxh:20055smtime;klzzwxh:20419klzzwxh:20056klzzwxh:20057klzzwxh:20058klzzwxh:20059klzzwxh:20060klzzwxh:20061klzzwxh:20062klzzwxh:20063klzzwxh:20064klzzwxh:20065klzzwxh:20066klzzwxh:20067klzzwxh:20068klzzwxh:20069klzzwxh:20070 node-klzzwxh:20071atime = node-klzzwxh:20072smtime;klzzwxh:20420klzzwxh:20073klzzwxh:20074klzzwxh:20075klzzwxh:20076klzzwxh:20077klzzwxh:20078klzzwxh:20079klzzwxh:20080klzzwxh:20081klzzwxh:20082klzzwxh:20083klzzwxh:20084klzzwxh:20085klzzwxh:20086klzzwxh:20087 setklzzwxh:19851cacheklzzwxh:19852fileklzzwxh:19853timesklzzwxh:19854nodeklzzwxh:19855;klzzwxh:20421klzzwxh:20088klzzwxh:20089klzzwxh:20090klzzwxh:20091klzzwxh:20092klzzwxh:20093klzzwxh:20094klzzwxh:20095klzzwxh:20096klzzwxh:20097klzzwxh:20098 klzzwxh:19856klzzwxh:20422klzzwxh:20099klzzwxh:20100klzzwxh:20101klzzwxh:20102klzzwxh:20103klzzwxh:20104klzzwxh:20105klzzwxh:20106klzzwxh:20107klzzwxh:20108klzzwxh:20109 node-klzzwxh:20110utime = timeklzzwxh:19857NULLklzzwxh:19858;klzzwxh:20423klzzwxh:20111klzzwxh:20112klzzwxh:20113klzzwxh:20114klzzwxh:20115klzzwxh:20116klzzwxh:20117klzzwxh:20118klzzwxh:20119klzzwxh:20120klzzwxh:20121 cacheklzzwxh:19859size += node-klzzwxh:20122size - oldklzzwxh:19860size;klzzwxh:20424klzzwxh:20123klzzwxh:20124klzzwxh:20125klzzwxh:20126klzzwxh:20127klzzwxh:20128klzzwxh:20129 klzzwxh:19861klzzwxh:20425klzzwxh:20130klzzwxh:20131klzzwxh:20132 klzzwxh:19862 else klzzwxh:19863klzzwxh:20426klzzwxh:20133klzzwxh:20134klzzwxh:20135klzzwxh:20136klzzwxh:20137klzzwxh:20138klzzwxh:20139 if klzzwxh:19864createklzzwxh:19865cacheklzzwxh:19866fileklzzwxh:19867nodeklzzwxh:19868 klzzwxh:19869= 0klzzwxh:19870klzzwxh:20427klzzwxh:20140klzzwxh:20141klzzwxh:20142klzzwxh:20143klzzwxh:20144klzzwxh:20145klzzwxh:20146klzzwxh:20147klzzwxh:20148klzzwxh:20149klzzwxh:20150 return EIO;klzzwxh:20428klzzwxh:20151klzzwxh:20152klzzwxh:20153klzzwxh:20154klzzwxh:20155klzzwxh:20156klzzwxh:20157 timeklzzwxh:19871t smtime = 0;klzzwxh:20429klzzwxh:20158klzzwxh:20159klzzwxh:20160klzzwxh:20161klzzwxh:20162klzzwxh:20163klzzwxh:20164 char klzzwxh:19872etag = NULL;klzzwxh:20430klzzwxh:20165klzzwxh:20166klzzwxh:20167klzzwxh:20168klzzwxh:20169klzzwxh:20170klzzwxh:20171 ret = davklzzwxh:19873getklzzwxh:19874fileklzzwxh:19875node-klzzwxh:20172path, node-klzzwxh:20173cacheklzzwxh:19876path, klzzwxh:20174node-klzzwxh:20175size, klzzwxh:20176etag,klzzwxh:20431klzzwxh:20177klzzwxh:20178klzzwxh:20179klzzwxh:20180klzzwxh:20181klzzwxh:20182klzzwxh:20183klzzwxh:20184klzzwxh:20185klzzwxh:20186klzzwxh:20187klzzwxh:20188klzzwxh:20189klzzwxh:20190klzzwxh:20191klzzwxh:20192klzzwxh:20193klzzwxh:20194klzzwxh:20195klzzwxh:20196klzzwxh:20197klzzwxh:20198klzzwxh:20199klzzwxh:20200klzzwxh:20201klzzwxh:20202 klzzwxh:20203smtime, klzzwxh:20204node-klzzwxh:20205mimeklzzwxh:19877type, NULLklzzwxh:19878;klzzwxh:20432klzzwxh:20206klzzwxh:20207klzzwxh:20208klzzwxh:20209klzzwxh:20210klzzwxh:20211klzzwxh:20212 if klzzwxh:19879ret == 0klzzwxh:19880 klzzwxh:19881klzzwxh:20433klzzwxh:20213klzzwxh:20214klzzwxh:20215klzzwxh:20216klzzwxh:20217klzzwxh:20218klzzwxh:20219klzzwxh:20220klzzwxh:20221klzzwxh:20222klzzwxh:20223 node-klzzwxh:20224etag = etag;klzzwxh:20434klzzwxh:20225klzzwxh:20226klzzwxh:20227klzzwxh:20228klzzwxh:20229klzzwxh:20230klzzwxh:20231klzzwxh:20232klzzwxh:20233klzzwxh:20234klzzwxh:20235 node-klzzwxh:20236atime = smtime;klzzwxh:20435klzzwxh:20237klzzwxh:20238klzzwxh:20239klzzwxh:20240klzzwxh:20241klzzwxh:20242klzzwxh:20243klzzwxh:20244klzzwxh:20245klzzwxh:20246klzzwxh:20247 node-klzzwxh:20248mtime = smtime;klzzwxh:20436klzzwxh:20249klzzwxh:20250klzzwxh:20251klzzwxh:20252klzzwxh:20253klzzwxh:20254klzzwxh:20255klzzwxh:20256klzzwxh:20257klzzwxh:20258klzzwxh:20259 node-klzzwxh:20260smtime = smtime;klzzwxh:20437klzzwxh:20261klzzwxh:20262klzzwxh:20263klzzwxh:20264klzzwxh:20265klzzwxh:20266klzzwxh:20267klzzwxh:20268klzzwxh:20269klzzwxh:20270klzzwxh:20271 node-klzzwxh:20272utime = timeklzzwxh:19882NULLklzzwxh:19883;klzzwxh:20438klzzwxh:20273klzzwxh:20274klzzwxh:20275klzzwxh:20276klzzwxh:20277klzzwxh:20278klzzwxh:20279klzzwxh:20280klzzwxh:20281klzzwxh:20282klzzwxh:20283 setklzzwxh:19884cacheklzzwxh:19885fileklzzwxh:19886timesklzzwxh:19887nodeklzzwxh:19888;klzzwxh:20439klzzwxh:20284klzzwxh:20285klzzwxh:20286klzzwxh:20287klzzwxh:20288klzzwxh:20289klzzwxh:20290klzzwxh:20291klzzwxh:20292klzzwxh:20293klzzwxh:20294 cacheklzzwxh:19889size += node-klzzwxh:20295size;klzzwxh:20440klzzwxh:20296klzzwxh:20297klzzwxh:20298klzzwxh:20299klzzwxh:20300klzzwxh:20301klzzwxh:20302 klzzwxh:19890 else klzzwxh:19891klzzwxh:20441klzzwxh:20303klzzwxh:20304klzzwxh:20305klzzwxh:20306klzzwxh:20307klzzwxh:20308klzzwxh:20309klzzwxh:20310klzzwxh:20311klzzwxh:20312klzzwxh:20313 if klzzwxh:19892ret == ENOENTklzzwxh:19893 klzzwxh:19894klzzwxh:20442klzzwxh:20314klzzwxh:20315klzzwxh:20316klzzwxh:20317klzzwxh:20318klzzwxh:20319klzzwxh:20320klzzwxh:20321klzzwxh:20322klzzwxh:20323klzzwxh:20324klzzwxh:20325klzzwxh:20326klzzwxh:20327klzzwxh:20328 deleteklzzwxh:19895cacheklzzwxh:19896fileklzzwxh:19897node-klzzwxh:20329parentklzzwxh:19898;klzzwxh:20443klzzwxh:20330klzzwxh:20331klzzwxh:20332klzzwxh:20333klzzwxh:20334klzzwxh:20335klzzwxh:20336klzzwxh:20337klzzwxh:20338klzzwxh:20339klzzwxh:20340klzzwxh:20341klzzwxh:20342klzzwxh:20343klzzwxh:20344 node-klzzwxh:20345parent-klzzwxh:20346utime = 0;klzzwxh:20444klzzwxh:20347klzzwxh:20348klzzwxh:20349klzzwxh:20350klzzwxh:20351klzzwxh:20352klzzwxh:20353klzzwxh:20354klzzwxh:20355klzzwxh:20356klzzwxh:20357klzzwxh:20358klzzwxh:20359klzzwxh:20360klzzwxh:20361 klzzwxh:19899flush = 1;klzzwxh:20445klzzwxh:20362klzzwxh:20363klzzwxh:20364klzzwxh:20365klzzwxh:20366klzzwxh:20367klzzwxh:20368klzzwxh:20369klzzwxh:20370klzzwxh:20371klzzwxh:20372klzzwxh:20373klzzwxh:20374klzzwxh:20375klzzwxh:20376 removeklzzwxh:19900nodeklzzwxh:19901nodeklzzwxh:19902;klzzwxh:20446klzzwxh:20377klzzwxh:20378klzzwxh:20379klzzwxh:20380klzzwxh:20381klzzwxh:20382klzzwxh:20383klzzwxh:20384klzzwxh:20385klzzwxh:20386klzzwxh:20387 klzzwxh:19903klzzwxh:20447klzzwxh:20388klzzwxh:20389klzzwxh:20390klzzwxh:20391klzzwxh:20392klzzwxh:20393klzzwxh:20394klzzwxh:20395klzzwxh:20396klzzwxh:20397klzzwxh:20398 deleteklzzwxh:19904cacheklzzwxh:19905fileklzzwxh:19906nodeklzzwxh:19907;klzzwxh:20448klzzwxh:20399klzzwxh:20400klzzwxh:20401klzzwxh:20402klzzwxh:20403klzzwxh:20404klzzwxh:20405 klzzwxh:19908klzzwxh:20449klzzwxh:20406klzzwxh:20407klzzwxh:20408 klzzwxh:19909

      klzzwxh:20451klzzwxh:20452klzzwxh:20453 return ret;klzzwxh:20454klzzwxh:20450

      /klzzwxh:20455 Permanent cache maintenance. klzzwxh:20456/

      /klzzwxh:20457 Checks whether there is an cache directory for the server host, path path,klzzwxh:20517klzzwxh:20469klzzwxh:20470 mountpoint mpoint and the defaultklzzwxh:20458user in the top level cache directory dir.klzzwxh:20518klzzwxh:20471klzzwxh:20472 If not it will create one. In case of an error it will print an errorklzzwxh:20519klzzwxh:20473klzzwxh:20474 message and terminate the program.klzzwxh:20520klzzwxh:20475klzzwxh:20476 dirklzzwxh:20477klzzwxh:20478klzzwxh:20479 : The top level cache directory.klzzwxh:20521klzzwxh:20480klzzwxh:20481 hostklzzwxh:20482klzzwxh:20483 : Domain name of the server.klzzwxh:20522klzzwxh:20484klzzwxh:20485 pathklzzwxh:20486klzzwxh:20487 : Path of the resource onthe server.klzzwxh:20523klzzwxh:20488klzzwxh:20489 mpoint : Mount point. klzzwxh:20459/klzzwxh:20524static void checkklzzwxh:20460cacheklzzwxh:20461dirklzzwxh:20462const char klzzwxh:20463dir, const char klzzwxh:20464host,klzzwxh:20525klzzwxh:20490klzzwxh:20491klzzwxh:20492klzzwxh:20493klzzwxh:20494klzzwxh:20495klzzwxh:20496klzzwxh:20497klzzwxh:20498klzzwxh:20499klzzwxh:20500klzzwxh:20501klzzwxh:20502klzzwxh:20503klzzwxh:20504klzzwxh:20505klzzwxh:20506klzzwxh:20507klzzwxh:20508klzzwxh:20509klzzwxh:20510klzzwxh:20511klzzwxh:20512klzzwxh:20513klzzwxh:20514klzzwxh:20515klzzwxh:20516 const char klzzwxh:20465path, const char klzzwxh:20466mpointklzzwxh:20467 klzzwxh:20468

      klzzwxh:20565klzzwxh:20566klzzwxh:20567 struct passwd klzzwxh:20526pw = getpwuidklzzwxh:20527defaultklzzwxh:20528uidklzzwxh:20529;klzzwxh:20613klzzwxh:20568klzzwxh:20569klzzwxh:20570 if klzzwxh:20530pw == NULL || pw-klzzwxh:20571pwklzzwxh:20531name == NULLklzzwxh:20532klzzwxh:20614klzzwxh:20572klzzwxh:20573klzzwxh:20574klzzwxh:20575klzzwxh:20576klzzwxh:20577klzzwxh:20578 errorklzzwxh:20533EXITklzzwxh:20534FAILURE, 0, klzzwxh:20535klzzwxh:20536klzzwxh:20579can't read user data baseklzzwxh:20580klzzwxh:20537klzzwxh:20538;klzzwxh:20615klzzwxh:20581klzzwxh:20582klzzwxh:20583 char klzzwxh:20539dirklzzwxh:20540name = neklzzwxh:20541concatklzzwxh:20542host, path, mpoint + 1, klzzwxh:20584+klzzwxh:20585, pw-klzzwxh:20586pwklzzwxh:20543name, NULLklzzwxh:20544;klzzwxh:20616klzzwxh:20587klzzwxh:20588klzzwxh:20589 klzzwxh:20545klzzwxh:20546dirklzzwxh:20547name + strlenklzzwxh:20548hostklzzwxh:20549 + strlenklzzwxh:20550pathklzzwxh:20551 - 1klzzwxh:20552 = '+';klzzwxh:20617klzzwxh:20590klzzwxh:20591klzzwxh:20592 char klzzwxh:20553pos = strchrklzzwxh:20554dirklzzwxh:20555name, '/'klzzwxh:20556;klzzwxh:20618klzzwxh:20593klzzwxh:20594klzzwxh:20595 while klzzwxh:20557pos klzzwxh:20558= NULLklzzwxh:20559 klzzwxh:20560klzzwxh:20619klzzwxh:20596klzzwxh:20597klzzwxh:20598klzzwxh:20599klzzwxh:20600klzzwxh:20601klzzwxh:20602 klzzwxh:20561pos = '-';klzzwxh:20620klzzwxh:20603klzzwxh:20604klzzwxh:20605klzzwxh:20606klzzwxh:20607klzzwxh:20608klzzwxh:20609 pos = strchrklzzwxh:20562pos, '/'klzzwxh:20563;klzzwxh:20621klzzwxh:20610klzzwxh:20611klzzwxh:20612 klzzwxh:20564

      klzzwxh:20635klzzwxh:20636klzzwxh:20637 DIR klzzwxh:20622tlklzzwxh:20623dir = opendirklzzwxh:20624dirklzzwxh:20625;klzzwxh:20650klzzwxh:20638klzzwxh:20639klzzwxh:20640 if klzzwxh:20626tlklzzwxh:20627dir == NULLklzzwxh:20628klzzwxh:20651klzzwxh:20641klzzwxh:20642klzzwxh:20643klzzwxh:20644klzzwxh:20645klzzwxh:20646klzzwxh:20647 errorklzzwxh:20629EXITklzzwxh:20630FAILURE, 0, klzzwxh:20631klzzwxh:20632klzzwxh:20648can't open cache directory %sklzzwxh:20649klzzwxh:20633, dirklzzwxh:20634;

      klzzwxh:20678klzzwxh:20679klzzwxh:20680 struct dirent klzzwxh:20652de = readdirklzzwxh:20653tlklzzwxh:20654dirklzzwxh:20655;klzzwxh:20725klzzwxh:20681klzzwxh:20682klzzwxh:20683 while klzzwxh:20656de klzzwxh:20657= NULL klzzwxh:20684klzzwxh:20685 cacheklzzwxh:20658dir == NULLklzzwxh:20659 klzzwxh:20660klzzwxh:20726klzzwxh:20686klzzwxh:20687klzzwxh:20688klzzwxh:20689klzzwxh:20690klzzwxh:20691klzzwxh:20692 if klzzwxh:20661strcmpklzzwxh:20662de-klzzwxh:20693dklzzwxh:20663name, dirklzzwxh:20664nameklzzwxh:20665 == 0klzzwxh:20666 klzzwxh:20667klzzwxh:20727klzzwxh:20694klzzwxh:20695klzzwxh:20696klzzwxh:20697klzzwxh:20698klzzwxh:20699klzzwxh:20700klzzwxh:20701klzzwxh:20702klzzwxh:20703klzzwxh:20704 cacheklzzwxh:20668dir = neklzzwxh:20669concatklzzwxh:20670dir, klzzwxh:20705/klzzwxh:20706, de-klzzwxh:20707dklzzwxh:20671name, NULLklzzwxh:20672;klzzwxh:20728klzzwxh:20708klzzwxh:20709klzzwxh:20710klzzwxh:20711klzzwxh:20712klzzwxh:20713klzzwxh:20714 klzzwxh:20673klzzwxh:20729klzzwxh:20715klzzwxh:20716klzzwxh:20717klzzwxh:20718klzzwxh:20719klzzwxh:20720klzzwxh:20721 de = readdirklzzwxh:20674tlklzzwxh:20675dirklzzwxh:20676;klzzwxh:20730klzzwxh:20722klzzwxh:20723klzzwxh:20724 klzzwxh:20677

      klzzwxh:20734klzzwxh:20735klzzwxh:20736 closedirklzzwxh:20731tlklzzwxh:20732dirklzzwxh:20733;

      klzzwxh:20764klzzwxh:20765klzzwxh:20766 if klzzwxh:20737cacheklzzwxh:20738dir == NULLklzzwxh:20739 klzzwxh:20740klzzwxh:20813klzzwxh:20767klzzwxh:20768klzzwxh:20769klzzwxh:20770klzzwxh:20771klzzwxh:20772klzzwxh:20773 cacheklzzwxh:20741dir = neklzzwxh:20742concatklzzwxh:20743dir, klzzwxh:20774/klzzwxh:20775, dirklzzwxh:20744name, NULLklzzwxh:20745;klzzwxh:20814klzzwxh:20776klzzwxh:20777klzzwxh:20778klzzwxh:20779klzzwxh:20780klzzwxh:20781klzzwxh:20782 if klzzwxh:20746mkdirklzzwxh:20747cacheklzzwxh:20748dir, Sklzzwxh:20749IRWXUklzzwxh:20750 klzzwxh:20751= 0klzzwxh:20752klzzwxh:20815klzzwxh:20783klzzwxh:20784klzzwxh:20785klzzwxh:20786klzzwxh:20787klzzwxh:20788klzzwxh:20789klzzwxh:20790klzzwxh:20791klzzwxh:20792klzzwxh:20793 errorklzzwxh:20753EXITklzzwxh:20754FAILURE, 0, klzzwxh:20755klzzwxh:20756klzzwxh:20794can't create cache directory %sklzzwxh:20795klzzwxh:20757,klzzwxh:20816klzzwxh:20796klzzwxh:20797klzzwxh:20798klzzwxh:20799klzzwxh:20800klzzwxh:20801klzzwxh:20802klzzwxh:20803klzzwxh:20804klzzwxh:20805klzzwxh:20806 cacheklzzwxh:20758dirklzzwxh:20759;klzzwxh:20817klzzwxh:20807klzzwxh:20808klzzwxh:20809 klzzwxh:20760klzzwxh:20818klzzwxh:20810klzzwxh:20811klzzwxh:20812 freeklzzwxh:20761dirklzzwxh:20762nameklzzwxh:20763;

      klzzwxh:20862klzzwxh:20863klzzwxh:20864 struct stat st;klzzwxh:20942klzzwxh:20865klzzwxh:20866klzzwxh:20867 if klzzwxh:20819statklzzwxh:20820cacheklzzwxh:20821dir, klzzwxh:20868stklzzwxh:20822 klzzwxh:20823= 0klzzwxh:20824klzzwxh:20943klzzwxh:20869klzzwxh:20870klzzwxh:20871klzzwxh:20872klzzwxh:20873klzzwxh:20874klzzwxh:20875 errorklzzwxh:20825EXITklzzwxh:20826FAILURE, 0, klzzwxh:20827klzzwxh:20828klzzwxh:20876can't access cache directory %sklzzwxh:20877klzzwxh:20829,klzzwxh:20944klzzwxh:20878klzzwxh:20879klzzwxh:20880klzzwxh:20881klzzwxh:20882klzzwxh:20883klzzwxh:20884klzzwxh:20885klzzwxh:20886klzzwxh:20887klzzwxh:20888klzzwxh:20889klzzwxh:20890 cacheklzzwxh:20830dirklzzwxh:20831;klzzwxh:20945klzzwxh:20891klzzwxh:20892klzzwxh:20893 if klzzwxh:20832st.stklzzwxh:20833uid klzzwxh:20834= geteuidklzzwxh:20835klzzwxh:20836klzzwxh:20837klzzwxh:20946klzzwxh:20894klzzwxh:20895klzzwxh:20896klzzwxh:20897klzzwxh:20898klzzwxh:20899klzzwxh:20900 errorklzzwxh:20838EXITklzzwxh:20839FAILURE, 0, klzzwxh:20840klzzwxh:20841klzzwxh:20901wrong owner of cache directory %sklzzwxh:20902klzzwxh:20842,klzzwxh:20947klzzwxh:20903klzzwxh:20904klzzwxh:20905klzzwxh:20906klzzwxh:20907klzzwxh:20908klzzwxh:20909klzzwxh:20910klzzwxh:20911klzzwxh:20912klzzwxh:20913klzzwxh:20914klzzwxh:20915 cacheklzzwxh:20843dirklzzwxh:20844;klzzwxh:20948klzzwxh:20916klzzwxh:20917klzzwxh:20918 if klzzwxh:20845klzzwxh:20846DAVklzzwxh:20847Aklzzwxh:20848MASK klzzwxh:20919 st.stklzzwxh:20849modeklzzwxh:20850 klzzwxh:20851= Sklzzwxh:20852IRWXUklzzwxh:20853klzzwxh:20949klzzwxh:20920klzzwxh:20921klzzwxh:20922klzzwxh:20923klzzwxh:20924klzzwxh:20925klzzwxh:20926 errorklzzwxh:20854EXITklzzwxh:20855FAILURE, 0,klzzwxh:20950klzzwxh:20927klzzwxh:20928klzzwxh:20929klzzwxh:20930klzzwxh:20931klzzwxh:20932klzzwxh:20933klzzwxh:20934klzzwxh:20935klzzwxh:20936klzzwxh:20937klzzwxh:20938klzzwxh:20939 klzzwxh:20856klzzwxh:20857klzzwxh:20940wrong permissions set for cache directory %sklzzwxh:20941klzzwxh:20858, cacheklzzwxh:20859dirklzzwxh:20860;klzzwxh:20951klzzwxh:20861

      /klzzwxh:20952 Searches cache for orphaned files and puts them into backup. klzzwxh:20953/klzzwxh:20958static void cleanklzzwxh:20954cacheklzzwxh:20955voidklzzwxh:20956 klzzwxh:20957

      klzzwxh:20965klzzwxh:20966klzzwxh:20967 DIR klzzwxh:20959dir = opendirklzzwxh:20960cacheklzzwxh:20961dirklzzwxh:20962;klzzwxh:20978klzzwxh:20968klzzwxh:20969klzzwxh:20970 if klzzwxh:20963dir == NULLklzzwxh:20964klzzwxh:20979klzzwxh:20971klzzwxh:20972klzzwxh:20973klzzwxh:20974klzzwxh:20975klzzwxh:20976klzzwxh:20977 return;

      klzzwxh:20987klzzwxh:20988klzzwxh:20989 struct dirent klzzwxh:20980de = readdirklzzwxh:20981dirklzzwxh:20982;klzzwxh:20993klzzwxh:20990klzzwxh:20991klzzwxh:20992 while klzzwxh:20983de klzzwxh:20984= NULLklzzwxh:20985 klzzwxh:20986

      klzzwxh:21091klzzwxh:21092klzzwxh:21093klzzwxh:21094klzzwxh:21095klzzwxh:21096klzzwxh:21097 if klzzwxh:20994strcmpklzzwxh:20995de-klzzwxh:21098dklzzwxh:20996name, klzzwxh:21099.klzzwxh:21100klzzwxh:20997 klzzwxh:20998= 0 klzzwxh:21101klzzwxh:21102 strcmpklzzwxh:20999de-klzzwxh:21103dklzzwxh:21000name, klzzwxh:21104..klzzwxh:21105klzzwxh:21001 klzzwxh:21002= 0klzzwxh:21556klzzwxh:21106klzzwxh:21107klzzwxh:21108klzzwxh:21109klzzwxh:21110klzzwxh:21111klzzwxh:21112klzzwxh:21113klzzwxh:21114klzzwxh:21115klzzwxh:21116klzzwxh:21117klzzwxh:21118klzzwxh:21119klzzwxh:21120 klzzwxh:21121klzzwxh:21122 strcmpklzzwxh:21003de-klzzwxh:21123dklzzwxh:21004name, DAVklzzwxh:21005INDEXklzzwxh:21006 klzzwxh:21007= 0klzzwxh:21008 klzzwxh:21009klzzwxh:21557klzzwxh:21124klzzwxh:21125klzzwxh:21126klzzwxh:21127klzzwxh:21128klzzwxh:21129klzzwxh:21130klzzwxh:21131klzzwxh:21132klzzwxh:21133klzzwxh:21134 char klzzwxh:21010path = neklzzwxh:21011concatklzzwxh:21012cacheklzzwxh:21013dir, klzzwxh:21135/klzzwxh:21136, de-klzzwxh:21137dklzzwxh:21014name, NULLklzzwxh:21015;klzzwxh:21558klzzwxh:21138klzzwxh:21139klzzwxh:21140klzzwxh:21141klzzwxh:21142klzzwxh:21143klzzwxh:21144klzzwxh:21145klzzwxh:21146klzzwxh:21147klzzwxh:21148 int i = 0;klzzwxh:21559klzzwxh:21149klzzwxh:21150klzzwxh:21151klzzwxh:21152klzzwxh:21153klzzwxh:21154klzzwxh:21155klzzwxh:21156klzzwxh:21157klzzwxh:21158klzzwxh:21159 davklzzwxh:21016node klzzwxh:21017node = NULL;klzzwxh:21560klzzwxh:21160klzzwxh:21161klzzwxh:21162klzzwxh:21163klzzwxh:21164klzzwxh:21165klzzwxh:21166klzzwxh:21167klzzwxh:21168klzzwxh:21169klzzwxh:21170 while klzzwxh:21018node == NULL klzzwxh:21171klzzwxh:21172 i klzzwxh:21173 tableklzzwxh:21019sizeklzzwxh:21020 klzzwxh:21021klzzwxh:21561klzzwxh:21174klzzwxh:21175klzzwxh:21176klzzwxh:21177klzzwxh:21178klzzwxh:21179klzzwxh:21180klzzwxh:21181klzzwxh:21182klzzwxh:21183klzzwxh:21184klzzwxh:21185klzzwxh:21186klzzwxh:21187klzzwxh:21188 node = tableklzzwxh:21022iklzzwxh:21023;klzzwxh:21562klzzwxh:21189klzzwxh:21190klzzwxh:21191klzzwxh:21192klzzwxh:21193klzzwxh:21194klzzwxh:21195klzzwxh:21196klzzwxh:21197klzzwxh:21198klzzwxh:21199klzzwxh:21200klzzwxh:21201klzzwxh:21202klzzwxh:21203 while klzzwxh:21024node klzzwxh:21025= NULLklzzwxh:21563klzzwxh:21204klzzwxh:21205klzzwxh:21206klzzwxh:21207klzzwxh:21208klzzwxh:21209klzzwxh:21210klzzwxh:21211klzzwxh:21212klzzwxh:21213klzzwxh:21214klzzwxh:21215klzzwxh:21216klzzwxh:21217klzzwxh:21218klzzwxh:21219klzzwxh:21220klzzwxh:21221klzzwxh:21222klzzwxh:21223klzzwxh:21224klzzwxh:21225klzzwxh:21226 klzzwxh:21227klzzwxh:21228 klzzwxh:21026klzzwxh:21027isklzzwxh:21028regklzzwxh:21029nodeklzzwxh:21030 || node-klzzwxh:21229cacheklzzwxh:21031path == NULLklzzwxh:21564klzzwxh:21230klzzwxh:21231klzzwxh:21232klzzwxh:21233klzzwxh:21234klzzwxh:21235klzzwxh:21236klzzwxh:21237klzzwxh:21238klzzwxh:21239klzzwxh:21240klzzwxh:21241klzzwxh:21242klzzwxh:21243klzzwxh:21244klzzwxh:21245klzzwxh:21246klzzwxh:21247klzzwxh:21248klzzwxh:21249klzzwxh:21250klzzwxh:21251klzzwxh:21252klzzwxh:21253klzzwxh:21254klzzwxh:21255klzzwxh:21256 || strcmpklzzwxh:21032path, node-klzzwxh:21257cacheklzzwxh:21033pathklzzwxh:21034 klzzwxh:21035= 0klzzwxh:21036klzzwxh:21037 klzzwxh:21038klzzwxh:21565klzzwxh:21258klzzwxh:21259klzzwxh:21260klzzwxh:21261klzzwxh:21262klzzwxh:21263klzzwxh:21264klzzwxh:21265klzzwxh:21266klzzwxh:21267klzzwxh:21268klzzwxh:21269klzzwxh:21270klzzwxh:21271klzzwxh:21272klzzwxh:21273klzzwxh:21274klzzwxh:21275klzzwxh:21276 node = node-klzzwxh:21277tableklzzwxh:21039next;klzzwxh:21566klzzwxh:21278klzzwxh:21279klzzwxh:21280klzzwxh:21281klzzwxh:21282klzzwxh:21283klzzwxh:21284klzzwxh:21285klzzwxh:21286klzzwxh:21287klzzwxh:21288klzzwxh:21289klzzwxh:21290klzzwxh:21291klzzwxh:21292 klzzwxh:21040klzzwxh:21567klzzwxh:21293klzzwxh:21294klzzwxh:21295klzzwxh:21296klzzwxh:21297klzzwxh:21298klzzwxh:21299klzzwxh:21300klzzwxh:21301klzzwxh:21302klzzwxh:21303klzzwxh:21304klzzwxh:21305klzzwxh:21306klzzwxh:21307 i++;klzzwxh:21568klzzwxh:21308klzzwxh:21309klzzwxh:21310klzzwxh:21311klzzwxh:21312klzzwxh:21313klzzwxh:21314klzzwxh:21315klzzwxh:21316klzzwxh:21317klzzwxh:21318 klzzwxh:21041klzzwxh:21569klzzwxh:21319klzzwxh:21320klzzwxh:21321klzzwxh:21322klzzwxh:21323klzzwxh:21324klzzwxh:21325klzzwxh:21326klzzwxh:21327klzzwxh:21328klzzwxh:21329 if klzzwxh:21042node == NULLklzzwxh:21043 klzzwxh:21044klzzwxh:21570klzzwxh:21330klzzwxh:21331klzzwxh:21332klzzwxh:21333klzzwxh:21334klzzwxh:21335klzzwxh:21336klzzwxh:21337klzzwxh:21338klzzwxh:21339klzzwxh:21340klzzwxh:21341klzzwxh:21342klzzwxh:21343klzzwxh:21344 syslogklzzwxh:21045LOGklzzwxh:21046MAKEPRIklzzwxh:21047LOGklzzwxh:21048DAEMON, LOGklzzwxh:21049ERRklzzwxh:21050,klzzwxh:21571klzzwxh:21345klzzwxh:21346klzzwxh:21347klzzwxh:21348klzzwxh:21349klzzwxh:21350klzzwxh:21351klzzwxh:21352klzzwxh:21353klzzwxh:21354klzzwxh:21355klzzwxh:21356klzzwxh:21357klzzwxh:21358klzzwxh:21359klzzwxh:21360klzzwxh:21361klzzwxh:21362klzzwxh:21363klzzwxh:21364klzzwxh:21365klzzwxh:21366klzzwxh:21367klzzwxh:21368klzzwxh:21369klzzwxh:21370klzzwxh:21371klzzwxh:21372klzzwxh:21373klzzwxh:21374klzzwxh:21375klzzwxh:21376klzzwxh:21377klzzwxh:21378 klzzwxh:21051klzzwxh:21052klzzwxh:21379found orphaned file in cache:klzzwxh:21380klzzwxh:21053klzzwxh:21054;klzzwxh:21572klzzwxh:21381klzzwxh:21382klzzwxh:21383klzzwxh:21384klzzwxh:21385klzzwxh:21386klzzwxh:21387klzzwxh:21388klzzwxh:21389klzzwxh:21390klzzwxh:21391klzzwxh:21392klzzwxh:21393klzzwxh:21394klzzwxh:21395 syslogklzzwxh:21055LOGklzzwxh:21056MAKEPRIklzzwxh:21057LOGklzzwxh:21058DAEMON, LOGklzzwxh:21059ERRklzzwxh:21060, klzzwxh:21396klzzwxh:21397 %sklzzwxh:21398, pathklzzwxh:21061;klzzwxh:21573klzzwxh:21399klzzwxh:21400klzzwxh:21401klzzwxh:21402klzzwxh:21403klzzwxh:21404klzzwxh:21405klzzwxh:21406klzzwxh:21407klzzwxh:21408klzzwxh:21409klzzwxh:21410klzzwxh:21411klzzwxh:21412klzzwxh:21413 davklzzwxh:21062node klzzwxh:21063found = newklzzwxh:21064nodeklzzwxh:21065backup, defaultklzzwxh:21066fileklzzwxh:21067modeklzzwxh:21068;klzzwxh:21574klzzwxh:21414klzzwxh:21415klzzwxh:21416klzzwxh:21417klzzwxh:21418klzzwxh:21419klzzwxh:21420klzzwxh:21421klzzwxh:21422klzzwxh:21423klzzwxh:21424klzzwxh:21425klzzwxh:21426klzzwxh:21427klzzwxh:21428 found-klzzwxh:21429mode klzzwxh:21430= ~klzzwxh:21069Sklzzwxh:21070IRWXG | Sklzzwxh:21071IRWXOklzzwxh:21072;klzzwxh:21575klzzwxh:21431klzzwxh:21432klzzwxh:21433klzzwxh:21434klzzwxh:21435klzzwxh:21436klzzwxh:21437klzzwxh:21438klzzwxh:21439klzzwxh:21440klzzwxh:21441klzzwxh:21442klzzwxh:21443klzzwxh:21444klzzwxh:21445 found-klzzwxh:21446cacheklzzwxh:21073path = path;klzzwxh:21576klzzwxh:21447klzzwxh:21448klzzwxh:21449klzzwxh:21450klzzwxh:21451klzzwxh:21452klzzwxh:21453klzzwxh:21454klzzwxh:21455klzzwxh:21456klzzwxh:21457klzzwxh:21458klzzwxh:21459klzzwxh:21460klzzwxh:21461 found-klzzwxh:21462name = neklzzwxh:21074strdupklzzwxh:21075de-klzzwxh:21463dklzzwxh:21076nameklzzwxh:21077;klzzwxh:21577klzzwxh:21464klzzwxh:21465klzzwxh:21466klzzwxh:21467klzzwxh:21468klzzwxh:21469klzzwxh:21470klzzwxh:21471klzzwxh:21472klzzwxh:21473klzzwxh:21474klzzwxh:21475klzzwxh:21476klzzwxh:21477klzzwxh:21478 attrklzzwxh:21078fromklzzwxh:21079cacheklzzwxh:21080fileklzzwxh:21081foundklzzwxh:21082;klzzwxh:21578klzzwxh:21479klzzwxh:21480klzzwxh:21481klzzwxh:21482klzzwxh:21483klzzwxh:21484klzzwxh:21485klzzwxh:21486klzzwxh:21487klzzwxh:21488klzzwxh:21489klzzwxh:21490klzzwxh:21491klzzwxh:21492klzzwxh:21493 backup-klzzwxh:21494mtime = timeklzzwxh:21083NULLklzzwxh:21084;klzzwxh:21579klzzwxh:21495klzzwxh:21496klzzwxh:21497klzzwxh:21498klzzwxh:21499klzzwxh:21500klzzwxh:21501klzzwxh:21502klzzwxh:21503klzzwxh:21504klzzwxh:21505klzzwxh:21506klzzwxh:21507klzzwxh:21508klzzwxh:21509 backup-klzzwxh:21510ctime = backup-klzzwxh:21511mtime;klzzwxh:21580klzzwxh:21512klzzwxh:21513klzzwxh:21514klzzwxh:21515klzzwxh:21516klzzwxh:21517klzzwxh:21518klzzwxh:21519klzzwxh:21520klzzwxh:21521klzzwxh:21522 klzzwxh:21085 else klzzwxh:21086klzzwxh:21581klzzwxh:21523klzzwxh:21524klzzwxh:21525klzzwxh:21526klzzwxh:21527klzzwxh:21528klzzwxh:21529klzzwxh:21530klzzwxh:21531klzzwxh:21532klzzwxh:21533klzzwxh:21534klzzwxh:21535klzzwxh:21536klzzwxh:21537 freeklzzwxh:21087pathklzzwxh:21088;klzzwxh:21582klzzwxh:21538klzzwxh:21539klzzwxh:21540klzzwxh:21541klzzwxh:21542klzzwxh:21543klzzwxh:21544klzzwxh:21545klzzwxh:21546klzzwxh:21547klzzwxh:21548 klzzwxh:21089klzzwxh:21583klzzwxh:21549klzzwxh:21550klzzwxh:21551klzzwxh:21552klzzwxh:21553klzzwxh:21554klzzwxh:21555 klzzwxh:21090

      klzzwxh:21587klzzwxh:21588klzzwxh:21589klzzwxh:21590klzzwxh:21591klzzwxh:21592klzzwxh:21593 de = readdirklzzwxh:21584dirklzzwxh:21585;klzzwxh:21597klzzwxh:21594klzzwxh:21595klzzwxh:21596 klzzwxh:21586

      klzzwxh:21601klzzwxh:21602klzzwxh:21603 closedirklzzwxh:21598dirklzzwxh:21599;klzzwxh:21604klzzwxh:21600

      /klzzwxh:21605 Reads the index file of the cache and creates a tree of nodes from theklzzwxh:21617klzzwxh:21611klzzwxh:21612 XML data in the index file. Will be called when the cache module is klzzwxh:21618klzzwxh:21613klzzwxh:21614 initialized. The root node must already exist.klzzwxh:21619klzzwxh:21615klzzwxh:21616 If an error occurs all nodes created up to this will be deleted. klzzwxh:21606/klzzwxh:21620static void parseklzzwxh:21607indexklzzwxh:21608voidklzzwxh:21609 klzzwxh:21610

      klzzwxh:21632klzzwxh:21633klzzwxh:21634 char klzzwxh:21621index = neklzzwxh:21622concatklzzwxh:21623cacheklzzwxh:21624dir, klzzwxh:21635/klzzwxh:21636, DAVklzzwxh:21625INDEX, NULLklzzwxh:21626;klzzwxh:21652klzzwxh:21637klzzwxh:21638klzzwxh:21639 FILE klzzwxh:21627idx = fopenklzzwxh:21628index, klzzwxh:21640rklzzwxh:21641klzzwxh:21629;klzzwxh:21653klzzwxh:21642klzzwxh:21643klzzwxh:21644 if klzzwxh:21630idx == NULLklzzwxh:21631klzzwxh:21654klzzwxh:21645klzzwxh:21646klzzwxh:21647klzzwxh:21648klzzwxh:21649klzzwxh:21650klzzwxh:21651 return;

      klzzwxh:21678klzzwxh:21679klzzwxh:21680 char klzzwxh:21655buf = neklzzwxh:21656mallocklzzwxh:21657DAVklzzwxh:21658XMLklzzwxh:21659BUFklzzwxh:21660SIZEklzzwxh:21661;klzzwxh:21719klzzwxh:21681klzzwxh:21682klzzwxh:21683 sizeklzzwxh:21662t len = freadklzzwxh:21663buf, 1, DAVklzzwxh:21664XMLklzzwxh:21665BUFklzzwxh:21666SIZE, idxklzzwxh:21667;klzzwxh:21720klzzwxh:21684klzzwxh:21685klzzwxh:21686 if klzzwxh:21668len klzzwxh:21687= 0klzzwxh:21669 klzzwxh:21670klzzwxh:21721klzzwxh:21688klzzwxh:21689klzzwxh:21690klzzwxh:21691klzzwxh:21692klzzwxh:21693klzzwxh:21694 freeklzzwxh:21671bufklzzwxh:21672;klzzwxh:21722klzzwxh:21695klzzwxh:21696klzzwxh:21697klzzwxh:21698klzzwxh:21699klzzwxh:21700klzzwxh:21701 fcloseklzzwxh:21673idxklzzwxh:21674;klzzwxh:21723klzzwxh:21702klzzwxh:21703klzzwxh:21704klzzwxh:21705klzzwxh:21706klzzwxh:21707klzzwxh:21708 freeklzzwxh:21675indexklzzwxh:21676;klzzwxh:21724klzzwxh:21709klzzwxh:21710klzzwxh:21711klzzwxh:21712klzzwxh:21713klzzwxh:21714klzzwxh:21715 return;klzzwxh:21725klzzwxh:21716klzzwxh:21717klzzwxh:21718 klzzwxh:21677

      klzzwxh:21844klzzwxh:21845klzzwxh:21846 davklzzwxh:21726node klzzwxh:21727node = root;klzzwxh:21988klzzwxh:21847klzzwxh:21848klzzwxh:21849 neklzzwxh:21728xmlklzzwxh:21729parser klzzwxh:21730parser = neklzzwxh:21731xmlklzzwxh:21732createklzzwxh:21733klzzwxh:21734;klzzwxh:21989klzzwxh:21850klzzwxh:21851klzzwxh:21852 neklzzwxh:21735xmlklzzwxh:21736pushklzzwxh:21737handlerklzzwxh:21738parser, xmlklzzwxh:21739startklzzwxh:21740root, NULL, xmlklzzwxh:21741endklzzwxh:21742root, klzzwxh:21853nodeklzzwxh:21743;klzzwxh:21990klzzwxh:21854klzzwxh:21855klzzwxh:21856 neklzzwxh:21744xmlklzzwxh:21745pushklzzwxh:21746handlerklzzwxh:21747parser, xmlklzzwxh:21748startklzzwxh:21749backup, NULL, xmlklzzwxh:21750endklzzwxh:21751backup, klzzwxh:21857nodeklzzwxh:21752;klzzwxh:21991klzzwxh:21858klzzwxh:21859klzzwxh:21860 neklzzwxh:21753xmlklzzwxh:21754pushklzzwxh:21755handlerklzzwxh:21756parser, xmlklzzwxh:21757startklzzwxh:21758dir, NULL, xmlklzzwxh:21759endklzzwxh:21760dir, klzzwxh:21861nodeklzzwxh:21761;klzzwxh:21992klzzwxh:21862klzzwxh:21863klzzwxh:21864 neklzzwxh:21762xmlklzzwxh:21763pushklzzwxh:21764handlerklzzwxh:21765parser, xmlklzzwxh:21766startklzzwxh:21767reg, NULL, xmlklzzwxh:21768endklzzwxh:21769reg, klzzwxh:21865nodeklzzwxh:21770;klzzwxh:21993klzzwxh:21866klzzwxh:21867klzzwxh:21868 neklzzwxh:21771xmlklzzwxh:21772pushklzzwxh:21773handlerklzzwxh:21774parser, xmlklzzwxh:21775startklzzwxh:21776date, xmlklzzwxh:21777cdata, xmlklzzwxh:21778endklzzwxh:21779date, klzzwxh:21869nodeklzzwxh:21780;klzzwxh:21994klzzwxh:21870klzzwxh:21871klzzwxh:21872 neklzzwxh:21781xmlklzzwxh:21782pushklzzwxh:21783handlerklzzwxh:21784parser, xmlklzzwxh:21785startklzzwxh:21786decimal, xmlklzzwxh:21787cdata, xmlklzzwxh:21788endklzzwxh:21789decimal,klzzwxh:21995klzzwxh:21873klzzwxh:21874klzzwxh:21875klzzwxh:21876klzzwxh:21877klzzwxh:21878klzzwxh:21879klzzwxh:21880klzzwxh:21881klzzwxh:21882klzzwxh:21883klzzwxh:21884klzzwxh:21885klzzwxh:21886klzzwxh:21887klzzwxh:21888klzzwxh:21889klzzwxh:21890klzzwxh:21891klzzwxh:21892klzzwxh:21893klzzwxh:21894klzzwxh:21895 klzzwxh:21896nodeklzzwxh:21790;klzzwxh:21996klzzwxh:21897klzzwxh:21898klzzwxh:21899 neklzzwxh:21791xmlklzzwxh:21792pushklzzwxh:21793handlerklzzwxh:21794parser, xmlklzzwxh:21795startklzzwxh:21796mode, xmlklzzwxh:21797cdata, xmlklzzwxh:21798endklzzwxh:21799mode, klzzwxh:21900nodeklzzwxh:21800;klzzwxh:21997klzzwxh:21901klzzwxh:21902klzzwxh:21903 neklzzwxh:21801xmlklzzwxh:21802pushklzzwxh:21803handlerklzzwxh:21804parser, xmlklzzwxh:21805startklzzwxh:21806size, xmlklzzwxh:21807cdata, xmlklzzwxh:21808endklzzwxh:21809size, klzzwxh:21904nodeklzzwxh:21810;klzzwxh:21998klzzwxh:21905klzzwxh:21906klzzwxh:21907 if klzzwxh:21811strstrklzzwxh:21812buf, klzzwxh:21908klzzwxh:21909?xml version=klzzwxh:21813quot;1.0klzzwxh:21814quot; encoding=klzzwxh:21815quot;utf-8klzzwxh:21816quot; ?klzzwxh:21910klzzwxh:21911klzzwxh:21817 == bufklzzwxh:21818 klzzwxh:21819klzzwxh:21999klzzwxh:21912klzzwxh:21913klzzwxh:21914klzzwxh:21915klzzwxh:21916klzzwxh:21917klzzwxh:21918 neklzzwxh:21820xmlklzzwxh:21821pushklzzwxh:21822handlerklzzwxh:21823parser, xmlklzzwxh:21824startklzzwxh:21825string, xmlklzzwxh:21826cdata, xmlklzzwxh:21827endklzzwxh:21828string,klzzwxh:22000klzzwxh:21919klzzwxh:21920klzzwxh:21921klzzwxh:21922klzzwxh:21923klzzwxh:21924klzzwxh:21925klzzwxh:21926klzzwxh:21927klzzwxh:21928klzzwxh:21929klzzwxh:21930klzzwxh:21931klzzwxh:21932klzzwxh:21933klzzwxh:21934klzzwxh:21935klzzwxh:21936klzzwxh:21937klzzwxh:21938klzzwxh:21939klzzwxh:21940klzzwxh:21941klzzwxh:21942klzzwxh:21943klzzwxh:21944klzzwxh:21945 klzzwxh:21946nodeklzzwxh:21829;klzzwxh:22001klzzwxh:21947klzzwxh:21948klzzwxh:21949 klzzwxh:21830 else klzzwxh:21831klzzwxh:22002klzzwxh:21950klzzwxh:21951klzzwxh:21952klzzwxh:21953klzzwxh:21954klzzwxh:21955klzzwxh:21956 neklzzwxh:21832xmlklzzwxh:21833pushklzzwxh:21834handlerklzzwxh:21835parser, xmlklzzwxh:21836startklzzwxh:21837string, xmlklzzwxh:21838cdata,klzzwxh:22003klzzwxh:21957klzzwxh:21958klzzwxh:21959klzzwxh:21960klzzwxh:21961klzzwxh:21962klzzwxh:21963klzzwxh:21964klzzwxh:21965klzzwxh:21966klzzwxh:21967klzzwxh:21968klzzwxh:21969klzzwxh:21970klzzwxh:21971klzzwxh:21972klzzwxh:21973klzzwxh:21974klzzwxh:21975klzzwxh:21976klzzwxh:21977klzzwxh:21978klzzwxh:21979klzzwxh:21980klzzwxh:21981klzzwxh:21982klzzwxh:21983 xmlklzzwxh:21839endklzzwxh:21840stringklzzwxh:21841old, klzzwxh:21984nodeklzzwxh:21842;klzzwxh:22004klzzwxh:21985klzzwxh:21986klzzwxh:21987 klzzwxh:21843

      klzzwxh:22018klzzwxh:22019klzzwxh:22020 int ret = 0;klzzwxh:22044klzzwxh:22021klzzwxh:22022klzzwxh:22023 while klzzwxh:22005len klzzwxh:22024 0 klzzwxh:22025klzzwxh:22026 ret == 0klzzwxh:22006 klzzwxh:22007klzzwxh:22045klzzwxh:22027klzzwxh:22028klzzwxh:22029klzzwxh:22030klzzwxh:22031klzzwxh:22032klzzwxh:22033 ret = neklzzwxh:22008xmlklzzwxh:22009parseklzzwxh:22010parser, buf, lenklzzwxh:22011;klzzwxh:22046klzzwxh:22034klzzwxh:22035klzzwxh:22036klzzwxh:22037klzzwxh:22038klzzwxh:22039klzzwxh:22040 len = freadklzzwxh:22012buf, 1, DAVklzzwxh:22013XMLklzzwxh:22014BUFklzzwxh:22015SIZE, idxklzzwxh:22016;klzzwxh:22047klzzwxh:22041klzzwxh:22042klzzwxh:22043 klzzwxh:22017

      klzzwxh:22080klzzwxh:22081klzzwxh:22082 if klzzwxh:22048ret klzzwxh:22049= 0klzzwxh:22050 klzzwxh:22051klzzwxh:22126klzzwxh:22083klzzwxh:22084klzzwxh:22085klzzwxh:22086klzzwxh:22087klzzwxh:22088klzzwxh:22089 syslogklzzwxh:22052LOGklzzwxh:22053MAKEPRIklzzwxh:22054LOGklzzwxh:22055DAEMON, LOGklzzwxh:22056ERRklzzwxh:22057, klzzwxh:22058klzzwxh:22059klzzwxh:22090error parsing %sklzzwxh:22091klzzwxh:22060, indexklzzwxh:22061;klzzwxh:22127klzzwxh:22092klzzwxh:22093klzzwxh:22094klzzwxh:22095klzzwxh:22096klzzwxh:22097klzzwxh:22098 syslogklzzwxh:22062LOGklzzwxh:22063MAKEPRIklzzwxh:22064LOGklzzwxh:22065DAEMON, LOGklzzwxh:22066ERRklzzwxh:22067, klzzwxh:22068klzzwxh:22069klzzwxh:22099klzzwxh:22100 at line %iklzzwxh:22101klzzwxh:22070,klzzwxh:22128klzzwxh:22102klzzwxh:22103klzzwxh:22104klzzwxh:22105klzzwxh:22106klzzwxh:22107klzzwxh:22108klzzwxh:22109klzzwxh:22110klzzwxh:22111klzzwxh:22112klzzwxh:22113klzzwxh:22114klzzwxh:22115 neklzzwxh:22071xmlklzzwxh:22072currentlineklzzwxh:22073parserklzzwxh:22074klzzwxh:22075;klzzwxh:22129klzzwxh:22116klzzwxh:22117klzzwxh:22118klzzwxh:22119klzzwxh:22120klzzwxh:22121klzzwxh:22122 deleteklzzwxh:22076treeklzzwxh:22077rootklzzwxh:22078;klzzwxh:22130klzzwxh:22123klzzwxh:22124klzzwxh:22125 klzzwxh:22079

      klzzwxh:22137klzzwxh:22138klzzwxh:22139 ret = neklzzwxh:22131xmlklzzwxh:22132parseklzzwxh:22133parser, buf, 0klzzwxh:22134;klzzwxh:22143klzzwxh:22140klzzwxh:22141klzzwxh:22142 freeklzzwxh:22135bufklzzwxh:22136;

      klzzwxh:22153klzzwxh:22154klzzwxh:22155 neklzzwxh:22144xmlklzzwxh:22145destroyklzzwxh:22146parserklzzwxh:22147;klzzwxh:22162klzzwxh:22156klzzwxh:22157klzzwxh:22158 fcloseklzzwxh:22148idxklzzwxh:22149;klzzwxh:22163klzzwxh:22159klzzwxh:22160klzzwxh:22161 freeklzzwxh:22150indexklzzwxh:22151;klzzwxh:22164klzzwxh:22152

      /klzzwxh:22165 Removes the files with lowest access time from cache until the cache sizeklzzwxh:22177klzzwxh:22173klzzwxh:22174 is smaller than maxklzzwxh:22166cacheklzzwxh:22167size or there are no more files that may beklzzwxh:22178klzzwxh:22175klzzwxh:22176 removed. klzzwxh:22168/klzzwxh:22179static void resizeklzzwxh:22169cacheklzzwxh:22170voidklzzwxh:22171 klzzwxh:22172

      klzzwxh:22196klzzwxh:22197klzzwxh:22198 if klzzwxh:22180debugklzzwxh:22181klzzwxh:22250klzzwxh:22199klzzwxh:22200klzzwxh:22201klzzwxh:22202klzzwxh:22203klzzwxh:22204klzzwxh:22205 syslogklzzwxh:22182LOGklzzwxh:22183MAKEPRIklzzwxh:22184LOGklzzwxh:22185DAEMON, LOGklzzwxh:22186DEBUGklzzwxh:22187,klzzwxh:22251klzzwxh:22206klzzwxh:22207klzzwxh:22208klzzwxh:22209klzzwxh:22210klzzwxh:22211klzzwxh:22212klzzwxh:22213klzzwxh:22214klzzwxh:22215klzzwxh:22216klzzwxh:22217klzzwxh:22218klzzwxh:22219 klzzwxh:22220resize cache: %llu of %llu MiBytes used.klzzwxh:22221,klzzwxh:22252klzzwxh:22222klzzwxh:22223klzzwxh:22224klzzwxh:22225klzzwxh:22226klzzwxh:22227klzzwxh:22228klzzwxh:22229klzzwxh:22230klzzwxh:22231klzzwxh:22232klzzwxh:22233klzzwxh:22234klzzwxh:22235 klzzwxh:22188cacheklzzwxh:22189size + 0x80000klzzwxh:22190 / 0x100000,klzzwxh:22253klzzwxh:22236klzzwxh:22237klzzwxh:22238klzzwxh:22239klzzwxh:22240klzzwxh:22241klzzwxh:22242klzzwxh:22243klzzwxh:22244klzzwxh:22245klzzwxh:22246klzzwxh:22247klzzwxh:22248klzzwxh:22249 klzzwxh:22191maxklzzwxh:22192cacheklzzwxh:22193size + 0x80000klzzwxh:22194 / 0x100000klzzwxh:22195;

      klzzwxh:22341klzzwxh:22342klzzwxh:22343 while klzzwxh:222541klzzwxh:22255 klzzwxh:22256klzzwxh:22728klzzwxh:22344klzzwxh:22345klzzwxh:22346klzzwxh:22347klzzwxh:22348klzzwxh:22349klzzwxh:22350 davklzzwxh:22257node klzzwxh:22258leastklzzwxh:22259recent = NULL;klzzwxh:22729klzzwxh:22351klzzwxh:22352klzzwxh:22353klzzwxh:22354klzzwxh:22355klzzwxh:22356klzzwxh:22357 cacheklzzwxh:22260size = 0;klzzwxh:22730klzzwxh:22358klzzwxh:22359klzzwxh:22360klzzwxh:22361klzzwxh:22362klzzwxh:22363klzzwxh:22364 sizeklzzwxh:22261t i;klzzwxh:22731klzzwxh:22365klzzwxh:22366klzzwxh:22367klzzwxh:22368klzzwxh:22369klzzwxh:22370klzzwxh:22371 for klzzwxh:22262i = 0; i klzzwxh:22372 tableklzzwxh:22263size; i++klzzwxh:22264 klzzwxh:22265klzzwxh:22732klzzwxh:22373klzzwxh:22374klzzwxh:22375klzzwxh:22376klzzwxh:22377klzzwxh:22378klzzwxh:22379klzzwxh:22380klzzwxh:22381klzzwxh:22382klzzwxh:22383 davklzzwxh:22266node klzzwxh:22267node = tableklzzwxh:22268iklzzwxh:22269;klzzwxh:22733klzzwxh:22384klzzwxh:22385klzzwxh:22386klzzwxh:22387klzzwxh:22388klzzwxh:22389klzzwxh:22390klzzwxh:22391klzzwxh:22392klzzwxh:22393klzzwxh:22394 while klzzwxh:22270node klzzwxh:22271= NULLklzzwxh:22272 klzzwxh:22273klzzwxh:22734klzzwxh:22395klzzwxh:22396klzzwxh:22397klzzwxh:22398klzzwxh:22399klzzwxh:22400klzzwxh:22401klzzwxh:22402klzzwxh:22403klzzwxh:22404klzzwxh:22405klzzwxh:22406klzzwxh:22407klzzwxh:22408klzzwxh:22409 if klzzwxh:22274isklzzwxh:22275cachedklzzwxh:22276nodeklzzwxh:22277klzzwxh:22278 klzzwxh:22279klzzwxh:22735klzzwxh:22410klzzwxh:22411klzzwxh:22412klzzwxh:22413klzzwxh:22414klzzwxh:22415klzzwxh:22416klzzwxh:22417klzzwxh:22418klzzwxh:22419klzzwxh:22420klzzwxh:22421klzzwxh:22422klzzwxh:22423klzzwxh:22424klzzwxh:22425klzzwxh:22426klzzwxh:22427klzzwxh:22428 if klzzwxh:22280klzzwxh:22281isklzzwxh:22282openklzzwxh:22283nodeklzzwxh:22284 klzzwxh:22429klzzwxh:22430 klzzwxh:22285isklzzwxh:22286dirtyklzzwxh:22287nodeklzzwxh:22288klzzwxh:22736klzzwxh:22431klzzwxh:22432klzzwxh:22433klzzwxh:22434klzzwxh:22435klzzwxh:22436klzzwxh:22437klzzwxh:22438klzzwxh:22439klzzwxh:22440klzzwxh:22441klzzwxh:22442klzzwxh:22443klzzwxh:22444klzzwxh:22445klzzwxh:22446klzzwxh:22447klzzwxh:22448klzzwxh:22449klzzwxh:22450klzzwxh:22451klzzwxh:22452klzzwxh:22453klzzwxh:22454klzzwxh:22455klzzwxh:22456klzzwxh:22457 klzzwxh:22458klzzwxh:22459 klzzwxh:22289isklzzwxh:22290createdklzzwxh:22291nodeklzzwxh:22292 klzzwxh:22460klzzwxh:22461 klzzwxh:22293isklzzwxh:22294backupklzzwxh:22295nodeklzzwxh:22296klzzwxh:22737klzzwxh:22462klzzwxh:22463klzzwxh:22464klzzwxh:22465klzzwxh:22466klzzwxh:22467klzzwxh:22468klzzwxh:22469klzzwxh:22470klzzwxh:22471klzzwxh:22472klzzwxh:22473klzzwxh:22474klzzwxh:22475klzzwxh:22476klzzwxh:22477klzzwxh:22478klzzwxh:22479klzzwxh:22480klzzwxh:22481klzzwxh:22482klzzwxh:22483klzzwxh:22484klzzwxh:22485klzzwxh:22486klzzwxh:22487klzzwxh:22488 klzzwxh:22489klzzwxh:22490 klzzwxh:22297leastklzzwxh:22298recent == NULLklzzwxh:22738klzzwxh:22491klzzwxh:22492klzzwxh:22493klzzwxh:22494klzzwxh:22495klzzwxh:22496klzzwxh:22497klzzwxh:22498klzzwxh:22499klzzwxh:22500klzzwxh:22501klzzwxh:22502klzzwxh:22503klzzwxh:22504klzzwxh:22505klzzwxh:22506klzzwxh:22507klzzwxh:22508klzzwxh:22509klzzwxh:22510klzzwxh:22511klzzwxh:22512klzzwxh:22513klzzwxh:22514klzzwxh:22515klzzwxh:22516klzzwxh:22517klzzwxh:22518klzzwxh:22519klzzwxh:22520klzzwxh:22521 || node-klzzwxh:22522atime klzzwxh:22523 leastklzzwxh:22299recent-klzzwxh:22524atimeklzzwxh:22300klzzwxh:22301klzzwxh:22739klzzwxh:22525klzzwxh:22526klzzwxh:22527klzzwxh:22528klzzwxh:22529klzzwxh:22530klzzwxh:22531klzzwxh:22532klzzwxh:22533klzzwxh:22534klzzwxh:22535klzzwxh:22536klzzwxh:22537klzzwxh:22538klzzwxh:22539klzzwxh:22540klzzwxh:22541klzzwxh:22542klzzwxh:22543klzzwxh:22544klzzwxh:22545klzzwxh:22546klzzwxh:22547 leastklzzwxh:22302recent = node;klzzwxh:22740klzzwxh:22548klzzwxh:22549klzzwxh:22550klzzwxh:22551klzzwxh:22552klzzwxh:22553klzzwxh:22554klzzwxh:22555klzzwxh:22556klzzwxh:22557klzzwxh:22558klzzwxh:22559klzzwxh:22560klzzwxh:22561klzzwxh:22562klzzwxh:22563klzzwxh:22564klzzwxh:22565klzzwxh:22566 cacheklzzwxh:22303size += node-klzzwxh:22567size;klzzwxh:22741klzzwxh:22568klzzwxh:22569klzzwxh:22570klzzwxh:22571klzzwxh:22572klzzwxh:22573klzzwxh:22574klzzwxh:22575klzzwxh:22576klzzwxh:22577klzzwxh:22578klzzwxh:22579klzzwxh:22580klzzwxh:22581klzzwxh:22582 klzzwxh:22304klzzwxh:22742klzzwxh:22583klzzwxh:22584klzzwxh:22585klzzwxh:22586klzzwxh:22587klzzwxh:22588klzzwxh:22589klzzwxh:22590klzzwxh:22591klzzwxh:22592klzzwxh:22593klzzwxh:22594klzzwxh:22595klzzwxh:22596klzzwxh:22597 node = node-klzzwxh:22598tableklzzwxh:22305next;klzzwxh:22743klzzwxh:22599klzzwxh:22600klzzwxh:22601klzzwxh:22602klzzwxh:22603klzzwxh:22604klzzwxh:22605klzzwxh:22606klzzwxh:22607klzzwxh:22608klzzwxh:22609 klzzwxh:22306klzzwxh:22744klzzwxh:22610klzzwxh:22611klzzwxh:22612klzzwxh:22613klzzwxh:22614klzzwxh:22615klzzwxh:22616 klzzwxh:22307klzzwxh:22745klzzwxh:22617klzzwxh:22618klzzwxh:22619klzzwxh:22620klzzwxh:22621klzzwxh:22622klzzwxh:22623 if klzzwxh:22308cacheklzzwxh:22309size klzzwxh:22624 maxklzzwxh:22310cacheklzzwxh:22311sizeklzzwxh:22312klzzwxh:22746klzzwxh:22625klzzwxh:22626klzzwxh:22627klzzwxh:22628klzzwxh:22629klzzwxh:22630klzzwxh:22631klzzwxh:22632klzzwxh:22633klzzwxh:22634klzzwxh:22635 break;klzzwxh:22747klzzwxh:22636klzzwxh:22637klzzwxh:22638klzzwxh:22639klzzwxh:22640klzzwxh:22641klzzwxh:22642 if klzzwxh:22313leastklzzwxh:22314recent == NULLklzzwxh:22315 klzzwxh:22316klzzwxh:22748klzzwxh:22643klzzwxh:22644klzzwxh:22645klzzwxh:22646klzzwxh:22647klzzwxh:22648klzzwxh:22649klzzwxh:22650klzzwxh:22651klzzwxh:22652klzzwxh:22653 syslogklzzwxh:22317LOGklzzwxh:22318MAKEPRIklzzwxh:22319LOGklzzwxh:22320DAEMON, LOGklzzwxh:22321ERRklzzwxh:22322,klzzwxh:22749klzzwxh:22654klzzwxh:22655klzzwxh:22656klzzwxh:22657klzzwxh:22658klzzwxh:22659klzzwxh:22660klzzwxh:22661klzzwxh:22662klzzwxh:22663klzzwxh:22664klzzwxh:22665klzzwxh:22666klzzwxh:22667klzzwxh:22668klzzwxh:22669klzzwxh:22670klzzwxh:22671 klzzwxh:22323klzzwxh:22324klzzwxh:22672open files exceed max cache size by %llu MiBytesklzzwxh:22673klzzwxh:22325,klzzwxh:22750klzzwxh:22674klzzwxh:22675klzzwxh:22676klzzwxh:22677klzzwxh:22678klzzwxh:22679klzzwxh:22680klzzwxh:22681klzzwxh:22682klzzwxh:22683klzzwxh:22684klzzwxh:22685klzzwxh:22686klzzwxh:22687klzzwxh:22688klzzwxh:22689klzzwxh:22690klzzwxh:22691 klzzwxh:22326cacheklzzwxh:22327size - maxklzzwxh:22328cacheklzzwxh:22329size + 0x80000klzzwxh:22330 / 0x100000klzzwxh:22331;klzzwxh:22751klzzwxh:22692klzzwxh:22693klzzwxh:22694klzzwxh:22695klzzwxh:22696klzzwxh:22697klzzwxh:22698klzzwxh:22699klzzwxh:22700klzzwxh:22701klzzwxh:22702 break;klzzwxh:22752klzzwxh:22703klzzwxh:22704klzzwxh:22705klzzwxh:22706klzzwxh:22707klzzwxh:22708klzzwxh:22709 klzzwxh:22332klzzwxh:22753klzzwxh:22710klzzwxh:22711klzzwxh:22712klzzwxh:22713klzzwxh:22714klzzwxh:22715klzzwxh:22716 deleteklzzwxh:22333cacheklzzwxh:22334fileklzzwxh:22335leastklzzwxh:22336recentklzzwxh:22337;klzzwxh:22754klzzwxh:22717klzzwxh:22718klzzwxh:22719klzzwxh:22720klzzwxh:22721klzzwxh:22722klzzwxh:22723 cacheklzzwxh:22338size -= leastklzzwxh:22339recent-klzzwxh:22724size;klzzwxh:22755klzzwxh:22725klzzwxh:22726klzzwxh:22727 klzzwxh:22340

      klzzwxh:22773klzzwxh:22774klzzwxh:22775 if klzzwxh:22756debugklzzwxh:22757klzzwxh:22843klzzwxh:22776klzzwxh:22777klzzwxh:22778klzzwxh:22779klzzwxh:22780klzzwxh:22781klzzwxh:22782 syslogklzzwxh:22758LOGklzzwxh:22759MAKEPRIklzzwxh:22760LOGklzzwxh:22761DAEMON, LOGklzzwxh:22762DEBUGklzzwxh:22763,klzzwxh:22844klzzwxh:22783klzzwxh:22784klzzwxh:22785klzzwxh:22786klzzwxh:22787klzzwxh:22788klzzwxh:22789klzzwxh:22790klzzwxh:22791klzzwxh:22792klzzwxh:22793klzzwxh:22794klzzwxh:22795klzzwxh:22796 klzzwxh:22797klzzwxh:22798klzzwxh:22799klzzwxh:22800klzzwxh:22801klzzwxh:22802klzzwxh:22803klzzwxh:22804klzzwxh:22805klzzwxh:22806klzzwxh:22807klzzwxh:22808klzzwxh:22809klzzwxh:22810 %llu of %llu MiBytes used.klzzwxh:22811,klzzwxh:22845klzzwxh:22812klzzwxh:22813klzzwxh:22814klzzwxh:22815klzzwxh:22816klzzwxh:22817klzzwxh:22818klzzwxh:22819klzzwxh:22820klzzwxh:22821klzzwxh:22822klzzwxh:22823klzzwxh:22824klzzwxh:22825 klzzwxh:22764cacheklzzwxh:22765size + 0x80000klzzwxh:22766 / 0x100000,klzzwxh:22846klzzwxh:22826klzzwxh:22827klzzwxh:22828klzzwxh:22829klzzwxh:22830klzzwxh:22831klzzwxh:22832klzzwxh:22833klzzwxh:22834klzzwxh:22835klzzwxh:22836klzzwxh:22837klzzwxh:22838klzzwxh:22839 klzzwxh:22767maxklzzwxh:22768cacheklzzwxh:22769size + 0x80000klzzwxh:22770 / 0x100000klzzwxh:22771;klzzwxh:22847klzzwxh:22840klzzwxh:22841klzzwxh:22842 return;klzzwxh:22848klzzwxh:22772

      /klzzwxh:22849 Creates an entry for node in the index file file, removes the node fromklzzwxh:22875klzzwxh:22859klzzwxh:22860 the tree and the hash table and deletes the node. The entry will beklzzwxh:22876klzzwxh:22861klzzwxh:22862 indented by indent to get proper alignment of nested entries.klzzwxh:22877klzzwxh:22863klzzwxh:22864 nodeklzzwxh:22865klzzwxh:22866 : the node.klzzwxh:22878klzzwxh:22867klzzwxh:22868 fileklzzwxh:22869klzzwxh:22870 : the index file for this cache directory.klzzwxh:22879klzzwxh:22871klzzwxh:22872 indent : a string of spaces to indent the entry.klzzwxh:22880klzzwxh:22873klzzwxh:22874 return value : 0 on success, -1 if an error occurs. klzzwxh:22850/klzzwxh:22881static int writeklzzwxh:22851nodeklzzwxh:22852davklzzwxh:22853node klzzwxh:22854node, FILE klzzwxh:22855file, const char klzzwxh:22856indentklzzwxh:22857 klzzwxh:22858

      klzzwxh:22967klzzwxh:22968klzzwxh:22969 if klzzwxh:22882node == rootklzzwxh:22883 klzzwxh:22884klzzwxh:23209klzzwxh:22970klzzwxh:22971klzzwxh:22972klzzwxh:22973klzzwxh:22974klzzwxh:22975klzzwxh:22976 if klzzwxh:22885debugklzzwxh:22886klzzwxh:23210klzzwxh:22977klzzwxh:22978klzzwxh:22979klzzwxh:22980klzzwxh:22981klzzwxh:22982klzzwxh:22983klzzwxh:22984klzzwxh:22985klzzwxh:22986klzzwxh:22987 syslogklzzwxh:22887LOGklzzwxh:22888MAKEPRIklzzwxh:22889LOGklzzwxh:22890DAEMON, LOGklzzwxh:22891DEBUGklzzwxh:22892, klzzwxh:22988writing root %pklzzwxh:22989, nodeklzzwxh:22893;klzzwxh:23211klzzwxh:22990klzzwxh:22991klzzwxh:22992klzzwxh:22993klzzwxh:22994klzzwxh:22995klzzwxh:22996 if klzzwxh:22894fprintfklzzwxh:22895file, klzzwxh:22997klzzwxh:22998d:%s xmlns:d=klzzwxh:22896quot;%sklzzwxh:22897quot;klzzwxh:22999klzzwxh:22898klzzwxh:23000, typeklzzwxh:22899ROOTklzzwxh:22900,klzzwxh:23212klzzwxh:23001klzzwxh:23002klzzwxh:23003klzzwxh:23004klzzwxh:23005klzzwxh:23006klzzwxh:23007klzzwxh:23008klzzwxh:23009klzzwxh:23010klzzwxh:23011klzzwxh:23012klzzwxh:23013klzzwxh:23014klzzwxh:23015klzzwxh:23016klzzwxh:23017klzzwxh:23018klzzwxh:23019 DAVklzzwxh:22901XMLklzzwxh:22902NSklzzwxh:22903 klzzwxh:23020 0klzzwxh:22904klzzwxh:23213klzzwxh:23021klzzwxh:23022klzzwxh:23023klzzwxh:23024klzzwxh:23025klzzwxh:23026klzzwxh:23027klzzwxh:23028klzzwxh:23029klzzwxh:23030klzzwxh:23031 return -1;klzzwxh:23214klzzwxh:23032klzzwxh:23033klzzwxh:23034 klzzwxh:22905 else if klzzwxh:22906node == backupklzzwxh:22907 klzzwxh:22908klzzwxh:23215klzzwxh:23035klzzwxh:23036klzzwxh:23037klzzwxh:23038klzzwxh:23039klzzwxh:23040klzzwxh:23041 if klzzwxh:22909debugklzzwxh:22910klzzwxh:23216klzzwxh:23042klzzwxh:23043klzzwxh:23044klzzwxh:23045klzzwxh:23046klzzwxh:23047klzzwxh:23048klzzwxh:23049klzzwxh:23050klzzwxh:23051klzzwxh:23052 syslogklzzwxh:22911LOGklzzwxh:22912MAKEPRIklzzwxh:22913LOGklzzwxh:22914DAEMON, LOGklzzwxh:22915DEBUGklzzwxh:22916, klzzwxh:23053writing backup %pklzzwxh:23054,klzzwxh:23217klzzwxh:23055klzzwxh:23056klzzwxh:23057klzzwxh:23058klzzwxh:23059klzzwxh:23060klzzwxh:23061klzzwxh:23062klzzwxh:23063klzzwxh:23064klzzwxh:23065klzzwxh:23066klzzwxh:23067klzzwxh:23068klzzwxh:23069klzzwxh:23070klzzwxh:23071klzzwxh:23072 nodeklzzwxh:22917;klzzwxh:23218klzzwxh:23073klzzwxh:23074klzzwxh:23075klzzwxh:23076klzzwxh:23077klzzwxh:23078klzzwxh:23079 if klzzwxh:22918fprintfklzzwxh:22919file, klzzwxh:23080%sklzzwxh:23081d:%sklzzwxh:23082klzzwxh:22920klzzwxh:23083, indent, typeklzzwxh:22921BACKUPklzzwxh:22922klzzwxh:22923 klzzwxh:23084 0klzzwxh:22924klzzwxh:23219klzzwxh:23085klzzwxh:23086klzzwxh:23087klzzwxh:23088klzzwxh:23089klzzwxh:23090klzzwxh:23091klzzwxh:23092klzzwxh:23093klzzwxh:23094klzzwxh:23095 return -1;klzzwxh:23220klzzwxh:23096klzzwxh:23097klzzwxh:23098 klzzwxh:22925 else if klzzwxh:22926isklzzwxh:22927dirklzzwxh:22928nodeklzzwxh:22929klzzwxh:22930 klzzwxh:22931klzzwxh:23221klzzwxh:23099klzzwxh:23100klzzwxh:23101klzzwxh:23102klzzwxh:23103klzzwxh:23104klzzwxh:23105 if klzzwxh:22932debugklzzwxh:22933klzzwxh:23222klzzwxh:23106klzzwxh:23107klzzwxh:23108klzzwxh:23109klzzwxh:23110klzzwxh:23111klzzwxh:23112klzzwxh:23113klzzwxh:23114klzzwxh:23115klzzwxh:23116 syslogklzzwxh:22934LOGklzzwxh:22935MAKEPRIklzzwxh:22936LOGklzzwxh:22937DAEMON, LOGklzzwxh:22938DEBUGklzzwxh:22939, klzzwxh:23117writing directory %pklzzwxh:23118,klzzwxh:23223klzzwxh:23119klzzwxh:23120klzzwxh:23121klzzwxh:23122klzzwxh:23123klzzwxh:23124klzzwxh:23125klzzwxh:23126klzzwxh:23127klzzwxh:23128klzzwxh:23129klzzwxh:23130klzzwxh:23131klzzwxh:23132klzzwxh:23133klzzwxh:23134klzzwxh:23135klzzwxh:23136 nodeklzzwxh:22940;klzzwxh:23224klzzwxh:23137klzzwxh:23138klzzwxh:23139klzzwxh:23140klzzwxh:23141klzzwxh:23142klzzwxh:23143 if klzzwxh:22941fprintfklzzwxh:22942file, klzzwxh:23144%sklzzwxh:23145d:%sklzzwxh:23146klzzwxh:22943klzzwxh:23147, indent, typeklzzwxh:22944DDIRklzzwxh:22945klzzwxh:22946 klzzwxh:23148 0klzzwxh:22947klzzwxh:23225klzzwxh:23149klzzwxh:23150klzzwxh:23151klzzwxh:23152klzzwxh:23153klzzwxh:23154klzzwxh:23155klzzwxh:23156klzzwxh:23157klzzwxh:23158klzzwxh:23159 return -1;klzzwxh:23226klzzwxh:23160klzzwxh:23161klzzwxh:23162 klzzwxh:22948 else klzzwxh:22949klzzwxh:23227klzzwxh:23163klzzwxh:23164klzzwxh:23165klzzwxh:23166klzzwxh:23167klzzwxh:23168klzzwxh:23169 if klzzwxh:22950debugklzzwxh:22951klzzwxh:23228klzzwxh:23170klzzwxh:23171klzzwxh:23172klzzwxh:23173klzzwxh:23174klzzwxh:23175klzzwxh:23176klzzwxh:23177klzzwxh:23178klzzwxh:23179klzzwxh:23180 syslogklzzwxh:22952LOGklzzwxh:22953MAKEPRIklzzwxh:22954LOGklzzwxh:22955DAEMON, LOGklzzwxh:22956DEBUGklzzwxh:22957, klzzwxh:23181writing file %pklzzwxh:23182, nodeklzzwxh:22958;klzzwxh:23229klzzwxh:23183klzzwxh:23184klzzwxh:23185klzzwxh:23186klzzwxh:23187klzzwxh:23188klzzwxh:23189 if klzzwxh:22959fprintfklzzwxh:22960file, klzzwxh:23190%sklzzwxh:23191d:%sklzzwxh:23192klzzwxh:22961klzzwxh:23193, indent, typeklzzwxh:22962REGklzzwxh:22963klzzwxh:22964 klzzwxh:23194 0klzzwxh:22965klzzwxh:23230klzzwxh:23195klzzwxh:23196klzzwxh:23197klzzwxh:23198klzzwxh:23199klzzwxh:23200klzzwxh:23201klzzwxh:23202klzzwxh:23203klzzwxh:23204klzzwxh:23205 return -1;klzzwxh:23231klzzwxh:23206klzzwxh:23207klzzwxh:23208 klzzwxh:22966

      klzzwxh:23236klzzwxh:23237klzzwxh:23238 char klzzwxh:23232ind = neklzzwxh:23233concatklzzwxh:23234indent, klzzwxh:23239klzzwxh:23240 klzzwxh:23241, NULLklzzwxh:23235;

      klzzwxh:23260klzzwxh:23261klzzwxh:23262 if klzzwxh:23242node klzzwxh:23243= root klzzwxh:23263klzzwxh:23264 klzzwxh:23244isklzzwxh:23245backupklzzwxh:23246nodeklzzwxh:23247klzzwxh:23248 klzzwxh:23249klzzwxh:23313klzzwxh:23265klzzwxh:23266klzzwxh:23267klzzwxh:23268klzzwxh:23269klzzwxh:23270klzzwxh:23271 if klzzwxh:23250fprintfklzzwxh:23251file, klzzwxh:23272%sklzzwxh:23273d:%sklzzwxh:23274%sklzzwxh:23275/d:%sklzzwxh:23276klzzwxh:23252klzzwxh:23277, ind, typeklzzwxh:23253PATHklzzwxh:23254, node-klzzwxh:23278path,klzzwxh:23314klzzwxh:23279klzzwxh:23280klzzwxh:23281klzzwxh:23282klzzwxh:23283klzzwxh:23284klzzwxh:23285klzzwxh:23286klzzwxh:23287klzzwxh:23288klzzwxh:23289klzzwxh:23290klzzwxh:23291klzzwxh:23292klzzwxh:23293klzzwxh:23294klzzwxh:23295klzzwxh:23296klzzwxh:23297 typeklzzwxh:23255PATHklzzwxh:23256klzzwxh:23257 klzzwxh:23298 0klzzwxh:23258klzzwxh:23315klzzwxh:23299klzzwxh:23300klzzwxh:23301klzzwxh:23302klzzwxh:23303klzzwxh:23304klzzwxh:23305klzzwxh:23306klzzwxh:23307klzzwxh:23308klzzwxh:23309 return -1;klzzwxh:23316klzzwxh:23310klzzwxh:23311klzzwxh:23312 klzzwxh:23259

      klzzwxh:23341klzzwxh:23342klzzwxh:23343 if klzzwxh:23317node klzzwxh:23318= root klzzwxh:23344klzzwxh:23345 node klzzwxh:23319= backupklzzwxh:23320 klzzwxh:23321klzzwxh:23421klzzwxh:23346klzzwxh:23347klzzwxh:23348klzzwxh:23349klzzwxh:23350klzzwxh:23351klzzwxh:23352 char klzzwxh:23322name = davklzzwxh:23323convklzzwxh:23324toklzzwxh:23325utfklzzwxh:233268klzzwxh:23327node-klzzwxh:23353nameklzzwxh:23328;klzzwxh:23422klzzwxh:23354klzzwxh:23355klzzwxh:23356klzzwxh:23357klzzwxh:23358klzzwxh:23359klzzwxh:23360 int ret = fprintfklzzwxh:23329file, klzzwxh:23361%sklzzwxh:23362d:%sklzzwxh:23363%sklzzwxh:23364/d:%sklzzwxh:23365klzzwxh:23330klzzwxh:23366, ind, typeklzzwxh:23331NAMEklzzwxh:23332, name,klzzwxh:23423klzzwxh:23367klzzwxh:23368klzzwxh:23369klzzwxh:23370klzzwxh:23371klzzwxh:23372klzzwxh:23373klzzwxh:23374klzzwxh:23375klzzwxh:23376klzzwxh:23377klzzwxh:23378klzzwxh:23379klzzwxh:23380klzzwxh:23381klzzwxh:23382klzzwxh:23383klzzwxh:23384klzzwxh:23385klzzwxh:23386klzzwxh:23387klzzwxh:23388klzzwxh:23389klzzwxh:23390klzzwxh:23391 typeklzzwxh:23333NAMEklzzwxh:23334klzzwxh:23335;klzzwxh:23424klzzwxh:23392klzzwxh:23393klzzwxh:23394klzzwxh:23395klzzwxh:23396klzzwxh:23397klzzwxh:23398 freeklzzwxh:23336nameklzzwxh:23337;klzzwxh:23425klzzwxh:23399klzzwxh:23400klzzwxh:23401klzzwxh:23402klzzwxh:23403klzzwxh:23404klzzwxh:23405 if klzzwxh:23338ret klzzwxh:23406 0klzzwxh:23339klzzwxh:23426klzzwxh:23407klzzwxh:23408klzzwxh:23409klzzwxh:23410klzzwxh:23411klzzwxh:23412klzzwxh:23413klzzwxh:23414klzzwxh:23415klzzwxh:23416klzzwxh:23417 return -1;klzzwxh:23427klzzwxh:23418klzzwxh:23419klzzwxh:23420 klzzwxh:23340

      klzzwxh:23458klzzwxh:23459klzzwxh:23460 if klzzwxh:23428isklzzwxh:23429regklzzwxh:23430nodeklzzwxh:23431 klzzwxh:23461klzzwxh:23462 node-klzzwxh:23463cacheklzzwxh:23432path klzzwxh:23433= NULLklzzwxh:23434 klzzwxh:23435klzzwxh:23539klzzwxh:23464klzzwxh:23465klzzwxh:23466klzzwxh:23467klzzwxh:23468klzzwxh:23469klzzwxh:23470 char klzzwxh:23436path = davklzzwxh:23437convklzzwxh:23438toklzzwxh:23439utfklzzwxh:234408klzzwxh:23441node-klzzwxh:23471cacheklzzwxh:23442pathklzzwxh:23443;klzzwxh:23540klzzwxh:23472klzzwxh:23473klzzwxh:23474klzzwxh:23475klzzwxh:23476klzzwxh:23477klzzwxh:23478 int ret = fprintfklzzwxh:23444file, klzzwxh:23479%sklzzwxh:23480d:%sklzzwxh:23481%sklzzwxh:23482/d:%sklzzwxh:23483klzzwxh:23445klzzwxh:23484, ind, typeklzzwxh:23446CACHEklzzwxh:23447PATHklzzwxh:23448,klzzwxh:23541klzzwxh:23485klzzwxh:23486klzzwxh:23487klzzwxh:23488klzzwxh:23489klzzwxh:23490klzzwxh:23491klzzwxh:23492klzzwxh:23493klzzwxh:23494klzzwxh:23495klzzwxh:23496klzzwxh:23497klzzwxh:23498klzzwxh:23499klzzwxh:23500klzzwxh:23501klzzwxh:23502klzzwxh:23503klzzwxh:23504klzzwxh:23505klzzwxh:23506klzzwxh:23507klzzwxh:23508klzzwxh:23509 path, typeklzzwxh:23449CACHEklzzwxh:23450PATHklzzwxh:23451klzzwxh:23452;klzzwxh:23542klzzwxh:23510klzzwxh:23511klzzwxh:23512klzzwxh:23513klzzwxh:23514klzzwxh:23515klzzwxh:23516 freeklzzwxh:23453pathklzzwxh:23454;klzzwxh:23543klzzwxh:23517klzzwxh:23518klzzwxh:23519klzzwxh:23520klzzwxh:23521klzzwxh:23522klzzwxh:23523 if klzzwxh:23455ret klzzwxh:23524 0klzzwxh:23456klzzwxh:23544klzzwxh:23525klzzwxh:23526klzzwxh:23527klzzwxh:23528klzzwxh:23529klzzwxh:23530klzzwxh:23531klzzwxh:23532klzzwxh:23533klzzwxh:23534klzzwxh:23535 return -1;klzzwxh:23545klzzwxh:23536klzzwxh:23537klzzwxh:23538 klzzwxh:23457

      klzzwxh:23567klzzwxh:23568klzzwxh:23569 if klzzwxh:23546isklzzwxh:23547regklzzwxh:23548nodeklzzwxh:23549 klzzwxh:23570klzzwxh:23571 klzzwxh:23550isklzzwxh:23551backupklzzwxh:23552nodeklzzwxh:23553 klzzwxh:23572klzzwxh:23573 node-klzzwxh:23574etag klzzwxh:23554= NULLklzzwxh:23555 klzzwxh:23556klzzwxh:23619klzzwxh:23575klzzwxh:23576klzzwxh:23577klzzwxh:23578klzzwxh:23579klzzwxh:23580klzzwxh:23581 if klzzwxh:23557fprintfklzzwxh:23558file, klzzwxh:23582%sklzzwxh:23583d:%sklzzwxh:23584%sklzzwxh:23585/d:%sklzzwxh:23586klzzwxh:23559klzzwxh:23587, ind, typeklzzwxh:23560ETAGklzzwxh:23561, node-klzzwxh:23588etag,klzzwxh:23620klzzwxh:23589klzzwxh:23590klzzwxh:23591klzzwxh:23592klzzwxh:23593klzzwxh:23594klzzwxh:23595klzzwxh:23596klzzwxh:23597klzzwxh:23598klzzwxh:23599klzzwxh:23600klzzwxh:23601klzzwxh:23602klzzwxh:23603klzzwxh:23604klzzwxh:23605klzzwxh:23606klzzwxh:23607 typeklzzwxh:23562ETAGklzzwxh:23563klzzwxh:23564 klzzwxh:23608 0klzzwxh:23565klzzwxh:23621klzzwxh:23609klzzwxh:23610klzzwxh:23611klzzwxh:23612klzzwxh:23613klzzwxh:23614klzzwxh:23615 return -1;klzzwxh:23622klzzwxh:23616klzzwxh:23617klzzwxh:23618 klzzwxh:23566

      klzzwxh:23642klzzwxh:23643klzzwxh:23644 if klzzwxh:23623isklzzwxh:23624regklzzwxh:23625nodeklzzwxh:23626 klzzwxh:23645klzzwxh:23646 node-klzzwxh:23647mimeklzzwxh:23627type klzzwxh:23628= NULLklzzwxh:23629 klzzwxh:23630klzzwxh:23692klzzwxh:23648klzzwxh:23649klzzwxh:23650klzzwxh:23651klzzwxh:23652klzzwxh:23653klzzwxh:23654 if klzzwxh:23631fprintfklzzwxh:23632file, klzzwxh:23655%sklzzwxh:23656d:%sklzzwxh:23657%sklzzwxh:23658/d:%sklzzwxh:23659klzzwxh:23633klzzwxh:23660, ind, typeklzzwxh:23634MIMEklzzwxh:23635,klzzwxh:23693klzzwxh:23661klzzwxh:23662klzzwxh:23663klzzwxh:23664klzzwxh:23665klzzwxh:23666klzzwxh:23667klzzwxh:23668klzzwxh:23669klzzwxh:23670klzzwxh:23671klzzwxh:23672klzzwxh:23673klzzwxh:23674klzzwxh:23675klzzwxh:23676klzzwxh:23677klzzwxh:23678klzzwxh:23679 node-klzzwxh:23680mimeklzzwxh:23636type, typeklzzwxh:23637MIMEklzzwxh:23638klzzwxh:23639 klzzwxh:23681 0klzzwxh:23640klzzwxh:23694klzzwxh:23682klzzwxh:23683klzzwxh:23684klzzwxh:23685klzzwxh:23686klzzwxh:23687klzzwxh:23688 return -1;klzzwxh:23695klzzwxh:23689klzzwxh:23690klzzwxh:23691 klzzwxh:23641

      klzzwxh:23727klzzwxh:23728klzzwxh:23729 if klzzwxh:23696isklzzwxh:23697regklzzwxh:23698nodeklzzwxh:23699klzzwxh:23700 klzzwxh:23701klzzwxh:23812klzzwxh:23702if klzzwxh:23703FILEklzzwxh:23704OFFSETklzzwxh:23705BITS == 64klzzwxh:23813klzzwxh:23730klzzwxh:23731klzzwxh:23732klzzwxh:23733klzzwxh:23734klzzwxh:23735klzzwxh:23736 if klzzwxh:23706fprintfklzzwxh:23707file, klzzwxh:23737%sklzzwxh:23738d:%sklzzwxh:23739%lliklzzwxh:23740/d:%sklzzwxh:23741klzzwxh:23708klzzwxh:23742, ind, typeklzzwxh:23709SIZEklzzwxh:23710, node-klzzwxh:23743size,klzzwxh:23814klzzwxh:23744klzzwxh:23745klzzwxh:23746klzzwxh:23747klzzwxh:23748klzzwxh:23749klzzwxh:23750klzzwxh:23751klzzwxh:23752klzzwxh:23753klzzwxh:23754klzzwxh:23755klzzwxh:23756klzzwxh:23757klzzwxh:23758klzzwxh:23759klzzwxh:23760klzzwxh:23761klzzwxh:23762 typeklzzwxh:23711SIZEklzzwxh:23712klzzwxh:23713 klzzwxh:23763 0klzzwxh:23714klzzwxh:23815klzzwxh:23715elseklzzwxh:23816klzzwxh:23764klzzwxh:23765klzzwxh:23766klzzwxh:23767klzzwxh:23768klzzwxh:23769klzzwxh:23770 if klzzwxh:23716fprintfklzzwxh:23717file, klzzwxh:23771%sklzzwxh:23772d:%sklzzwxh:23773%liklzzwxh:23774/d:%sklzzwxh:23775klzzwxh:23718klzzwxh:23776, ind, typeklzzwxh:23719SIZEklzzwxh:23720, node-klzzwxh:23777size,klzzwxh:23817klzzwxh:23778klzzwxh:23779klzzwxh:23780klzzwxh:23781klzzwxh:23782klzzwxh:23783klzzwxh:23784klzzwxh:23785klzzwxh:23786klzzwxh:23787klzzwxh:23788klzzwxh:23789klzzwxh:23790klzzwxh:23791klzzwxh:23792klzzwxh:23793klzzwxh:23794klzzwxh:23795klzzwxh:23796 typeklzzwxh:23721SIZEklzzwxh:23722klzzwxh:23723 klzzwxh:23797 0klzzwxh:23724klzzwxh:23818klzzwxh:23725endifklzzwxh:23819klzzwxh:23798klzzwxh:23799klzzwxh:23800klzzwxh:23801klzzwxh:23802klzzwxh:23803klzzwxh:23804klzzwxh:23805klzzwxh:23806klzzwxh:23807klzzwxh:23808 return -1;klzzwxh:23820klzzwxh:23809klzzwxh:23810klzzwxh:23811 klzzwxh:23726

      klzzwxh:23839klzzwxh:23840klzzwxh:23841 char tklzzwxh:2382164klzzwxh:23822;klzzwxh:23885klzzwxh:23842klzzwxh:23843klzzwxh:23844 struct tm klzzwxh:23823lt = localtimeklzzwxh:23824klzzwxh:23845node-klzzwxh:23846atimeklzzwxh:23825;klzzwxh:23886klzzwxh:23847klzzwxh:23848klzzwxh:23849 strftimeklzzwxh:23826t, 64, klzzwxh:23850klzzwxh:23827%FT%T%zklzzwxh:23828klzzwxh:23851, ltklzzwxh:23829;klzzwxh:23887klzzwxh:23852klzzwxh:23853klzzwxh:23854 if klzzwxh:23830fprintfklzzwxh:23831file, klzzwxh:23855%sklzzwxh:23856d:%sklzzwxh:23857%li%sklzzwxh:23858/d:%sklzzwxh:23859klzzwxh:23832klzzwxh:23860, ind, typeklzzwxh:23833ATIMEklzzwxh:23834, node-klzzwxh:23861atime,klzzwxh:23888klzzwxh:23862klzzwxh:23863klzzwxh:23864klzzwxh:23865klzzwxh:23866klzzwxh:23867klzzwxh:23868klzzwxh:23869klzzwxh:23870klzzwxh:23871klzzwxh:23872klzzwxh:23873klzzwxh:23874klzzwxh:23875klzzwxh:23876 t, typeklzzwxh:23835ATIMEklzzwxh:23836klzzwxh:23837 klzzwxh:23877 0klzzwxh:23838klzzwxh:23889klzzwxh:23878klzzwxh:23879klzzwxh:23880klzzwxh:23881klzzwxh:23882klzzwxh:23883klzzwxh:23884 return -1;

      klzzwxh:23905klzzwxh:23906klzzwxh:23907 lt = localtimeklzzwxh:23890klzzwxh:23908node-klzzwxh:23909mtimeklzzwxh:23891;klzzwxh:23948klzzwxh:23910klzzwxh:23911klzzwxh:23912 strftimeklzzwxh:23892t, 64, klzzwxh:23913klzzwxh:23893%FT%T%zklzzwxh:23894klzzwxh:23914, ltklzzwxh:23895;klzzwxh:23949klzzwxh:23915klzzwxh:23916klzzwxh:23917 if klzzwxh:23896fprintfklzzwxh:23897file, klzzwxh:23918%sklzzwxh:23919d:%sklzzwxh:23920%li%sklzzwxh:23921/d:%sklzzwxh:23922klzzwxh:23898klzzwxh:23923, ind, typeklzzwxh:23899MTIMEklzzwxh:23900, node-klzzwxh:23924mtime,klzzwxh:23950klzzwxh:23925klzzwxh:23926klzzwxh:23927klzzwxh:23928klzzwxh:23929klzzwxh:23930klzzwxh:23931klzzwxh:23932klzzwxh:23933klzzwxh:23934klzzwxh:23935klzzwxh:23936klzzwxh:23937klzzwxh:23938klzzwxh:23939 t, typeklzzwxh:23901MTIMEklzzwxh:23902klzzwxh:23903 klzzwxh:23940 0klzzwxh:23904klzzwxh:23951klzzwxh:23941klzzwxh:23942klzzwxh:23943klzzwxh:23944klzzwxh:23945klzzwxh:23946klzzwxh:23947 return -1;

      klzzwxh:23967klzzwxh:23968klzzwxh:23969 lt = localtimeklzzwxh:23952klzzwxh:23970node-klzzwxh:23971ctimeklzzwxh:23953;klzzwxh:24010klzzwxh:23972klzzwxh:23973klzzwxh:23974 strftimeklzzwxh:23954t, 64, klzzwxh:23975klzzwxh:23955%FT%T%zklzzwxh:23956klzzwxh:23976, ltklzzwxh:23957;klzzwxh:24011klzzwxh:23977klzzwxh:23978klzzwxh:23979 if klzzwxh:23958fprintfklzzwxh:23959file, klzzwxh:23980%sklzzwxh:23981d:%sklzzwxh:23982%li%sklzzwxh:23983/d:%sklzzwxh:23984klzzwxh:23960klzzwxh:23985, ind, typeklzzwxh:23961CTIMEklzzwxh:23962, node-klzzwxh:23986ctime,klzzwxh:24012klzzwxh:23987klzzwxh:23988klzzwxh:23989klzzwxh:23990klzzwxh:23991klzzwxh:23992klzzwxh:23993klzzwxh:23994klzzwxh:23995klzzwxh:23996klzzwxh:23997klzzwxh:23998klzzwxh:23999klzzwxh:24000klzzwxh:24001 t, typeklzzwxh:23963CTIMEklzzwxh:23964klzzwxh:23965 klzzwxh:24002 0klzzwxh:23966klzzwxh:24013klzzwxh:24003klzzwxh:24004klzzwxh:24005klzzwxh:24006klzzwxh:24007klzzwxh:24008klzzwxh:24009 return -1;

      klzzwxh:24040klzzwxh:24041klzzwxh:24042 if klzzwxh:24014isklzzwxh:24015regklzzwxh:24016nodeklzzwxh:24017 klzzwxh:24043klzzwxh:24044 klzzwxh:24018isklzzwxh:24019backupklzzwxh:24020nodeklzzwxh:24021klzzwxh:24022 klzzwxh:24023klzzwxh:24111klzzwxh:24045klzzwxh:24046klzzwxh:24047klzzwxh:24048klzzwxh:24049klzzwxh:24050klzzwxh:24051 lt = localtimeklzzwxh:24024klzzwxh:24052node-klzzwxh:24053smtimeklzzwxh:24025;klzzwxh:24112klzzwxh:24054klzzwxh:24055klzzwxh:24056klzzwxh:24057klzzwxh:24058klzzwxh:24059klzzwxh:24060 strftimeklzzwxh:24026t, 64, klzzwxh:24061klzzwxh:24027%FT%T%zklzzwxh:24028klzzwxh:24062, ltklzzwxh:24029;klzzwxh:24113klzzwxh:24063klzzwxh:24064klzzwxh:24065klzzwxh:24066klzzwxh:24067klzzwxh:24068klzzwxh:24069 if klzzwxh:24030fprintfklzzwxh:24031file, klzzwxh:24070%sklzzwxh:24071d:%sklzzwxh:24072%li%sklzzwxh:24073/d:%sklzzwxh:24074klzzwxh:24032klzzwxh:24075, ind, typeklzzwxh:24033SMTIMEklzzwxh:24034,klzzwxh:24114klzzwxh:24076klzzwxh:24077klzzwxh:24078klzzwxh:24079klzzwxh:24080klzzwxh:24081klzzwxh:24082klzzwxh:24083klzzwxh:24084klzzwxh:24085klzzwxh:24086klzzwxh:24087klzzwxh:24088klzzwxh:24089klzzwxh:24090klzzwxh:24091klzzwxh:24092klzzwxh:24093klzzwxh:24094 node-klzzwxh:24095smtime, t, typeklzzwxh:24035SMTIMEklzzwxh:24036klzzwxh:24037 klzzwxh:24096 0klzzwxh:24038klzzwxh:24115klzzwxh:24097klzzwxh:24098klzzwxh:24099klzzwxh:24100klzzwxh:24101klzzwxh:24102klzzwxh:24103klzzwxh:24104klzzwxh:24105klzzwxh:24106klzzwxh:24107 return -1;klzzwxh:24116klzzwxh:24108klzzwxh:24109klzzwxh:24110 klzzwxh:24039

      klzzwxh:24157klzzwxh:24158klzzwxh:24159 if klzzwxh:24117isklzzwxh:24118regklzzwxh:24119nodeklzzwxh:24120 klzzwxh:24160klzzwxh:24161 klzzwxh:24121isklzzwxh:24122backupklzzwxh:24123nodeklzzwxh:24124klzzwxh:24268klzzwxh:24162klzzwxh:24163klzzwxh:24164klzzwxh:24165klzzwxh:24166klzzwxh:24167klzzwxh:24168klzzwxh:24169klzzwxh:24170klzzwxh:24171klzzwxh:24172 klzzwxh:24173klzzwxh:24174 klzzwxh:24125isklzzwxh:24126dirtyklzzwxh:24127nodeklzzwxh:24128 || isklzzwxh:24129createdklzzwxh:24130nodeklzzwxh:24131klzzwxh:24132klzzwxh:24133 klzzwxh:24134klzzwxh:24269klzzwxh:24175klzzwxh:24176klzzwxh:24177klzzwxh:24178klzzwxh:24179klzzwxh:24180klzzwxh:24181 if klzzwxh:24135fprintfklzzwxh:24136file, klzzwxh:24182%sklzzwxh:24183d:%sklzzwxh:24184%iklzzwxh:24185/d:%sklzzwxh:24186klzzwxh:24137klzzwxh:24187, ind, typeklzzwxh:24138REMOTEklzzwxh:24139EXISTSklzzwxh:24140,klzzwxh:24270klzzwxh:24188klzzwxh:24189klzzwxh:24190klzzwxh:24191klzzwxh:24192klzzwxh:24193klzzwxh:24194klzzwxh:24195klzzwxh:24196klzzwxh:24197klzzwxh:24198klzzwxh:24199klzzwxh:24200klzzwxh:24201klzzwxh:24202klzzwxh:24203klzzwxh:24204klzzwxh:24205klzzwxh:24206 node-klzzwxh:24207remoteklzzwxh:24141exists, typeklzzwxh:24142REMOTEklzzwxh:24143EXISTSklzzwxh:24144klzzwxh:24145 klzzwxh:24208 0klzzwxh:24146klzzwxh:24271klzzwxh:24209klzzwxh:24210klzzwxh:24211klzzwxh:24212klzzwxh:24213klzzwxh:24214klzzwxh:24215klzzwxh:24216klzzwxh:24217klzzwxh:24218klzzwxh:24219 return -1;klzzwxh:24272klzzwxh:24220klzzwxh:24221klzzwxh:24222klzzwxh:24223klzzwxh:24224klzzwxh:24225klzzwxh:24226 if klzzwxh:24147fprintfklzzwxh:24148file, klzzwxh:24227%sklzzwxh:24228d:%sklzzwxh:24229%iklzzwxh:24230/d:%sklzzwxh:24231klzzwxh:24149klzzwxh:24232, ind, typeklzzwxh:24150DIRTYklzzwxh:24151, node-klzzwxh:24233dirty,klzzwxh:24273klzzwxh:24234klzzwxh:24235klzzwxh:24236klzzwxh:24237klzzwxh:24238klzzwxh:24239klzzwxh:24240klzzwxh:24241klzzwxh:24242klzzwxh:24243klzzwxh:24244klzzwxh:24245klzzwxh:24246klzzwxh:24247klzzwxh:24248klzzwxh:24249klzzwxh:24250klzzwxh:24251klzzwxh:24252 typeklzzwxh:24152DIRTYklzzwxh:24153klzzwxh:24154 klzzwxh:24253 0klzzwxh:24155klzzwxh:24274klzzwxh:24254klzzwxh:24255klzzwxh:24256klzzwxh:24257klzzwxh:24258klzzwxh:24259klzzwxh:24260klzzwxh:24261klzzwxh:24262klzzwxh:24263klzzwxh:24264 return -1;klzzwxh:24275klzzwxh:24265klzzwxh:24266klzzwxh:24267 klzzwxh:24156

      klzzwxh:24290klzzwxh:24291klzzwxh:24292 if klzzwxh:24276node klzzwxh:24277= backupklzzwxh:24278 klzzwxh:24279klzzwxh:24341klzzwxh:24293klzzwxh:24294klzzwxh:24295klzzwxh:24296klzzwxh:24297klzzwxh:24298klzzwxh:24299 if klzzwxh:24280fprintfklzzwxh:24281file, klzzwxh:24300%sklzzwxh:24301d:%sklzzwxh:24302%oklzzwxh:24303/d:%sklzzwxh:24304klzzwxh:24282klzzwxh:24305, ind, typeklzzwxh:24283MODEklzzwxh:24284, node-klzzwxh:24306mode,klzzwxh:24342klzzwxh:24307klzzwxh:24308klzzwxh:24309klzzwxh:24310klzzwxh:24311klzzwxh:24312klzzwxh:24313klzzwxh:24314klzzwxh:24315klzzwxh:24316klzzwxh:24317klzzwxh:24318klzzwxh:24319klzzwxh:24320klzzwxh:24321klzzwxh:24322klzzwxh:24323klzzwxh:24324klzzwxh:24325 typeklzzwxh:24285MODEklzzwxh:24286klzzwxh:24287 klzzwxh:24326 0klzzwxh:24288klzzwxh:24343klzzwxh:24327klzzwxh:24328klzzwxh:24329klzzwxh:24330klzzwxh:24331klzzwxh:24332klzzwxh:24333klzzwxh:24334klzzwxh:24335klzzwxh:24336klzzwxh:24337 return -1;klzzwxh:24344klzzwxh:24338klzzwxh:24339klzzwxh:24340 klzzwxh:24289

      klzzwxh:24369klzzwxh:24370klzzwxh:24371 if klzzwxh:24345node klzzwxh:24346= root klzzwxh:24372klzzwxh:24373 node klzzwxh:24347= backupklzzwxh:24348 klzzwxh:24349klzzwxh:24467klzzwxh:24374klzzwxh:24375klzzwxh:24376klzzwxh:24377klzzwxh:24378klzzwxh:24379klzzwxh:24380 if klzzwxh:24350fprintfklzzwxh:24351file, klzzwxh:24381%sklzzwxh:24382d:%sklzzwxh:24383%iklzzwxh:24384/d:%sklzzwxh:24385klzzwxh:24352klzzwxh:24386, ind, typeklzzwxh:24353UIDklzzwxh:24354, node-klzzwxh:24387uid,klzzwxh:24468klzzwxh:24388klzzwxh:24389klzzwxh:24390klzzwxh:24391klzzwxh:24392klzzwxh:24393klzzwxh:24394klzzwxh:24395klzzwxh:24396klzzwxh:24397klzzwxh:24398klzzwxh:24399klzzwxh:24400klzzwxh:24401klzzwxh:24402klzzwxh:24403klzzwxh:24404klzzwxh:24405klzzwxh:24406 typeklzzwxh:24355UIDklzzwxh:24356klzzwxh:24357 klzzwxh:24407 0klzzwxh:24358klzzwxh:24469klzzwxh:24408klzzwxh:24409klzzwxh:24410klzzwxh:24411klzzwxh:24412klzzwxh:24413klzzwxh:24414klzzwxh:24415klzzwxh:24416klzzwxh:24417klzzwxh:24418 return -1;klzzwxh:24470klzzwxh:24419klzzwxh:24420klzzwxh:24421klzzwxh:24422klzzwxh:24423klzzwxh:24424klzzwxh:24425 if klzzwxh:24359fprintfklzzwxh:24360file, klzzwxh:24426%sklzzwxh:24427d:%sklzzwxh:24428%iklzzwxh:24429/d:%sklzzwxh:24430klzzwxh:24361klzzwxh:24431, ind, typeklzzwxh:24362GIDklzzwxh:24363, node-klzzwxh:24432gid,klzzwxh:24471klzzwxh:24433klzzwxh:24434klzzwxh:24435klzzwxh:24436klzzwxh:24437klzzwxh:24438klzzwxh:24439klzzwxh:24440klzzwxh:24441klzzwxh:24442klzzwxh:24443klzzwxh:24444klzzwxh:24445klzzwxh:24446klzzwxh:24447klzzwxh:24448klzzwxh:24449klzzwxh:24450klzzwxh:24451 typeklzzwxh:24364GIDklzzwxh:24365klzzwxh:24366 klzzwxh:24452 0klzzwxh:24367klzzwxh:24472klzzwxh:24453klzzwxh:24454klzzwxh:24455klzzwxh:24456klzzwxh:24457klzzwxh:24458klzzwxh:24459klzzwxh:24460klzzwxh:24461klzzwxh:24462klzzwxh:24463 return -1;klzzwxh:24473klzzwxh:24464klzzwxh:24465klzzwxh:24466 klzzwxh:24368

      klzzwxh:24486klzzwxh:24487klzzwxh:24488 davklzzwxh:24474node klzzwxh:24475child = node-klzzwxh:24489childs;klzzwxh:24523klzzwxh:24490klzzwxh:24491klzzwxh:24492 while klzzwxh:24476child klzzwxh:24477= NULLklzzwxh:24478 klzzwxh:24479klzzwxh:24524klzzwxh:24493klzzwxh:24494klzzwxh:24495klzzwxh:24496klzzwxh:24497klzzwxh:24498klzzwxh:24499 if klzzwxh:24480writeklzzwxh:24481nodeklzzwxh:24482child, file, indklzzwxh:24483 klzzwxh:24500 0klzzwxh:24484klzzwxh:24525klzzwxh:24501klzzwxh:24502klzzwxh:24503klzzwxh:24504klzzwxh:24505klzzwxh:24506klzzwxh:24507klzzwxh:24508klzzwxh:24509klzzwxh:24510klzzwxh:24511 return -1;klzzwxh:24526klzzwxh:24512klzzwxh:24513klzzwxh:24514klzzwxh:24515klzzwxh:24516klzzwxh:24517klzzwxh:24518 child = child-klzzwxh:24519next;klzzwxh:24527klzzwxh:24520klzzwxh:24521klzzwxh:24522 klzzwxh:24485

      klzzwxh:24573klzzwxh:24574klzzwxh:24575 if klzzwxh:24528node == rootklzzwxh:24529 klzzwxh:24530klzzwxh:24680klzzwxh:24576klzzwxh:24577klzzwxh:24578klzzwxh:24579klzzwxh:24580klzzwxh:24581klzzwxh:24582 if klzzwxh:24531fprintfklzzwxh:24532file, klzzwxh:24583%sklzzwxh:24584/d:%sklzzwxh:24585klzzwxh:24533klzzwxh:24586, indent, typeklzzwxh:24534ROOTklzzwxh:24535klzzwxh:24536 klzzwxh:24587 0klzzwxh:24537klzzwxh:24681klzzwxh:24588klzzwxh:24589klzzwxh:24590klzzwxh:24591klzzwxh:24592klzzwxh:24593klzzwxh:24594klzzwxh:24595klzzwxh:24596klzzwxh:24597klzzwxh:24598 return -1;klzzwxh:24682klzzwxh:24599klzzwxh:24600klzzwxh:24601 klzzwxh:24538 else if klzzwxh:24539node == backupklzzwxh:24540 klzzwxh:24541klzzwxh:24683klzzwxh:24602klzzwxh:24603klzzwxh:24604klzzwxh:24605klzzwxh:24606klzzwxh:24607klzzwxh:24608 if klzzwxh:24542fprintfklzzwxh:24543file, klzzwxh:24609%sklzzwxh:24610/d:%sklzzwxh:24611klzzwxh:24544klzzwxh:24612, indent, typeklzzwxh:24545BACKUPklzzwxh:24546klzzwxh:24547 klzzwxh:24613 0klzzwxh:24548klzzwxh:24684klzzwxh:24614klzzwxh:24615klzzwxh:24616klzzwxh:24617klzzwxh:24618klzzwxh:24619klzzwxh:24620klzzwxh:24621klzzwxh:24622klzzwxh:24623klzzwxh:24624 return -1;klzzwxh:24685klzzwxh:24625klzzwxh:24626klzzwxh:24627 klzzwxh:24549 else if klzzwxh:24550isklzzwxh:24551dirklzzwxh:24552nodeklzzwxh:24553klzzwxh:24554 klzzwxh:24555klzzwxh:24686klzzwxh:24628klzzwxh:24629klzzwxh:24630klzzwxh:24631klzzwxh:24632klzzwxh:24633klzzwxh:24634 if klzzwxh:24556fprintfklzzwxh:24557file, klzzwxh:24635%sklzzwxh:24636/d:%sklzzwxh:24637klzzwxh:24558klzzwxh:24638, indent, typeklzzwxh:24559DDIRklzzwxh:24560klzzwxh:24561 klzzwxh:24639 0klzzwxh:24562klzzwxh:24687klzzwxh:24640klzzwxh:24641klzzwxh:24642klzzwxh:24643klzzwxh:24644klzzwxh:24645klzzwxh:24646klzzwxh:24647klzzwxh:24648klzzwxh:24649klzzwxh:24650 return -1;klzzwxh:24688klzzwxh:24651klzzwxh:24652klzzwxh:24653 klzzwxh:24563 else klzzwxh:24564klzzwxh:24689klzzwxh:24654klzzwxh:24655klzzwxh:24656klzzwxh:24657klzzwxh:24658klzzwxh:24659klzzwxh:24660 if klzzwxh:24565fprintfklzzwxh:24566file, klzzwxh:24661%sklzzwxh:24662/d:%sklzzwxh:24663klzzwxh:24567klzzwxh:24664, indent, typeklzzwxh:24568REGklzzwxh:24569klzzwxh:24570 klzzwxh:24665 0klzzwxh:24571klzzwxh:24690klzzwxh:24666klzzwxh:24667klzzwxh:24668klzzwxh:24669klzzwxh:24670klzzwxh:24671klzzwxh:24672klzzwxh:24673klzzwxh:24674klzzwxh:24675klzzwxh:24676 return -1;klzzwxh:24691klzzwxh:24677klzzwxh:24678klzzwxh:24679 klzzwxh:24572

      klzzwxh:24695klzzwxh:24696klzzwxh:24697 freeklzzwxh:24692indklzzwxh:24693;klzzwxh:24701klzzwxh:24698klzzwxh:24699klzzwxh:24700 return 0;klzzwxh:24702klzzwxh:24694

      /klzzwxh:24703 Concatenate data from subsequent callbacks into xmlklzzwxh:24704data. klzzwxh:24705/klzzwxh:24733static int xmlklzzwxh:24706cdataklzzwxh:24707void klzzwxh:24708userdata, int state, const char klzzwxh:24709cdata,klzzwxh:24734klzzwxh:24713klzzwxh:24714klzzwxh:24715klzzwxh:24716klzzwxh:24717klzzwxh:24718klzzwxh:24719klzzwxh:24720klzzwxh:24721klzzwxh:24722klzzwxh:24723klzzwxh:24724klzzwxh:24725klzzwxh:24726klzzwxh:24727klzzwxh:24728klzzwxh:24729klzzwxh:24730klzzwxh:24731klzzwxh:24732 sizeklzzwxh:24710t lenklzzwxh:24711 klzzwxh:24712

      klzzwxh:24762klzzwxh:24763klzzwxh:24764 if klzzwxh:24735klzzwxh:24736xmlklzzwxh:24737dataklzzwxh:24738 klzzwxh:24739klzzwxh:24813klzzwxh:24765klzzwxh:24766klzzwxh:24767klzzwxh:24768klzzwxh:24769klzzwxh:24770klzzwxh:24771 xmlklzzwxh:24740data = neklzzwxh:24741strndupklzzwxh:24742cdata, lenklzzwxh:24743;klzzwxh:24814klzzwxh:24772klzzwxh:24773klzzwxh:24774 klzzwxh:24744 else klzzwxh:24745klzzwxh:24815klzzwxh:24775klzzwxh:24776klzzwxh:24777klzzwxh:24778klzzwxh:24779klzzwxh:24780klzzwxh:24781 char klzzwxh:24746add = neklzzwxh:24747strndupklzzwxh:24748cdata, lenklzzwxh:24749;klzzwxh:24816klzzwxh:24782klzzwxh:24783klzzwxh:24784klzzwxh:24785klzzwxh:24786klzzwxh:24787klzzwxh:24788 char klzzwxh:24750new = neklzzwxh:24751concatklzzwxh:24752xmlklzzwxh:24753data, add, NULLklzzwxh:24754;klzzwxh:24817klzzwxh:24789klzzwxh:24790klzzwxh:24791klzzwxh:24792klzzwxh:24793klzzwxh:24794klzzwxh:24795 freeklzzwxh:24755addklzzwxh:24756;klzzwxh:24818klzzwxh:24796klzzwxh:24797klzzwxh:24798klzzwxh:24799klzzwxh:24800klzzwxh:24801klzzwxh:24802 freeklzzwxh:24757xmlklzzwxh:24758dataklzzwxh:24759;klzzwxh:24819klzzwxh:24803klzzwxh:24804klzzwxh:24805klzzwxh:24806klzzwxh:24807klzzwxh:24808klzzwxh:24809 xmlklzzwxh:24760data = new;klzzwxh:24820klzzwxh:24810klzzwxh:24811klzzwxh:24812 klzzwxh:24761

      klzzwxh:24822klzzwxh:24823klzzwxh:24824 return 0;klzzwxh:24825klzzwxh:24821

      /klzzwxh:24826 Finishes the creation of directory backup.klzzwxh:24865klzzwxh:24836klzzwxh:24837 userdata is set to the parent of backup.klzzwxh:24866klzzwxh:24838klzzwxh:24839 return value : allways 0. klzzwxh:24827/klzzwxh:24867static int xmlklzzwxh:24828endklzzwxh:24829backupklzzwxh:24830void klzzwxh:24831userdata, int state, const char klzzwxh:24832nspace,klzzwxh:24868klzzwxh:24840klzzwxh:24841klzzwxh:24842klzzwxh:24843klzzwxh:24844klzzwxh:24845klzzwxh:24846klzzwxh:24847klzzwxh:24848klzzwxh:24849klzzwxh:24850klzzwxh:24851klzzwxh:24852klzzwxh:24853klzzwxh:24854klzzwxh:24855klzzwxh:24856klzzwxh:24857klzzwxh:24858klzzwxh:24859klzzwxh:24860klzzwxh:24861klzzwxh:24862klzzwxh:24863klzzwxh:24864 const char klzzwxh:24833nameklzzwxh:24834 klzzwxh:24835

      klzzwxh:24887klzzwxh:24888klzzwxh:24889 davklzzwxh:24869node klzzwxh:24870dir = klzzwxh:24871klzzwxh:24872klzzwxh:24873davklzzwxh:24874node klzzwxh:24875klzzwxh:24876klzzwxh:24877 userdataklzzwxh:24878;klzzwxh:24894klzzwxh:24890klzzwxh:24891klzzwxh:24892 klzzwxh:24879klzzwxh:24880klzzwxh:24881davklzzwxh:24882node klzzwxh:24883klzzwxh:24884klzzwxh:24885 userdataklzzwxh:24886 = dir-klzzwxh:24893parent;

      klzzwxh:24920klzzwxh:24921klzzwxh:24922 if klzzwxh:24895dir-klzzwxh:24923path klzzwxh:24896= NULLklzzwxh:24897 klzzwxh:24898klzzwxh:24996klzzwxh:24924klzzwxh:24925klzzwxh:24926klzzwxh:24927klzzwxh:24928klzzwxh:24929klzzwxh:24930 freeklzzwxh:24899dir-klzzwxh:24931pathklzzwxh:24900;klzzwxh:24997klzzwxh:24932klzzwxh:24933klzzwxh:24934klzzwxh:24935klzzwxh:24936klzzwxh:24937klzzwxh:24938 dir-klzzwxh:24939path = NULL;klzzwxh:24998klzzwxh:24940klzzwxh:24941klzzwxh:24942 klzzwxh:24901klzzwxh:24999klzzwxh:24943klzzwxh:24944klzzwxh:24945 if klzzwxh:24902dir-klzzwxh:24946name klzzwxh:24903= NULLklzzwxh:24904 klzzwxh:24905klzzwxh:25000klzzwxh:24947klzzwxh:24948klzzwxh:24949klzzwxh:24950klzzwxh:24951klzzwxh:24952klzzwxh:24953 freeklzzwxh:24906dir-klzzwxh:24954nameklzzwxh:24907;klzzwxh:25001klzzwxh:24955klzzwxh:24956klzzwxh:24957klzzwxh:24958klzzwxh:24959klzzwxh:24960klzzwxh:24961 dir-klzzwxh:24962name = NULL;klzzwxh:25002klzzwxh:24963klzzwxh:24964klzzwxh:24965 klzzwxh:24908klzzwxh:25003klzzwxh:24966klzzwxh:24967klzzwxh:24968 deleteklzzwxh:24909cacheklzzwxh:24910fileklzzwxh:24911dirklzzwxh:24912;klzzwxh:25004klzzwxh:24969klzzwxh:24970klzzwxh:24971 if klzzwxh:24913dir-klzzwxh:24972etag klzzwxh:24914= NULLklzzwxh:24915 klzzwxh:24916klzzwxh:25005klzzwxh:24973klzzwxh:24974klzzwxh:24975klzzwxh:24976klzzwxh:24977klzzwxh:24978klzzwxh:24979 freeklzzwxh:24917dir-klzzwxh:24980etagklzzwxh:24918;klzzwxh:25006klzzwxh:24981klzzwxh:24982klzzwxh:24983klzzwxh:24984klzzwxh:24985klzzwxh:24986klzzwxh:24987 dir-klzzwxh:24988etag = NULL;klzzwxh:25007klzzwxh:24989klzzwxh:24990klzzwxh:24991 klzzwxh:24919klzzwxh:25008klzzwxh:24992klzzwxh:24993klzzwxh:24994 dir-klzzwxh:24995smtime = 0;

      klzzwxh:25010klzzwxh:25011klzzwxh:25012 return 0;klzzwxh:25013klzzwxh:25009

      /klzzwxh:25014 xmlklzzwxh:25015data must be a string representing a value as a decimal number.klzzwxh:25054klzzwxh:25025klzzwxh:25026 Its value is assigned to the appropriate member of node userdata.klzzwxh:25055klzzwxh:25027klzzwxh:25028 state indacates the member of node.klzzwxh:25056klzzwxh:25029klzzwxh:25030 return value : 0 on success, -1 if an error occurs. klzzwxh:25016/klzzwxh:25057static int xmlklzzwxh:25017endklzzwxh:25018dateklzzwxh:25019void klzzwxh:25020userdata, int state, const char klzzwxh:25021nspace,klzzwxh:25058klzzwxh:25031klzzwxh:25032klzzwxh:25033klzzwxh:25034klzzwxh:25035klzzwxh:25036klzzwxh:25037klzzwxh:25038klzzwxh:25039klzzwxh:25040klzzwxh:25041klzzwxh:25042klzzwxh:25043klzzwxh:25044klzzwxh:25045klzzwxh:25046klzzwxh:25047klzzwxh:25048klzzwxh:25049klzzwxh:25050klzzwxh:25051klzzwxh:25052klzzwxh:25053 const char klzzwxh:25022nameklzzwxh:25023 klzzwxh:25024

      klzzwxh:25063klzzwxh:25064klzzwxh:25065 if klzzwxh:25059klzzwxh:25060xmlklzzwxh:25061dataklzzwxh:25062klzzwxh:25073klzzwxh:25066klzzwxh:25067klzzwxh:25068klzzwxh:25069klzzwxh:25070klzzwxh:25071klzzwxh:25072 return -1;

      klzzwxh:25097klzzwxh:25098klzzwxh:25099 char klzzwxh:25074tail;klzzwxh:25139klzzwxh:25100klzzwxh:25101klzzwxh:25102 timeklzzwxh:25075t t = strtolklzzwxh:25076xmlklzzwxh:25077data, klzzwxh:25103tail, 10klzzwxh:25078;klzzwxh:25140klzzwxh:25104klzzwxh:25105klzzwxh:25106 if klzzwxh:25079klzzwxh:25080tail klzzwxh:25081= 'klzzwxh:25082' klzzwxh:25107klzzwxh:25108 klzzwxh:25083tail klzzwxh:25084= 'klzzwxh:25085'klzzwxh:25086 klzzwxh:25087klzzwxh:25141klzzwxh:25109klzzwxh:25110klzzwxh:25111klzzwxh:25112klzzwxh:25113klzzwxh:25114klzzwxh:25115 freeklzzwxh:25088xmlklzzwxh:25089dataklzzwxh:25090;klzzwxh:25142klzzwxh:25116klzzwxh:25117klzzwxh:25118klzzwxh:25119klzzwxh:25120klzzwxh:25121klzzwxh:25122 xmlklzzwxh:25091data = NULL;klzzwxh:25143klzzwxh:25123klzzwxh:25124klzzwxh:25125klzzwxh:25126klzzwxh:25127klzzwxh:25128klzzwxh:25129 return -1;klzzwxh:25144klzzwxh:25130klzzwxh:25131klzzwxh:25132 klzzwxh:25092klzzwxh:25145klzzwxh:25133klzzwxh:25134klzzwxh:25135 freeklzzwxh:25093xmlklzzwxh:25094dataklzzwxh:25095;klzzwxh:25146klzzwxh:25136klzzwxh:25137klzzwxh:25138 xmlklzzwxh:25096data = NULL;

      klzzwxh:25191klzzwxh:25192klzzwxh:25193 switch klzzwxh:25147stateklzzwxh:25148 klzzwxh:25149klzzwxh:25279klzzwxh:25194klzzwxh:25195klzzwxh:25196 case ATIME:klzzwxh:25280klzzwxh:25197klzzwxh:25198klzzwxh:25199klzzwxh:25200klzzwxh:25201klzzwxh:25202klzzwxh:25203 klzzwxh:25150klzzwxh:25151klzzwxh:25152klzzwxh:25153davklzzwxh:25154node klzzwxh:25155klzzwxh:25156klzzwxh:25157 userdataklzzwxh:25158klzzwxh:25159-klzzwxh:25204atime = t;klzzwxh:25281klzzwxh:25205klzzwxh:25206klzzwxh:25207klzzwxh:25208klzzwxh:25209klzzwxh:25210klzzwxh:25211 break;klzzwxh:25282klzzwxh:25212klzzwxh:25213klzzwxh:25214 case MTIME:klzzwxh:25283klzzwxh:25215klzzwxh:25216klzzwxh:25217klzzwxh:25218klzzwxh:25219klzzwxh:25220klzzwxh:25221 klzzwxh:25160klzzwxh:25161klzzwxh:25162klzzwxh:25163davklzzwxh:25164node klzzwxh:25165klzzwxh:25166klzzwxh:25167 userdataklzzwxh:25168klzzwxh:25169-klzzwxh:25222mtime = t;klzzwxh:25284klzzwxh:25223klzzwxh:25224klzzwxh:25225klzzwxh:25226klzzwxh:25227klzzwxh:25228klzzwxh:25229 break;klzzwxh:25285klzzwxh:25230klzzwxh:25231klzzwxh:25232 case CTIME:klzzwxh:25286klzzwxh:25233klzzwxh:25234klzzwxh:25235klzzwxh:25236klzzwxh:25237klzzwxh:25238klzzwxh:25239 klzzwxh:25170klzzwxh:25171klzzwxh:25172klzzwxh:25173davklzzwxh:25174node klzzwxh:25175klzzwxh:25176klzzwxh:25177 userdataklzzwxh:25178klzzwxh:25179-klzzwxh:25240ctime = t;klzzwxh:25287klzzwxh:25241klzzwxh:25242klzzwxh:25243klzzwxh:25244klzzwxh:25245klzzwxh:25246klzzwxh:25247 break;klzzwxh:25288klzzwxh:25248klzzwxh:25249klzzwxh:25250 case SMTIME:klzzwxh:25289klzzwxh:25251klzzwxh:25252klzzwxh:25253klzzwxh:25254klzzwxh:25255klzzwxh:25256klzzwxh:25257 klzzwxh:25180klzzwxh:25181klzzwxh:25182klzzwxh:25183davklzzwxh:25184node klzzwxh:25185klzzwxh:25186klzzwxh:25187 userdataklzzwxh:25188klzzwxh:25189-klzzwxh:25258smtime = t;klzzwxh:25290klzzwxh:25259klzzwxh:25260klzzwxh:25261klzzwxh:25262klzzwxh:25263klzzwxh:25264klzzwxh:25265 break;klzzwxh:25291klzzwxh:25266klzzwxh:25267klzzwxh:25268 default:klzzwxh:25292klzzwxh:25269klzzwxh:25270klzzwxh:25271klzzwxh:25272klzzwxh:25273klzzwxh:25274klzzwxh:25275 return -1;klzzwxh:25293klzzwxh:25276klzzwxh:25277klzzwxh:25278 klzzwxh:25190

      klzzwxh:25295klzzwxh:25296klzzwxh:25297 return 0;klzzwxh:25298klzzwxh:25294

      /klzzwxh:25299 xmlklzzwxh:25300dat must be a string representation of a decimal number. Its value isklzzwxh:25342klzzwxh:25310klzzwxh:25311 assigned to the appropriate member of node userdata. state indacates theklzzwxh:25343klzzwxh:25312klzzwxh:25313 member of node.klzzwxh:25344klzzwxh:25314klzzwxh:25315 return value : 0 on success, -1 if an error occurs. klzzwxh:25301/klzzwxh:25345static int xmlklzzwxh:25302endklzzwxh:25303decimalklzzwxh:25304void klzzwxh:25305userdata, int state, const char klzzwxh:25306nspace,klzzwxh:25346klzzwxh:25316klzzwxh:25317klzzwxh:25318klzzwxh:25319klzzwxh:25320klzzwxh:25321klzzwxh:25322klzzwxh:25323klzzwxh:25324klzzwxh:25325klzzwxh:25326klzzwxh:25327klzzwxh:25328klzzwxh:25329klzzwxh:25330klzzwxh:25331klzzwxh:25332klzzwxh:25333klzzwxh:25334klzzwxh:25335klzzwxh:25336klzzwxh:25337klzzwxh:25338klzzwxh:25339klzzwxh:25340klzzwxh:25341 const char klzzwxh:25307nameklzzwxh:25308 klzzwxh:25309

      klzzwxh:25351klzzwxh:25352klzzwxh:25353 if klzzwxh:25347klzzwxh:25348xmlklzzwxh:25349dataklzzwxh:25350klzzwxh:25361klzzwxh:25354klzzwxh:25355klzzwxh:25356klzzwxh:25357klzzwxh:25358klzzwxh:25359klzzwxh:25360 return -1;

      klzzwxh:25381klzzwxh:25382klzzwxh:25383 char klzzwxh:25362tail;klzzwxh:25421klzzwxh:25384klzzwxh:25385klzzwxh:25386 long int n = strtolklzzwxh:25363xmlklzzwxh:25364data, klzzwxh:25387tail, 10klzzwxh:25365;klzzwxh:25422klzzwxh:25388klzzwxh:25389klzzwxh:25390 if klzzwxh:25366klzzwxh:25367tail klzzwxh:25368= 'klzzwxh:25369'klzzwxh:25370 klzzwxh:25371klzzwxh:25423klzzwxh:25391klzzwxh:25392klzzwxh:25393klzzwxh:25394klzzwxh:25395klzzwxh:25396klzzwxh:25397 freeklzzwxh:25372xmlklzzwxh:25373dataklzzwxh:25374;klzzwxh:25424klzzwxh:25398klzzwxh:25399klzzwxh:25400klzzwxh:25401klzzwxh:25402klzzwxh:25403klzzwxh:25404 xmlklzzwxh:25375data = NULL;klzzwxh:25425klzzwxh:25405klzzwxh:25406klzzwxh:25407klzzwxh:25408klzzwxh:25409klzzwxh:25410klzzwxh:25411 return -1;klzzwxh:25426klzzwxh:25412klzzwxh:25413klzzwxh:25414 klzzwxh:25376klzzwxh:25427klzzwxh:25415klzzwxh:25416klzzwxh:25417 freeklzzwxh:25377xmlklzzwxh:25378dataklzzwxh:25379;klzzwxh:25428klzzwxh:25418klzzwxh:25419klzzwxh:25420 xmlklzzwxh:25380data = NULL;

      klzzwxh:25475klzzwxh:25476klzzwxh:25477 switch klzzwxh:25429stateklzzwxh:25430 klzzwxh:25431klzzwxh:25563klzzwxh:25478klzzwxh:25479klzzwxh:25480 case UID:klzzwxh:25564klzzwxh:25481klzzwxh:25482klzzwxh:25483klzzwxh:25484klzzwxh:25485klzzwxh:25486klzzwxh:25487 klzzwxh:25432klzzwxh:25433klzzwxh:25434klzzwxh:25435davklzzwxh:25436node klzzwxh:25437klzzwxh:25438klzzwxh:25439 userdataklzzwxh:25440klzzwxh:25441-klzzwxh:25488uid = n;klzzwxh:25565klzzwxh:25489klzzwxh:25490klzzwxh:25491klzzwxh:25492klzzwxh:25493klzzwxh:25494klzzwxh:25495 break;klzzwxh:25566klzzwxh:25496klzzwxh:25497klzzwxh:25498 case GID:klzzwxh:25567klzzwxh:25499klzzwxh:25500klzzwxh:25501klzzwxh:25502klzzwxh:25503klzzwxh:25504klzzwxh:25505 klzzwxh:25442klzzwxh:25443klzzwxh:25444klzzwxh:25445davklzzwxh:25446node klzzwxh:25447klzzwxh:25448klzzwxh:25449 userdataklzzwxh:25450klzzwxh:25451-klzzwxh:25506gid = n;klzzwxh:25568klzzwxh:25507klzzwxh:25508klzzwxh:25509klzzwxh:25510klzzwxh:25511klzzwxh:25512klzzwxh:25513 break;klzzwxh:25569klzzwxh:25514klzzwxh:25515klzzwxh:25516 case DIRTY:klzzwxh:25570klzzwxh:25517klzzwxh:25518klzzwxh:25519klzzwxh:25520klzzwxh:25521klzzwxh:25522klzzwxh:25523 klzzwxh:25452klzzwxh:25453klzzwxh:25454klzzwxh:25455davklzzwxh:25456node klzzwxh:25457klzzwxh:25458klzzwxh:25459 userdataklzzwxh:25460klzzwxh:25461-klzzwxh:25524dirty = n;klzzwxh:25571klzzwxh:25525klzzwxh:25526klzzwxh:25527klzzwxh:25528klzzwxh:25529klzzwxh:25530klzzwxh:25531 break;klzzwxh:25572klzzwxh:25532klzzwxh:25533klzzwxh:25534 case REMOTEklzzwxh:25462EXISTS:klzzwxh:25573klzzwxh:25535klzzwxh:25536klzzwxh:25537klzzwxh:25538klzzwxh:25539klzzwxh:25540klzzwxh:25541 klzzwxh:25463klzzwxh:25464klzzwxh:25465klzzwxh:25466davklzzwxh:25467node klzzwxh:25468klzzwxh:25469klzzwxh:25470 userdataklzzwxh:25471klzzwxh:25472-klzzwxh:25542remoteklzzwxh:25473exists = n;klzzwxh:25574klzzwxh:25543klzzwxh:25544klzzwxh:25545klzzwxh:25546klzzwxh:25547klzzwxh:25548klzzwxh:25549 break;klzzwxh:25575klzzwxh:25550klzzwxh:25551klzzwxh:25552 default:klzzwxh:25576klzzwxh:25553klzzwxh:25554klzzwxh:25555klzzwxh:25556klzzwxh:25557klzzwxh:25558klzzwxh:25559 return -1;klzzwxh:25577klzzwxh:25560klzzwxh:25561klzzwxh:25562 klzzwxh:25474

      klzzwxh:25579klzzwxh:25580klzzwxh:25581 return 0;klzzwxh:25582klzzwxh:25578

      /klzzwxh:25583 Finishes the creation of a directory. Members name and path of theklzzwxh:25621klzzwxh:25593klzzwxh:25594 not must not be NULL, or the direcotry tree will be deleted.klzzwxh:25622klzzwxh:25595klzzwxh:25596 userdata is set to the parent of the directory.klzzwxh:25623klzzwxh:25597klzzwxh:25598 return value : allways 0. klzzwxh:25584/klzzwxh:25624static int xmlklzzwxh:25585endklzzwxh:25586dirklzzwxh:25587void klzzwxh:25588userdata, int state, const char klzzwxh:25589nspace,klzzwxh:25625klzzwxh:25599klzzwxh:25600klzzwxh:25601klzzwxh:25602klzzwxh:25603klzzwxh:25604klzzwxh:25605klzzwxh:25606klzzwxh:25607klzzwxh:25608klzzwxh:25609klzzwxh:25610klzzwxh:25611klzzwxh:25612klzzwxh:25613klzzwxh:25614klzzwxh:25615klzzwxh:25616klzzwxh:25617klzzwxh:25618klzzwxh:25619klzzwxh:25620 const char klzzwxh:25590nameklzzwxh:25591 klzzwxh:25592

      klzzwxh:25644klzzwxh:25645klzzwxh:25646 davklzzwxh:25626node klzzwxh:25627dir = klzzwxh:25628klzzwxh:25629klzzwxh:25630davklzzwxh:25631node klzzwxh:25632klzzwxh:25633klzzwxh:25634 userdataklzzwxh:25635;klzzwxh:25651klzzwxh:25647klzzwxh:25648klzzwxh:25649 klzzwxh:25636klzzwxh:25637klzzwxh:25638davklzzwxh:25639node klzzwxh:25640klzzwxh:25641klzzwxh:25642 userdataklzzwxh:25643 = dir-klzzwxh:25650parent;

      klzzwxh:25659klzzwxh:25660klzzwxh:25661 if klzzwxh:25652dir-klzzwxh:25662name == NULL || dir-klzzwxh:25663path == NULLklzzwxh:25653 klzzwxh:25654klzzwxh:25681klzzwxh:25664klzzwxh:25665klzzwxh:25666klzzwxh:25667klzzwxh:25668klzzwxh:25669klzzwxh:25670 deleteklzzwxh:25655treeklzzwxh:25656dirklzzwxh:25657;klzzwxh:25682klzzwxh:25671klzzwxh:25672klzzwxh:25673klzzwxh:25674klzzwxh:25675klzzwxh:25676klzzwxh:25677 return 0;klzzwxh:25683klzzwxh:25678klzzwxh:25679klzzwxh:25680 klzzwxh:25658

      klzzwxh:25695klzzwxh:25696klzzwxh:25697 deleteklzzwxh:25684cacheklzzwxh:25685fileklzzwxh:25686dirklzzwxh:25687;klzzwxh:25729klzzwxh:25698klzzwxh:25699klzzwxh:25700 if klzzwxh:25688dir-klzzwxh:25701etag klzzwxh:25689= NULLklzzwxh:25690 klzzwxh:25691klzzwxh:25730klzzwxh:25702klzzwxh:25703klzzwxh:25704klzzwxh:25705klzzwxh:25706klzzwxh:25707klzzwxh:25708 freeklzzwxh:25692dir-klzzwxh:25709etagklzzwxh:25693;klzzwxh:25731klzzwxh:25710klzzwxh:25711klzzwxh:25712klzzwxh:25713klzzwxh:25714klzzwxh:25715klzzwxh:25716 dir-klzzwxh:25717etag = NULL;klzzwxh:25732klzzwxh:25718klzzwxh:25719klzzwxh:25720 klzzwxh:25694klzzwxh:25733klzzwxh:25721klzzwxh:25722klzzwxh:25723 dir-klzzwxh:25724size = 0;klzzwxh:25734klzzwxh:25725klzzwxh:25726klzzwxh:25727 dir-klzzwxh:25728smtime = 0;

      klzzwxh:25736klzzwxh:25737klzzwxh:25738 return 0;klzzwxh:25739klzzwxh:25735

      /klzzwxh:25740 xmlklzzwxh:25741data must be a string representation of an octal number. Its value isklzzwxh:25778klzzwxh:25751klzzwxh:25752 assigned to member mode of node userdata.klzzwxh:25779klzzwxh:25753klzzwxh:25754 return value : 0 on success, -1 if an error occurs. klzzwxh:25742/klzzwxh:25780static int xmlklzzwxh:25743endklzzwxh:25744modeklzzwxh:25745void klzzwxh:25746userdata, int state, const char klzzwxh:25747nspace,klzzwxh:25781klzzwxh:25755klzzwxh:25756klzzwxh:25757klzzwxh:25758klzzwxh:25759klzzwxh:25760klzzwxh:25761klzzwxh:25762klzzwxh:25763klzzwxh:25764klzzwxh:25765klzzwxh:25766klzzwxh:25767klzzwxh:25768klzzwxh:25769klzzwxh:25770klzzwxh:25771klzzwxh:25772klzzwxh:25773klzzwxh:25774klzzwxh:25775klzzwxh:25776klzzwxh:25777 const char klzzwxh:25748nameklzzwxh:25749 klzzwxh:25750

      klzzwxh:25786klzzwxh:25787klzzwxh:25788 if klzzwxh:25782klzzwxh:25783xmlklzzwxh:25784dataklzzwxh:25785klzzwxh:25796klzzwxh:25789klzzwxh:25790klzzwxh:25791klzzwxh:25792klzzwxh:25793klzzwxh:25794klzzwxh:25795 return -1;

      klzzwxh:25826klzzwxh:25827klzzwxh:25828 char klzzwxh:25797tail;klzzwxh:25867klzzwxh:25829klzzwxh:25830klzzwxh:25831 klzzwxh:25798klzzwxh:25799klzzwxh:25800klzzwxh:25801davklzzwxh:25802node klzzwxh:25803klzzwxh:25804klzzwxh:25805 userdataklzzwxh:25806klzzwxh:25807-klzzwxh:25832mode = strtolklzzwxh:25808xmlklzzwxh:25809data, klzzwxh:25833tail, 8klzzwxh:25810;klzzwxh:25868klzzwxh:25834klzzwxh:25835klzzwxh:25836 if klzzwxh:25811klzzwxh:25812tail klzzwxh:25813= 'klzzwxh:25814'klzzwxh:25815 klzzwxh:25816klzzwxh:25869klzzwxh:25837klzzwxh:25838klzzwxh:25839klzzwxh:25840klzzwxh:25841klzzwxh:25842klzzwxh:25843 freeklzzwxh:25817xmlklzzwxh:25818dataklzzwxh:25819;klzzwxh:25870klzzwxh:25844klzzwxh:25845klzzwxh:25846klzzwxh:25847klzzwxh:25848klzzwxh:25849klzzwxh:25850 xmlklzzwxh:25820data = NULL;klzzwxh:25871klzzwxh:25851klzzwxh:25852klzzwxh:25853klzzwxh:25854klzzwxh:25855klzzwxh:25856klzzwxh:25857 return -1;klzzwxh:25872klzzwxh:25858klzzwxh:25859klzzwxh:25860 klzzwxh:25821klzzwxh:25873klzzwxh:25861klzzwxh:25862klzzwxh:25863 freeklzzwxh:25822xmlklzzwxh:25823dataklzzwxh:25824;klzzwxh:25874klzzwxh:25864klzzwxh:25865klzzwxh:25866 xmlklzzwxh:25825data = NULL;

      klzzwxh:25876klzzwxh:25877klzzwxh:25878 return 0;klzzwxh:25879klzzwxh:25875

      /klzzwxh:25880 Finishes the creation of a node of a regular file. Members path, nameklzzwxh:25923klzzwxh:25891klzzwxh:25892 and cachklzzwxh:25881path must not be NULL and the cache file must exist, or the nodeklzzwxh:25924klzzwxh:25893klzzwxh:25894 will be deleted.klzzwxh:25925klzzwxh:25895klzzwxh:25896 If the file is in directory backup, member path may be NULL.klzzwxh:25926klzzwxh:25897klzzwxh:25898 userdata is set to the parent of the file node.klzzwxh:25927klzzwxh:25899klzzwxh:25900 return value : allways 0. klzzwxh:25882/klzzwxh:25928static int xmlklzzwxh:25883endklzzwxh:25884regklzzwxh:25885void klzzwxh:25886userdata, int state, const char klzzwxh:25887nspace,klzzwxh:25929klzzwxh:25901klzzwxh:25902klzzwxh:25903klzzwxh:25904klzzwxh:25905klzzwxh:25906klzzwxh:25907klzzwxh:25908klzzwxh:25909klzzwxh:25910klzzwxh:25911klzzwxh:25912klzzwxh:25913klzzwxh:25914klzzwxh:25915klzzwxh:25916klzzwxh:25917klzzwxh:25918klzzwxh:25919klzzwxh:25920klzzwxh:25921klzzwxh:25922 const char klzzwxh:25888nameklzzwxh:25889 klzzwxh:25890

      klzzwxh:25948klzzwxh:25949klzzwxh:25950 davklzzwxh:25930node klzzwxh:25931reg = klzzwxh:25932klzzwxh:25933klzzwxh:25934davklzzwxh:25935node klzzwxh:25936klzzwxh:25937klzzwxh:25938 userdataklzzwxh:25939;klzzwxh:25955klzzwxh:25951klzzwxh:25952klzzwxh:25953 klzzwxh:25940klzzwxh:25941klzzwxh:25942davklzzwxh:25943node klzzwxh:25944klzzwxh:25945klzzwxh:25946 userdataklzzwxh:25947 = reg-klzzwxh:25954parent;

      klzzwxh:25989klzzwxh:25990klzzwxh:25991 struct stat st;klzzwxh:26104klzzwxh:25992klzzwxh:25993klzzwxh:25994 if klzzwxh:25956reg-klzzwxh:25995name == NULL || reg-klzzwxh:25996cacheklzzwxh:25957path == NULLklzzwxh:26105klzzwxh:25997klzzwxh:25998klzzwxh:25999klzzwxh:26000klzzwxh:26001klzzwxh:26002klzzwxh:26003klzzwxh:26004klzzwxh:26005klzzwxh:26006klzzwxh:26007 || statklzzwxh:25958reg-klzzwxh:26008cacheklzzwxh:25959path, klzzwxh:26009stklzzwxh:25960 klzzwxh:25961= 0klzzwxh:26106klzzwxh:26010klzzwxh:26011klzzwxh:26012klzzwxh:26013klzzwxh:26014klzzwxh:26015klzzwxh:26016klzzwxh:26017klzzwxh:26018klzzwxh:26019klzzwxh:26020 || reg-klzzwxh:26021size klzzwxh:25962= st.stklzzwxh:25963sizeklzzwxh:26107klzzwxh:26022klzzwxh:26023klzzwxh:26024klzzwxh:26025klzzwxh:26026klzzwxh:26027klzzwxh:26028klzzwxh:26029klzzwxh:26030klzzwxh:26031klzzwxh:26032 || klzzwxh:25964reg-klzzwxh:26033path == NULL klzzwxh:26034klzzwxh:26035 klzzwxh:25965isklzzwxh:25966backupklzzwxh:25967regklzzwxh:25968klzzwxh:25969klzzwxh:25970 klzzwxh:25971klzzwxh:26108klzzwxh:26036klzzwxh:26037klzzwxh:26038klzzwxh:26039klzzwxh:26040klzzwxh:26041klzzwxh:26042 if klzzwxh:25972reg-klzzwxh:26043cacheklzzwxh:25973path klzzwxh:25974= NULLklzzwxh:25975 klzzwxh:25976klzzwxh:26109klzzwxh:26044klzzwxh:26045klzzwxh:26046klzzwxh:26047klzzwxh:26048klzzwxh:26049klzzwxh:26050klzzwxh:26051klzzwxh:26052klzzwxh:26053klzzwxh:26054 removeklzzwxh:25977reg-klzzwxh:26055cacheklzzwxh:25978pathklzzwxh:25979;klzzwxh:26110klzzwxh:26056klzzwxh:26057klzzwxh:26058klzzwxh:26059klzzwxh:26060klzzwxh:26061klzzwxh:26062klzzwxh:26063klzzwxh:26064klzzwxh:26065klzzwxh:26066 freeklzzwxh:25980reg-klzzwxh:26067cacheklzzwxh:25981pathklzzwxh:25982;klzzwxh:26111klzzwxh:26068klzzwxh:26069klzzwxh:26070klzzwxh:26071klzzwxh:26072klzzwxh:26073klzzwxh:26074klzzwxh:26075klzzwxh:26076klzzwxh:26077klzzwxh:26078 reg-klzzwxh:26079cacheklzzwxh:25983path = NULL;klzzwxh:26112klzzwxh:26080klzzwxh:26081klzzwxh:26082klzzwxh:26083klzzwxh:26084klzzwxh:26085klzzwxh:26086 klzzwxh:25984klzzwxh:26113klzzwxh:26087klzzwxh:26088klzzwxh:26089klzzwxh:26090klzzwxh:26091klzzwxh:26092klzzwxh:26093 deleteklzzwxh:25985treeklzzwxh:25986regklzzwxh:25987;klzzwxh:26114klzzwxh:26094klzzwxh:26095klzzwxh:26096klzzwxh:26097klzzwxh:26098klzzwxh:26099klzzwxh:26100 return 0;klzzwxh:26115klzzwxh:26101klzzwxh:26102klzzwxh:26103 klzzwxh:25988

      klzzwxh:26117klzzwxh:26118klzzwxh:26119 cacheklzzwxh:26116size += reg-klzzwxh:26120size;

      klzzwxh:26160klzzwxh:26161klzzwxh:26162 if klzzwxh:26121isklzzwxh:26122backupklzzwxh:26123regklzzwxh:26124klzzwxh:26125 klzzwxh:26126klzzwxh:26269klzzwxh:26163klzzwxh:26164klzzwxh:26165klzzwxh:26166klzzwxh:26167klzzwxh:26168klzzwxh:26169 if klzzwxh:26127reg-klzzwxh:26170path klzzwxh:26128= NULLklzzwxh:26129 klzzwxh:26130klzzwxh:26270klzzwxh:26171klzzwxh:26172klzzwxh:26173klzzwxh:26174klzzwxh:26175klzzwxh:26176klzzwxh:26177klzzwxh:26178klzzwxh:26179klzzwxh:26180klzzwxh:26181 freeklzzwxh:26131reg-klzzwxh:26182pathklzzwxh:26132;klzzwxh:26271klzzwxh:26183klzzwxh:26184klzzwxh:26185klzzwxh:26186klzzwxh:26187klzzwxh:26188klzzwxh:26189klzzwxh:26190klzzwxh:26191klzzwxh:26192klzzwxh:26193 reg-klzzwxh:26194path = NULL;klzzwxh:26272klzzwxh:26195klzzwxh:26196klzzwxh:26197klzzwxh:26198klzzwxh:26199klzzwxh:26200klzzwxh:26201 klzzwxh:26133klzzwxh:26273klzzwxh:26202klzzwxh:26203klzzwxh:26204klzzwxh:26205klzzwxh:26206klzzwxh:26207klzzwxh:26208 if klzzwxh:26134reg-klzzwxh:26209etag klzzwxh:26135= NULLklzzwxh:26136 klzzwxh:26137klzzwxh:26274klzzwxh:26210klzzwxh:26211klzzwxh:26212klzzwxh:26213klzzwxh:26214klzzwxh:26215klzzwxh:26216klzzwxh:26217klzzwxh:26218klzzwxh:26219klzzwxh:26220 freeklzzwxh:26138reg-klzzwxh:26221etagklzzwxh:26139;klzzwxh:26275klzzwxh:26222klzzwxh:26223klzzwxh:26224klzzwxh:26225klzzwxh:26226klzzwxh:26227klzzwxh:26228klzzwxh:26229klzzwxh:26230klzzwxh:26231klzzwxh:26232 reg-klzzwxh:26233etag = NULL;klzzwxh:26276klzzwxh:26234klzzwxh:26235klzzwxh:26236klzzwxh:26237klzzwxh:26238klzzwxh:26239klzzwxh:26240 klzzwxh:26140klzzwxh:26277klzzwxh:26241klzzwxh:26242klzzwxh:26243klzzwxh:26244klzzwxh:26245klzzwxh:26246klzzwxh:26247 reg-klzzwxh:26248smtime = 0;klzzwxh:26278klzzwxh:26249klzzwxh:26250klzzwxh:26251 klzzwxh:26141 else if klzzwxh:26142isklzzwxh:26143dirtyklzzwxh:26144regklzzwxh:26145 || isklzzwxh:26146createdklzzwxh:26147regklzzwxh:26148klzzwxh:26149 klzzwxh:26150klzzwxh:26279klzzwxh:26252klzzwxh:26253klzzwxh:26254klzzwxh:26255klzzwxh:26256klzzwxh:26257klzzwxh:26258 addklzzwxh:26151toklzzwxh:26152changedklzzwxh:26153regklzzwxh:26154;klzzwxh:26280klzzwxh:26259klzzwxh:26260klzzwxh:26261klzzwxh:26262klzzwxh:26263klzzwxh:26264klzzwxh:26265 setklzzwxh:26155uploadklzzwxh:26156timeklzzwxh:26157regklzzwxh:26158;klzzwxh:26281klzzwxh:26266klzzwxh:26267klzzwxh:26268 klzzwxh:26159

      klzzwxh:26283klzzwxh:26284klzzwxh:26285 return 0;klzzwxh:26286klzzwxh:26282

      /klzzwxh:26287 Finishes the creation of the root directory. userdata must be equal to root,klzzwxh:26327klzzwxh:26299klzzwxh:26300 or the complete tree will be deleted.klzzwxh:26328klzzwxh:26301klzzwxh:26302 Members path, name, cacheklzzwxh:26288path,etag and mimeklzzwxh:26289type will be NULL.klzzwxh:26329klzzwxh:26303klzzwxh:26304 return value : allways 0. klzzwxh:26290/klzzwxh:26330static int xmlklzzwxh:26291endklzzwxh:26292rootklzzwxh:26293void klzzwxh:26294userdata, int state, const char klzzwxh:26295nspace,klzzwxh:26331klzzwxh:26305klzzwxh:26306klzzwxh:26307klzzwxh:26308klzzwxh:26309klzzwxh:26310klzzwxh:26311klzzwxh:26312klzzwxh:26313klzzwxh:26314klzzwxh:26315klzzwxh:26316klzzwxh:26317klzzwxh:26318klzzwxh:26319klzzwxh:26320klzzwxh:26321klzzwxh:26322klzzwxh:26323klzzwxh:26324klzzwxh:26325klzzwxh:26326 const char klzzwxh:26296nameklzzwxh:26297 klzzwxh:26298

      klzzwxh:26342klzzwxh:26343klzzwxh:26344 davklzzwxh:26332node klzzwxh:26333dir = klzzwxh:26334klzzwxh:26335klzzwxh:26336davklzzwxh:26337node klzzwxh:26338klzzwxh:26339klzzwxh:26340 userdataklzzwxh:26341;

      klzzwxh:26351klzzwxh:26352klzzwxh:26353 if klzzwxh:26345dir klzzwxh:26346= rootklzzwxh:26347klzzwxh:26361klzzwxh:26354klzzwxh:26355klzzwxh:26356klzzwxh:26357klzzwxh:26358klzzwxh:26359klzzwxh:26360 deleteklzzwxh:26348treeklzzwxh:26349dirklzzwxh:26350;

      klzzwxh:26397klzzwxh:26398klzzwxh:26399 if klzzwxh:26362dir-klzzwxh:26400path klzzwxh:26363= NULLklzzwxh:26364 klzzwxh:26365klzzwxh:26500klzzwxh:26401klzzwxh:26402klzzwxh:26403klzzwxh:26404klzzwxh:26405klzzwxh:26406klzzwxh:26407 freeklzzwxh:26366dir-klzzwxh:26408pathklzzwxh:26367;klzzwxh:26501klzzwxh:26409klzzwxh:26410klzzwxh:26411klzzwxh:26412klzzwxh:26413klzzwxh:26414klzzwxh:26415 dir-klzzwxh:26416path = NULL;klzzwxh:26502klzzwxh:26417klzzwxh:26418klzzwxh:26419 klzzwxh:26368klzzwxh:26503klzzwxh:26420klzzwxh:26421klzzwxh:26422 if klzzwxh:26369dir-klzzwxh:26423name klzzwxh:26370= NULLklzzwxh:26371 klzzwxh:26372klzzwxh:26504klzzwxh:26424klzzwxh:26425klzzwxh:26426klzzwxh:26427klzzwxh:26428klzzwxh:26429klzzwxh:26430 freeklzzwxh:26373dir-klzzwxh:26431nameklzzwxh:26374;klzzwxh:26505klzzwxh:26432klzzwxh:26433klzzwxh:26434klzzwxh:26435klzzwxh:26436klzzwxh:26437klzzwxh:26438 dir-klzzwxh:26439name = NULL;klzzwxh:26506klzzwxh:26440klzzwxh:26441klzzwxh:26442 klzzwxh:26375klzzwxh:26507klzzwxh:26443klzzwxh:26444klzzwxh:26445 deleteklzzwxh:26376cacheklzzwxh:26377fileklzzwxh:26378dirklzzwxh:26379;klzzwxh:26508klzzwxh:26446klzzwxh:26447klzzwxh:26448 if klzzwxh:26380dir-klzzwxh:26449etag klzzwxh:26381= NULLklzzwxh:26382 klzzwxh:26383klzzwxh:26509klzzwxh:26450klzzwxh:26451klzzwxh:26452klzzwxh:26453klzzwxh:26454klzzwxh:26455klzzwxh:26456 freeklzzwxh:26384dir-klzzwxh:26457etagklzzwxh:26385;klzzwxh:26510klzzwxh:26458klzzwxh:26459klzzwxh:26460klzzwxh:26461klzzwxh:26462klzzwxh:26463klzzwxh:26464 dir-klzzwxh:26465etag = NULL;klzzwxh:26511klzzwxh:26466klzzwxh:26467klzzwxh:26468 klzzwxh:26386klzzwxh:26512klzzwxh:26469klzzwxh:26470klzzwxh:26471 if klzzwxh:26387dir-klzzwxh:26472mimeklzzwxh:26388type klzzwxh:26389= NULLklzzwxh:26390 klzzwxh:26391klzzwxh:26513klzzwxh:26473klzzwxh:26474klzzwxh:26475klzzwxh:26476klzzwxh:26477klzzwxh:26478klzzwxh:26479 freeklzzwxh:26392dir-klzzwxh:26480mimeklzzwxh:26393typeklzzwxh:26394;klzzwxh:26514klzzwxh:26481klzzwxh:26482klzzwxh:26483klzzwxh:26484klzzwxh:26485klzzwxh:26486klzzwxh:26487 dir-klzzwxh:26488mimeklzzwxh:26395type = NULL;klzzwxh:26515klzzwxh:26489klzzwxh:26490klzzwxh:26491 klzzwxh:26396klzzwxh:26516klzzwxh:26492klzzwxh:26493klzzwxh:26494 dir-klzzwxh:26495size = 0;klzzwxh:26517klzzwxh:26496klzzwxh:26497klzzwxh:26498 dir-klzzwxh:26499smtime = 0;

      klzzwxh:26519klzzwxh:26520klzzwxh:26521 return 0;klzzwxh:26522klzzwxh:26518

      /klzzwxh:26523 xmlklzzwxh:26524data must be a string representation of a decimal number representingklzzwxh:26561klzzwxh:26534klzzwxh:26535 a file size. Its value is assigned to member size of the node.klzzwxh:26562klzzwxh:26536klzzwxh:26537 return value : 0 on success, -1 if an error occurs. klzzwxh:26525/klzzwxh:26563static int xmlklzzwxh:26526endklzzwxh:26527sizeklzzwxh:26528void klzzwxh:26529userdata, int state, const char klzzwxh:26530nspace,klzzwxh:26564klzzwxh:26538klzzwxh:26539klzzwxh:26540klzzwxh:26541klzzwxh:26542klzzwxh:26543klzzwxh:26544klzzwxh:26545klzzwxh:26546klzzwxh:26547klzzwxh:26548klzzwxh:26549klzzwxh:26550klzzwxh:26551klzzwxh:26552klzzwxh:26553klzzwxh:26554klzzwxh:26555klzzwxh:26556klzzwxh:26557klzzwxh:26558klzzwxh:26559klzzwxh:26560 const char klzzwxh:26531nameklzzwxh:26532 klzzwxh:26533

      klzzwxh:26569klzzwxh:26570klzzwxh:26571 if klzzwxh:26565klzzwxh:26566xmlklzzwxh:26567dataklzzwxh:26568klzzwxh:26579klzzwxh:26572klzzwxh:26573klzzwxh:26574klzzwxh:26575klzzwxh:26576klzzwxh:26577klzzwxh:26578 return -1;

      klzzwxh:26581klzzwxh:26582klzzwxh:26583 char klzzwxh:26580tail;

      klzzwxh:26584if klzzwxh:26585FILEklzzwxh:26586OFFSETklzzwxh:26587BITS == 64klzzwxh:26626klzzwxh:26616klzzwxh:26617klzzwxh:26618 klzzwxh:26588klzzwxh:26589klzzwxh:26590klzzwxh:26591davklzzwxh:26592node klzzwxh:26593klzzwxh:26594klzzwxh:26595 userdataklzzwxh:26596klzzwxh:26597-klzzwxh:26619size = strtollklzzwxh:26598xmlklzzwxh:26599data, klzzwxh:26620tail, 10klzzwxh:26600;klzzwxh:26627klzzwxh:26601elseklzzwxh:26628klzzwxh:26621klzzwxh:26622klzzwxh:26623 klzzwxh:26602klzzwxh:26603klzzwxh:26604klzzwxh:26605davklzzwxh:26606node klzzwxh:26607klzzwxh:26608klzzwxh:26609 userdataklzzwxh:26610klzzwxh:26611-klzzwxh:26624size = strtolklzzwxh:26612xmlklzzwxh:26613data, klzzwxh:26625tail, 10klzzwxh:26614;klzzwxh:26629klzzwxh:26615endif

      klzzwxh:26645klzzwxh:26646klzzwxh:26647 if klzzwxh:26630klzzwxh:26631tail klzzwxh:26632= 'klzzwxh:26633'klzzwxh:26634 klzzwxh:26635klzzwxh:26678klzzwxh:26648klzzwxh:26649klzzwxh:26650klzzwxh:26651klzzwxh:26652klzzwxh:26653klzzwxh:26654 freeklzzwxh:26636xmlklzzwxh:26637dataklzzwxh:26638;klzzwxh:26679klzzwxh:26655klzzwxh:26656klzzwxh:26657klzzwxh:26658klzzwxh:26659klzzwxh:26660klzzwxh:26661 xmlklzzwxh:26639data = NULL;klzzwxh:26680klzzwxh:26662klzzwxh:26663klzzwxh:26664klzzwxh:26665klzzwxh:26666klzzwxh:26667klzzwxh:26668 return -1;klzzwxh:26681klzzwxh:26669klzzwxh:26670klzzwxh:26671 klzzwxh:26640klzzwxh:26682klzzwxh:26672klzzwxh:26673klzzwxh:26674 freeklzzwxh:26641xmlklzzwxh:26642dataklzzwxh:26643;klzzwxh:26683klzzwxh:26675klzzwxh:26676klzzwxh:26677 xmlklzzwxh:26644data = NULL;

      klzzwxh:26685klzzwxh:26686klzzwxh:26687 return 0;klzzwxh:26688klzzwxh:26684

      /klzzwxh:26689 Stores xmlklzzwxh:26690data in the appropriate member of node userdata.klzzwxh:26729klzzwxh:26700klzzwxh:26701 state indicates the member of node.klzzwxh:26730klzzwxh:26702klzzwxh:26703 return value : 0 on success, -1 if an error occurs. klzzwxh:26691/klzzwxh:26731static int xmlklzzwxh:26692endklzzwxh:26693stringklzzwxh:26694void klzzwxh:26695userdata, int state, const char klzzwxh:26696nspace,klzzwxh:26732klzzwxh:26704klzzwxh:26705klzzwxh:26706klzzwxh:26707klzzwxh:26708klzzwxh:26709klzzwxh:26710klzzwxh:26711klzzwxh:26712klzzwxh:26713klzzwxh:26714klzzwxh:26715klzzwxh:26716klzzwxh:26717klzzwxh:26718klzzwxh:26719klzzwxh:26720klzzwxh:26721klzzwxh:26722klzzwxh:26723klzzwxh:26724klzzwxh:26725klzzwxh:26726klzzwxh:26727klzzwxh:26728 const char klzzwxh:26697nameklzzwxh:26698 klzzwxh:26699

      klzzwxh:26737klzzwxh:26738klzzwxh:26739 if klzzwxh:26733klzzwxh:26734xmlklzzwxh:26735dataklzzwxh:26736klzzwxh:26747klzzwxh:26740klzzwxh:26741klzzwxh:26742klzzwxh:26743klzzwxh:26744klzzwxh:26745klzzwxh:26746 return -1;

      klzzwxh:26832klzzwxh:26833klzzwxh:26834 switch klzzwxh:26748stateklzzwxh:26749 klzzwxh:26750klzzwxh:26966klzzwxh:26835klzzwxh:26836klzzwxh:26837 case PATH:klzzwxh:26967klzzwxh:26838klzzwxh:26839klzzwxh:26840klzzwxh:26841klzzwxh:26842klzzwxh:26843klzzwxh:26844 klzzwxh:26751klzzwxh:26752klzzwxh:26753klzzwxh:26754davklzzwxh:26755node klzzwxh:26756klzzwxh:26757klzzwxh:26758 userdataklzzwxh:26759klzzwxh:26760-klzzwxh:26845path = xmlklzzwxh:26761data;klzzwxh:26968klzzwxh:26846klzzwxh:26847klzzwxh:26848klzzwxh:26849klzzwxh:26850klzzwxh:26851klzzwxh:26852 break;klzzwxh:26969klzzwxh:26853klzzwxh:26854klzzwxh:26855 case NAME:klzzwxh:26970klzzwxh:26856klzzwxh:26857klzzwxh:26858klzzwxh:26859klzzwxh:26860klzzwxh:26861klzzwxh:26862 klzzwxh:26762klzzwxh:26763klzzwxh:26764klzzwxh:26765davklzzwxh:26766node klzzwxh:26767klzzwxh:26768klzzwxh:26769 userdataklzzwxh:26770klzzwxh:26771-klzzwxh:26863name = davklzzwxh:26772convklzzwxh:26773fromklzzwxh:26774utfklzzwxh:267758klzzwxh:26776xmlklzzwxh:26777dataklzzwxh:26778;klzzwxh:26971klzzwxh:26864klzzwxh:26865klzzwxh:26866klzzwxh:26867klzzwxh:26868klzzwxh:26869klzzwxh:26870 freeklzzwxh:26779xmlklzzwxh:26780dataklzzwxh:26781;klzzwxh:26972klzzwxh:26871klzzwxh:26872klzzwxh:26873klzzwxh:26874klzzwxh:26875klzzwxh:26876klzzwxh:26877 break;klzzwxh:26973klzzwxh:26878klzzwxh:26879klzzwxh:26880 case CACHEklzzwxh:26782PATH:klzzwxh:26974klzzwxh:26881klzzwxh:26882klzzwxh:26883klzzwxh:26884klzzwxh:26885klzzwxh:26886klzzwxh:26887 klzzwxh:26783klzzwxh:26784klzzwxh:26785klzzwxh:26786davklzzwxh:26787node klzzwxh:26788klzzwxh:26789klzzwxh:26790 userdataklzzwxh:26791klzzwxh:26792-klzzwxh:26888cacheklzzwxh:26793path = davklzzwxh:26794convklzzwxh:26795fromklzzwxh:26796utfklzzwxh:267978klzzwxh:26798xmlklzzwxh:26799dataklzzwxh:26800;klzzwxh:26975klzzwxh:26889klzzwxh:26890klzzwxh:26891klzzwxh:26892klzzwxh:26893klzzwxh:26894klzzwxh:26895 freeklzzwxh:26801xmlklzzwxh:26802dataklzzwxh:26803;klzzwxh:26976klzzwxh:26896klzzwxh:26897klzzwxh:26898klzzwxh:26899klzzwxh:26900klzzwxh:26901klzzwxh:26902 break;klzzwxh:26977klzzwxh:26903klzzwxh:26904klzzwxh:26905 case ETAG:klzzwxh:26978klzzwxh:26906klzzwxh:26907klzzwxh:26908klzzwxh:26909klzzwxh:26910klzzwxh:26911klzzwxh:26912 klzzwxh:26804klzzwxh:26805klzzwxh:26806klzzwxh:26807davklzzwxh:26808node klzzwxh:26809klzzwxh:26810klzzwxh:26811 userdataklzzwxh:26812klzzwxh:26813-klzzwxh:26913etag = xmlklzzwxh:26814data;klzzwxh:26979klzzwxh:26914klzzwxh:26915klzzwxh:26916klzzwxh:26917klzzwxh:26918klzzwxh:26919klzzwxh:26920 break;klzzwxh:26980klzzwxh:26921klzzwxh:26922klzzwxh:26923 case MIME:klzzwxh:26981klzzwxh:26924klzzwxh:26925klzzwxh:26926klzzwxh:26927klzzwxh:26928klzzwxh:26929klzzwxh:26930 klzzwxh:26815klzzwxh:26816klzzwxh:26817klzzwxh:26818davklzzwxh:26819node klzzwxh:26820klzzwxh:26821klzzwxh:26822 userdataklzzwxh:26823klzzwxh:26824-klzzwxh:26931mimeklzzwxh:26825type = xmlklzzwxh:26826data;klzzwxh:26982klzzwxh:26932klzzwxh:26933klzzwxh:26934klzzwxh:26935klzzwxh:26936klzzwxh:26937klzzwxh:26938 break;klzzwxh:26983klzzwxh:26939klzzwxh:26940klzzwxh:26941 default:klzzwxh:26984klzzwxh:26942klzzwxh:26943klzzwxh:26944klzzwxh:26945klzzwxh:26946klzzwxh:26947klzzwxh:26948 freeklzzwxh:26827xmlklzzwxh:26828dataklzzwxh:26829;klzzwxh:26985klzzwxh:26949klzzwxh:26950klzzwxh:26951klzzwxh:26952klzzwxh:26953klzzwxh:26954klzzwxh:26955 xmlklzzwxh:26830data = NULL;klzzwxh:26986klzzwxh:26956klzzwxh:26957klzzwxh:26958klzzwxh:26959klzzwxh:26960klzzwxh:26961klzzwxh:26962 return -1;klzzwxh:26987klzzwxh:26963klzzwxh:26964klzzwxh:26965 klzzwxh:26831

      klzzwxh:26990klzzwxh:26991klzzwxh:26992 xmlklzzwxh:26988data = NULL;klzzwxh:26996klzzwxh:26993klzzwxh:26994klzzwxh:26995 return 0;klzzwxh:26997klzzwxh:26989

      /klzzwxh:26998 Stores xmlklzzwxh:26999data in the appropriate member of node userdata.klzzwxh:27043klzzwxh:27010klzzwxh:27011 state indicates the member of node.klzzwxh:27044klzzwxh:27012klzzwxh:27013 return value : 0 on success, -1 if an error occurs. klzzwxh:27000/klzzwxh:27045static int xmlklzzwxh:27001endklzzwxh:27002stringklzzwxh:27003oldklzzwxh:27004void klzzwxh:27005userdata, int state, const char klzzwxh:27006nspace,klzzwxh:27046klzzwxh:27014klzzwxh:27015klzzwxh:27016klzzwxh:27017klzzwxh:27018klzzwxh:27019klzzwxh:27020klzzwxh:27021klzzwxh:27022klzzwxh:27023klzzwxh:27024klzzwxh:27025klzzwxh:27026klzzwxh:27027klzzwxh:27028klzzwxh:27029klzzwxh:27030klzzwxh:27031klzzwxh:27032klzzwxh:27033klzzwxh:27034klzzwxh:27035klzzwxh:27036klzzwxh:27037klzzwxh:27038klzzwxh:27039klzzwxh:27040klzzwxh:27041klzzwxh:27042 const char klzzwxh:27007nameklzzwxh:27008 klzzwxh:27009

      klzzwxh:27051klzzwxh:27052klzzwxh:27053 if klzzwxh:27047klzzwxh:27048xmlklzzwxh:27049dataklzzwxh:27050klzzwxh:27061klzzwxh:27054klzzwxh:27055klzzwxh:27056klzzwxh:27057klzzwxh:27058klzzwxh:27059klzzwxh:27060 return -1;

      klzzwxh:27128klzzwxh:27129klzzwxh:27130 switch klzzwxh:27062stateklzzwxh:27063 klzzwxh:27064klzzwxh:27248klzzwxh:27131klzzwxh:27132klzzwxh:27133 case PATH:klzzwxh:27249klzzwxh:27134klzzwxh:27135klzzwxh:27136klzzwxh:27137klzzwxh:27138klzzwxh:27139klzzwxh:27140 klzzwxh:27065klzzwxh:27066klzzwxh:27067klzzwxh:27068davklzzwxh:27069node klzzwxh:27070klzzwxh:27071klzzwxh:27072 userdataklzzwxh:27073klzzwxh:27074-klzzwxh:27141path = xmlklzzwxh:27075data;klzzwxh:27250klzzwxh:27142klzzwxh:27143klzzwxh:27144klzzwxh:27145klzzwxh:27146klzzwxh:27147klzzwxh:27148 break;klzzwxh:27251klzzwxh:27149klzzwxh:27150klzzwxh:27151 case NAME:klzzwxh:27252klzzwxh:27152klzzwxh:27153klzzwxh:27154klzzwxh:27155klzzwxh:27156klzzwxh:27157klzzwxh:27158 klzzwxh:27076klzzwxh:27077klzzwxh:27078klzzwxh:27079davklzzwxh:27080node klzzwxh:27081klzzwxh:27082klzzwxh:27083 userdataklzzwxh:27084klzzwxh:27085-klzzwxh:27159name = xmlklzzwxh:27086data;klzzwxh:27253klzzwxh:27160klzzwxh:27161klzzwxh:27162klzzwxh:27163klzzwxh:27164klzzwxh:27165klzzwxh:27166 break;klzzwxh:27254klzzwxh:27167klzzwxh:27168klzzwxh:27169 case CACHEklzzwxh:27087PATH:klzzwxh:27255klzzwxh:27170klzzwxh:27171klzzwxh:27172klzzwxh:27173klzzwxh:27174klzzwxh:27175klzzwxh:27176 klzzwxh:27088klzzwxh:27089klzzwxh:27090klzzwxh:27091davklzzwxh:27092node klzzwxh:27093klzzwxh:27094klzzwxh:27095 userdataklzzwxh:27096klzzwxh:27097-klzzwxh:27177cacheklzzwxh:27098path = xmlklzzwxh:27099data;klzzwxh:27256klzzwxh:27178klzzwxh:27179klzzwxh:27180klzzwxh:27181klzzwxh:27182klzzwxh:27183klzzwxh:27184 break;klzzwxh:27257klzzwxh:27185klzzwxh:27186klzzwxh:27187 case ETAG:klzzwxh:27258klzzwxh:27188klzzwxh:27189klzzwxh:27190klzzwxh:27191klzzwxh:27192klzzwxh:27193klzzwxh:27194 klzzwxh:27100klzzwxh:27101klzzwxh:27102klzzwxh:27103davklzzwxh:27104node klzzwxh:27105klzzwxh:27106klzzwxh:27107 userdataklzzwxh:27108klzzwxh:27109-klzzwxh:27195etag = xmlklzzwxh:27110data;klzzwxh:27259klzzwxh:27196klzzwxh:27197klzzwxh:27198klzzwxh:27199klzzwxh:27200klzzwxh:27201klzzwxh:27202 break;klzzwxh:27260klzzwxh:27203klzzwxh:27204klzzwxh:27205 case MIME:klzzwxh:27261klzzwxh:27206klzzwxh:27207klzzwxh:27208klzzwxh:27209klzzwxh:27210klzzwxh:27211klzzwxh:27212 klzzwxh:27111klzzwxh:27112klzzwxh:27113klzzwxh:27114davklzzwxh:27115node klzzwxh:27116klzzwxh:27117klzzwxh:27118 userdataklzzwxh:27119klzzwxh:27120-klzzwxh:27213mimeklzzwxh:27121type = xmlklzzwxh:27122data;klzzwxh:27262klzzwxh:27214klzzwxh:27215klzzwxh:27216klzzwxh:27217klzzwxh:27218klzzwxh:27219klzzwxh:27220 break;klzzwxh:27263klzzwxh:27221klzzwxh:27222klzzwxh:27223 default:klzzwxh:27264klzzwxh:27224klzzwxh:27225klzzwxh:27226klzzwxh:27227klzzwxh:27228klzzwxh:27229klzzwxh:27230 freeklzzwxh:27123xmlklzzwxh:27124dataklzzwxh:27125;klzzwxh:27265klzzwxh:27231klzzwxh:27232klzzwxh:27233klzzwxh:27234klzzwxh:27235klzzwxh:27236klzzwxh:27237 xmlklzzwxh:27126data = NULL;klzzwxh:27266klzzwxh:27238klzzwxh:27239klzzwxh:27240klzzwxh:27241klzzwxh:27242klzzwxh:27243klzzwxh:27244 return -1;klzzwxh:27267klzzwxh:27245klzzwxh:27246klzzwxh:27247 klzzwxh:27127

      klzzwxh:27270klzzwxh:27271klzzwxh:27272 xmlklzzwxh:27268data = NULL;klzzwxh:27276klzzwxh:27273klzzwxh:27274klzzwxh:27275 return 0;klzzwxh:27277klzzwxh:27269

      /klzzwxh:27278 Will be called when the start tag of a XML-element is found, and testsklzzwxh:27356klzzwxh:27290klzzwxh:27291 wheather it is a BACKUP elemt. In this case parent must be ROOT.klzzwxh:27357klzzwxh:27292klzzwxh:27293 userdata will be set to the newly created node backup and also the globalklzzwxh:27358klzzwxh:27294klzzwxh:27295 variable backup will be set.klzzwxh:27359klzzwxh:27296klzzwxh:27297 return value : 0 not responsible for this kind of element.klzzwxh:27360klzzwxh:27298klzzwxh:27299klzzwxh:27300klzzwxh:27301klzzwxh:27302klzzwxh:27303klzzwxh:27304klzzwxh:27305klzzwxh:27306klzzwxh:27307klzzwxh:27308klzzwxh:27309klzzwxh:27310klzzwxh:27311klzzwxh:27312klzzwxh:27313klzzwxh:27314 BACKUP if it is the backup elementklzzwxh:27361klzzwxh:27315klzzwxh:27316klzzwxh:27317klzzwxh:27318klzzwxh:27319klzzwxh:27320klzzwxh:27321klzzwxh:27322klzzwxh:27323klzzwxh:27324klzzwxh:27325klzzwxh:27326klzzwxh:27327klzzwxh:27328klzzwxh:27329klzzwxh:27330klzzwxh:27331 -1 XML error, parent is not root. klzzwxh:27279/klzzwxh:27362static int xmlklzzwxh:27280startklzzwxh:27281backupklzzwxh:27282void klzzwxh:27283userdata, int parent, const char klzzwxh:27284nspace,klzzwxh:27363klzzwxh:27332klzzwxh:27333klzzwxh:27334klzzwxh:27335klzzwxh:27336klzzwxh:27337klzzwxh:27338klzzwxh:27339klzzwxh:27340klzzwxh:27341klzzwxh:27342klzzwxh:27343klzzwxh:27344klzzwxh:27345klzzwxh:27346klzzwxh:27347klzzwxh:27348klzzwxh:27349klzzwxh:27350klzzwxh:27351klzzwxh:27352klzzwxh:27353klzzwxh:27354klzzwxh:27355 const char klzzwxh:27285name, const char klzzwxh:27286klzzwxh:27287attsklzzwxh:27288 klzzwxh:27289

      klzzwxh:27371klzzwxh:27372klzzwxh:27373 if klzzwxh:27364strcmpklzzwxh:27365name, typeklzzwxh:27366BACKUPklzzwxh:27367klzzwxh:27368 klzzwxh:27369= 0klzzwxh:27370klzzwxh:27381klzzwxh:27374klzzwxh:27375klzzwxh:27376klzzwxh:27377klzzwxh:27378klzzwxh:27379klzzwxh:27380 return 0;

      klzzwxh:27385klzzwxh:27386klzzwxh:27387 if klzzwxh:27382parent klzzwxh:27383= ROOTklzzwxh:27384klzzwxh:27395klzzwxh:27388klzzwxh:27389klzzwxh:27390klzzwxh:27391klzzwxh:27392klzzwxh:27393klzzwxh:27394 return -1;

      klzzwxh:27419klzzwxh:27420klzzwxh:27421 davklzzwxh:27396node klzzwxh:27397dir = newklzzwxh:27398nodeklzzwxh:27399klzzwxh:27400klzzwxh:27401klzzwxh:27402davklzzwxh:27403node klzzwxh:27404klzzwxh:27405klzzwxh:27406 userdataklzzwxh:27407, Sklzzwxh:27408IFDIR | Sklzzwxh:27409IRWXUklzzwxh:27410;klzzwxh:27428klzzwxh:27422klzzwxh:27423klzzwxh:27424 backup = dir;klzzwxh:27429klzzwxh:27425klzzwxh:27426klzzwxh:27427 klzzwxh:27411klzzwxh:27412klzzwxh:27413davklzzwxh:27414node klzzwxh:27415klzzwxh:27416klzzwxh:27417 userdataklzzwxh:27418 = dir;

      klzzwxh:27431klzzwxh:27432klzzwxh:27433 return BACKUP;klzzwxh:27434klzzwxh:27430

      /klzzwxh:27435 Will be called when the start tag of a XML-element is found, and testsklzzwxh:27536klzzwxh:27449klzzwxh:27450 whether it is an element that contains a date. In this caseklzzwxh:27537klzzwxh:27451klzzwxh:27452 the parent must be either a directory klzzwxh:27436including root and backupklzzwxh:27437 orklzzwxh:27538klzzwxh:27453klzzwxh:27454 a file node.klzzwxh:27539klzzwxh:27455klzzwxh:27456 return value : 0 not responsible for this kind of element.klzzwxh:27540klzzwxh:27457klzzwxh:27458klzzwxh:27459klzzwxh:27460klzzwxh:27461klzzwxh:27462klzzwxh:27463klzzwxh:27464klzzwxh:27465klzzwxh:27466klzzwxh:27467klzzwxh:27468klzzwxh:27469klzzwxh:27470klzzwxh:27471klzzwxh:27472klzzwxh:27473 A value that indicates which member of a node the decimalklzzwxh:27541klzzwxh:27474klzzwxh:27475klzzwxh:27476klzzwxh:27477klzzwxh:27478klzzwxh:27479klzzwxh:27480klzzwxh:27481klzzwxh:27482klzzwxh:27483klzzwxh:27484klzzwxh:27485klzzwxh:27486klzzwxh:27487klzzwxh:27488klzzwxh:27489klzzwxh:27490 value must be assigned to.klzzwxh:27542klzzwxh:27491klzzwxh:27492klzzwxh:27493klzzwxh:27494klzzwxh:27495klzzwxh:27496klzzwxh:27497klzzwxh:27498klzzwxh:27499klzzwxh:27500klzzwxh:27501klzzwxh:27502klzzwxh:27503klzzwxh:27504klzzwxh:27505klzzwxh:27506klzzwxh:27507 -1 XML error, parent must not contain this property. klzzwxh:27438/klzzwxh:27543static int xmlklzzwxh:27439startklzzwxh:27440dateklzzwxh:27441void klzzwxh:27442userdata, int parent, const char klzzwxh:27443nspace,klzzwxh:27544klzzwxh:27508klzzwxh:27509klzzwxh:27510klzzwxh:27511klzzwxh:27512klzzwxh:27513klzzwxh:27514klzzwxh:27515klzzwxh:27516klzzwxh:27517klzzwxh:27518klzzwxh:27519klzzwxh:27520klzzwxh:27521klzzwxh:27522klzzwxh:27523klzzwxh:27524klzzwxh:27525klzzwxh:27526klzzwxh:27527klzzwxh:27528klzzwxh:27529klzzwxh:27530klzzwxh:27531klzzwxh:27532klzzwxh:27533klzzwxh:27534klzzwxh:27535 const char klzzwxh:27444name, const char klzzwxh:27445klzzwxh:27446attsklzzwxh:27447 klzzwxh:27448

      klzzwxh:27579klzzwxh:27580klzzwxh:27581 int ret;klzzwxh:27635klzzwxh:27582klzzwxh:27583klzzwxh:27584 if klzzwxh:27545strcmpklzzwxh:27546name, typeklzzwxh:27547ATIMEklzzwxh:27548klzzwxh:27549 == 0klzzwxh:27550 klzzwxh:27551klzzwxh:27636klzzwxh:27585klzzwxh:27586klzzwxh:27587klzzwxh:27588klzzwxh:27589klzzwxh:27590klzzwxh:27591 ret = ATIME;klzzwxh:27637klzzwxh:27592klzzwxh:27593klzzwxh:27594 klzzwxh:27552 else if klzzwxh:27553strcmpklzzwxh:27554name, typeklzzwxh:27555MTIMEklzzwxh:27556klzzwxh:27557 == 0klzzwxh:27558 klzzwxh:27559klzzwxh:27638klzzwxh:27595klzzwxh:27596klzzwxh:27597klzzwxh:27598klzzwxh:27599klzzwxh:27600klzzwxh:27601 ret = MTIME;klzzwxh:27639klzzwxh:27602klzzwxh:27603klzzwxh:27604 klzzwxh:27560 else if klzzwxh:27561strcmpklzzwxh:27562name, typeklzzwxh:27563CTIMEklzzwxh:27564klzzwxh:27565 == 0klzzwxh:27566 klzzwxh:27567klzzwxh:27640klzzwxh:27605klzzwxh:27606klzzwxh:27607klzzwxh:27608klzzwxh:27609klzzwxh:27610klzzwxh:27611 ret = CTIME;klzzwxh:27641klzzwxh:27612klzzwxh:27613klzzwxh:27614 klzzwxh:27568 else if klzzwxh:27569strcmpklzzwxh:27570name, typeklzzwxh:27571SMTIMEklzzwxh:27572klzzwxh:27573 == 0klzzwxh:27574 klzzwxh:27575klzzwxh:27642klzzwxh:27615klzzwxh:27616klzzwxh:27617klzzwxh:27618klzzwxh:27619klzzwxh:27620klzzwxh:27621 ret = SMTIME;klzzwxh:27643klzzwxh:27622klzzwxh:27623klzzwxh:27624 klzzwxh:27576 else klzzwxh:27577klzzwxh:27644klzzwxh:27625klzzwxh:27626klzzwxh:27627klzzwxh:27628klzzwxh:27629klzzwxh:27630klzzwxh:27631 return 0;klzzwxh:27645klzzwxh:27632klzzwxh:27633klzzwxh:27634 klzzwxh:27578

      klzzwxh:27652klzzwxh:27653klzzwxh:27654 if klzzwxh:27646parent klzzwxh:27647= DDIR klzzwxh:27655klzzwxh:27656 parent klzzwxh:27648= REG klzzwxh:27657klzzwxh:27658 parent klzzwxh:27649= BACKUP klzzwxh:27659klzzwxh:27660 parent klzzwxh:27650= ROOTklzzwxh:27651klzzwxh:27668klzzwxh:27661klzzwxh:27662klzzwxh:27663klzzwxh:27664klzzwxh:27665klzzwxh:27666klzzwxh:27667 return -1;

      klzzwxh:27670klzzwxh:27671klzzwxh:27672 return ret;klzzwxh:27673klzzwxh:27669

      /klzzwxh:27674 Will be called when the start tag of a XML-element is found, and testsklzzwxh:27780klzzwxh:27689klzzwxh:27690 whether it is an element that contains a decimal value. In this caseklzzwxh:27781klzzwxh:27691klzzwxh:27692 the parent must be either a directory klzzwxh:27675including root and backupklzzwxh:27676 orklzzwxh:27782klzzwxh:27693klzzwxh:27694 a file node.klzzwxh:27783klzzwxh:27695klzzwxh:27696 If parent is ROOT or BACKUP the element type must not be UID or GID.klzzwxh:27784klzzwxh:27697klzzwxh:27698 DIRTY and REMOTEklzzwxh:27677EXISTS are only allowed for parent REG.klzzwxh:27785klzzwxh:27699klzzwxh:27700 return value : 0 not responsible for this kind of element.klzzwxh:27786klzzwxh:27701klzzwxh:27702klzzwxh:27703klzzwxh:27704klzzwxh:27705klzzwxh:27706klzzwxh:27707klzzwxh:27708klzzwxh:27709klzzwxh:27710klzzwxh:27711klzzwxh:27712klzzwxh:27713klzzwxh:27714klzzwxh:27715klzzwxh:27716klzzwxh:27717 A value that indicates which member of a node the decimalklzzwxh:27787klzzwxh:27718klzzwxh:27719klzzwxh:27720klzzwxh:27721klzzwxh:27722klzzwxh:27723klzzwxh:27724klzzwxh:27725klzzwxh:27726klzzwxh:27727klzzwxh:27728klzzwxh:27729klzzwxh:27730klzzwxh:27731klzzwxh:27732klzzwxh:27733klzzwxh:27734 value must be assigned to.klzzwxh:27788klzzwxh:27735klzzwxh:27736klzzwxh:27737klzzwxh:27738klzzwxh:27739klzzwxh:27740klzzwxh:27741klzzwxh:27742klzzwxh:27743klzzwxh:27744klzzwxh:27745klzzwxh:27746klzzwxh:27747klzzwxh:27748klzzwxh:27749klzzwxh:27750klzzwxh:27751 -1 XML error, parent must not contain this property. klzzwxh:27678/klzzwxh:27789static int xmlklzzwxh:27679startklzzwxh:27680decimalklzzwxh:27681void klzzwxh:27682userdata, int parent, const char klzzwxh:27683nspace,klzzwxh:27790klzzwxh:27752klzzwxh:27753klzzwxh:27754klzzwxh:27755klzzwxh:27756klzzwxh:27757klzzwxh:27758klzzwxh:27759klzzwxh:27760klzzwxh:27761klzzwxh:27762klzzwxh:27763klzzwxh:27764klzzwxh:27765klzzwxh:27766klzzwxh:27767klzzwxh:27768klzzwxh:27769klzzwxh:27770klzzwxh:27771klzzwxh:27772klzzwxh:27773klzzwxh:27774klzzwxh:27775klzzwxh:27776klzzwxh:27777klzzwxh:27778klzzwxh:27779 const char klzzwxh:27684name, const char klzzwxh:27685klzzwxh:27686attsklzzwxh:27687 klzzwxh:27688

      klzzwxh:27827klzzwxh:27828klzzwxh:27829 int ret;klzzwxh:27883klzzwxh:27830klzzwxh:27831klzzwxh:27832 if klzzwxh:27791strcmpklzzwxh:27792name, typeklzzwxh:27793UIDklzzwxh:27794klzzwxh:27795 == 0klzzwxh:27796 klzzwxh:27797klzzwxh:27884klzzwxh:27833klzzwxh:27834klzzwxh:27835klzzwxh:27836klzzwxh:27837klzzwxh:27838klzzwxh:27839 ret = UID;klzzwxh:27885klzzwxh:27840klzzwxh:27841klzzwxh:27842 klzzwxh:27798 else if klzzwxh:27799strcmpklzzwxh:27800name, typeklzzwxh:27801GIDklzzwxh:27802klzzwxh:27803 == 0klzzwxh:27804 klzzwxh:27805klzzwxh:27886klzzwxh:27843klzzwxh:27844klzzwxh:27845klzzwxh:27846klzzwxh:27847klzzwxh:27848klzzwxh:27849 ret = GID;klzzwxh:27887klzzwxh:27850klzzwxh:27851klzzwxh:27852 klzzwxh:27806 else if klzzwxh:27807strcmpklzzwxh:27808name, typeklzzwxh:27809DIRTYklzzwxh:27810klzzwxh:27811 == 0klzzwxh:27812 klzzwxh:27813klzzwxh:27888klzzwxh:27853klzzwxh:27854klzzwxh:27855klzzwxh:27856klzzwxh:27857klzzwxh:27858klzzwxh:27859 ret = DIRTY;klzzwxh:27889klzzwxh:27860klzzwxh:27861klzzwxh:27862 klzzwxh:27814 else if klzzwxh:27815strcmpklzzwxh:27816name, typeklzzwxh:27817REMOTEklzzwxh:27818EXISTSklzzwxh:27819klzzwxh:27820 == 0klzzwxh:27821 klzzwxh:27822klzzwxh:27890klzzwxh:27863klzzwxh:27864klzzwxh:27865klzzwxh:27866klzzwxh:27867klzzwxh:27868klzzwxh:27869 ret = REMOTEklzzwxh:27823EXISTS;klzzwxh:27891klzzwxh:27870klzzwxh:27871klzzwxh:27872 klzzwxh:27824 else klzzwxh:27825klzzwxh:27892klzzwxh:27873klzzwxh:27874klzzwxh:27875klzzwxh:27876klzzwxh:27877klzzwxh:27878klzzwxh:27879 return 0;klzzwxh:27893klzzwxh:27880klzzwxh:27881klzzwxh:27882 klzzwxh:27826

      klzzwxh:27900klzzwxh:27901klzzwxh:27902 if klzzwxh:27894parent klzzwxh:27895= DDIR klzzwxh:27903klzzwxh:27904 parent klzzwxh:27896= REG klzzwxh:27905klzzwxh:27906 parent klzzwxh:27897= BACKUP klzzwxh:27907klzzwxh:27908 parent klzzwxh:27898= ROOTklzzwxh:27899klzzwxh:27916klzzwxh:27909klzzwxh:27910klzzwxh:27911klzzwxh:27912klzzwxh:27913klzzwxh:27914klzzwxh:27915 return -1;

      klzzwxh:27923klzzwxh:27924klzzwxh:27925 if klzzwxh:27917klzzwxh:27918parent == BACKUP || parent == ROOTklzzwxh:27919 klzzwxh:27926klzzwxh:27927 klzzwxh:27920ret == UID || ret == GIDklzzwxh:27921klzzwxh:27922klzzwxh:27935klzzwxh:27928klzzwxh:27929klzzwxh:27930klzzwxh:27931klzzwxh:27932klzzwxh:27933klzzwxh:27934 return -1;

      klzzwxh:27942klzzwxh:27943klzzwxh:27944 if klzzwxh:27936parent klzzwxh:27937= REG klzzwxh:27945klzzwxh:27946 klzzwxh:27938ret == DIRTY || ret == REMOTEklzzwxh:27939EXISTSklzzwxh:27940klzzwxh:27941klzzwxh:27954klzzwxh:27947klzzwxh:27948klzzwxh:27949klzzwxh:27950klzzwxh:27951klzzwxh:27952klzzwxh:27953 return -1;

      klzzwxh:27956klzzwxh:27957klzzwxh:27958 return ret;klzzwxh:27959klzzwxh:27955

      /klzzwxh:27960 Will be called when the start tag of a XML-element is found, and testsklzzwxh:28040klzzwxh:27974klzzwxh:27975 whether it is an directory element. Inthis case parent must be a directoryklzzwxh:28041klzzwxh:27976klzzwxh:27977 klzzwxh:27961including root but nur backupklzzwxh:27962.klzzwxh:28042klzzwxh:27978klzzwxh:27979 userdata will be set to the newly created directory node.klzzwxh:28043klzzwxh:27980klzzwxh:27981 return value : 0 not responsible for this kind of element.klzzwxh:28044klzzwxh:27982klzzwxh:27983klzzwxh:27984klzzwxh:27985klzzwxh:27986klzzwxh:27987klzzwxh:27988klzzwxh:27989klzzwxh:27990klzzwxh:27991klzzwxh:27992klzzwxh:27993klzzwxh:27994klzzwxh:27995klzzwxh:27996klzzwxh:27997klzzwxh:27998 DDIR if it is a directory element.klzzwxh:28045klzzwxh:27999klzzwxh:28000klzzwxh:28001klzzwxh:28002klzzwxh:28003klzzwxh:28004klzzwxh:28005klzzwxh:28006klzzwxh:28007klzzwxh:28008klzzwxh:28009klzzwxh:28010klzzwxh:28011klzzwxh:28012klzzwxh:28013klzzwxh:28014klzzwxh:28015 -1 XML error, parent must not contain this property. klzzwxh:27963/klzzwxh:28046static int xmlklzzwxh:27964startklzzwxh:27965dirklzzwxh:27966void klzzwxh:27967userdata, int parent, const char klzzwxh:27968nspace,klzzwxh:28047klzzwxh:28016klzzwxh:28017klzzwxh:28018klzzwxh:28019klzzwxh:28020klzzwxh:28021klzzwxh:28022klzzwxh:28023klzzwxh:28024klzzwxh:28025klzzwxh:28026klzzwxh:28027klzzwxh:28028klzzwxh:28029klzzwxh:28030klzzwxh:28031klzzwxh:28032klzzwxh:28033klzzwxh:28034klzzwxh:28035klzzwxh:28036klzzwxh:28037klzzwxh:28038klzzwxh:28039 const char klzzwxh:27969name, const char klzzwxh:27970klzzwxh:27971attsklzzwxh:27972 klzzwxh:27973

      klzzwxh:28055klzzwxh:28056klzzwxh:28057 if klzzwxh:28048strcmpklzzwxh:28049name, typeklzzwxh:28050DDIRklzzwxh:28051klzzwxh:28052 klzzwxh:28053= 0klzzwxh:28054klzzwxh:28065klzzwxh:28058klzzwxh:28059klzzwxh:28060klzzwxh:28061klzzwxh:28062klzzwxh:28063klzzwxh:28064 return 0;

      klzzwxh:28070klzzwxh:28071klzzwxh:28072 if klzzwxh:28066parent klzzwxh:28067= DDIR klzzwxh:28073klzzwxh:28074 parent klzzwxh:28068= ROOTklzzwxh:28069klzzwxh:28082klzzwxh:28075klzzwxh:28076klzzwxh:28077klzzwxh:28078klzzwxh:28079klzzwxh:28080klzzwxh:28081 return -1;

      klzzwxh:28106klzzwxh:28107klzzwxh:28108 davklzzwxh:28083node klzzwxh:28084dir = newklzzwxh:28085nodeklzzwxh:28086klzzwxh:28087klzzwxh:28088klzzwxh:28089davklzzwxh:28090node klzzwxh:28091klzzwxh:28092klzzwxh:28093 userdataklzzwxh:28094, defaultklzzwxh:28095dirklzzwxh:28096modeklzzwxh:28097;klzzwxh:28112klzzwxh:28109klzzwxh:28110klzzwxh:28111 klzzwxh:28098klzzwxh:28099klzzwxh:28100davklzzwxh:28101node klzzwxh:28102klzzwxh:28103klzzwxh:28104 userdataklzzwxh:28105 = dir;

      klzzwxh:28114klzzwxh:28115klzzwxh:28116 return DDIR;klzzwxh:28117klzzwxh:28113

      /klzzwxh:28118 Will be called when the start tag of a XML-element is found, and testsklzzwxh:28197klzzwxh:28132klzzwxh:28133 whether it is an mode element. In this case parent must be a regularklzzwxh:28198klzzwxh:28134klzzwxh:28135 node or a directory klzzwxh:28119including root but not backupklzzwxh:28120.klzzwxh:28199klzzwxh:28136klzzwxh:28137 return value : 0 not responsible for this kind of element.klzzwxh:28200klzzwxh:28138klzzwxh:28139klzzwxh:28140klzzwxh:28141klzzwxh:28142klzzwxh:28143klzzwxh:28144klzzwxh:28145klzzwxh:28146klzzwxh:28147klzzwxh:28148klzzwxh:28149klzzwxh:28150klzzwxh:28151klzzwxh:28152klzzwxh:28153klzzwxh:28154 MODE if it is a mode element.klzzwxh:28201klzzwxh:28155klzzwxh:28156klzzwxh:28157klzzwxh:28158klzzwxh:28159klzzwxh:28160klzzwxh:28161klzzwxh:28162klzzwxh:28163klzzwxh:28164klzzwxh:28165klzzwxh:28166klzzwxh:28167klzzwxh:28168klzzwxh:28169klzzwxh:28170klzzwxh:28171 -1 XML error, parent must not contain this property. klzzwxh:28121/klzzwxh:28202static int xmlklzzwxh:28122startklzzwxh:28123modeklzzwxh:28124void klzzwxh:28125userdata, int parent, const char klzzwxh:28126nspace,klzzwxh:28203klzzwxh:28172klzzwxh:28173klzzwxh:28174klzzwxh:28175klzzwxh:28176klzzwxh:28177klzzwxh:28178klzzwxh:28179klzzwxh:28180klzzwxh:28181klzzwxh:28182klzzwxh:28183klzzwxh:28184klzzwxh:28185klzzwxh:28186klzzwxh:28187klzzwxh:28188klzzwxh:28189klzzwxh:28190klzzwxh:28191klzzwxh:28192klzzwxh:28193klzzwxh:28194klzzwxh:28195klzzwxh:28196 const char klzzwxh:28127name, const char klzzwxh:28128klzzwxh:28129attsklzzwxh:28130 klzzwxh:28131

      klzzwxh:28211klzzwxh:28212klzzwxh:28213 if klzzwxh:28204strcmpklzzwxh:28205name, typeklzzwxh:28206MODEklzzwxh:28207klzzwxh:28208 klzzwxh:28209= 0klzzwxh:28210klzzwxh:28221klzzwxh:28214klzzwxh:28215klzzwxh:28216klzzwxh:28217klzzwxh:28218klzzwxh:28219klzzwxh:28220 return 0;

      klzzwxh:28227klzzwxh:28228klzzwxh:28229 if klzzwxh:28222parent klzzwxh:28223= DDIR klzzwxh:28230klzzwxh:28231 parent klzzwxh:28224= REG klzzwxh:28232klzzwxh:28233 parent klzzwxh:28225= ROOTklzzwxh:28226klzzwxh:28241klzzwxh:28234klzzwxh:28235klzzwxh:28236klzzwxh:28237klzzwxh:28238klzzwxh:28239klzzwxh:28240 return -1;

      klzzwxh:28243klzzwxh:28244klzzwxh:28245 return MODE;klzzwxh:28246klzzwxh:28242

      /klzzwxh:28247 Will be called when the start tag of a XML-element is found, and testsklzzwxh:28327klzzwxh:28261klzzwxh:28262 whether it is an element that represents a file node. In this case parentklzzwxh:28328klzzwxh:28263klzzwxh:28264 must be a directory klzzwxh:28248including root and backupklzzwxh:28249.klzzwxh:28329klzzwxh:28265klzzwxh:28266 userdata will be set to the newly created file node.klzzwxh:28330klzzwxh:28267klzzwxh:28268 return value : 0 not responsible for this kind of element.klzzwxh:28331klzzwxh:28269klzzwxh:28270klzzwxh:28271klzzwxh:28272klzzwxh:28273klzzwxh:28274klzzwxh:28275klzzwxh:28276klzzwxh:28277klzzwxh:28278klzzwxh:28279klzzwxh:28280klzzwxh:28281klzzwxh:28282klzzwxh:28283klzzwxh:28284klzzwxh:28285 REG if the element represents a file node.klzzwxh:28332klzzwxh:28286klzzwxh:28287klzzwxh:28288klzzwxh:28289klzzwxh:28290klzzwxh:28291klzzwxh:28292klzzwxh:28293klzzwxh:28294klzzwxh:28295klzzwxh:28296klzzwxh:28297klzzwxh:28298klzzwxh:28299klzzwxh:28300klzzwxh:28301klzzwxh:28302 -1 XML error, parent must not contain this property. klzzwxh:28250/klzzwxh:28333static int xmlklzzwxh:28251startklzzwxh:28252regklzzwxh:28253void klzzwxh:28254userdata, int parent, const char klzzwxh:28255nspace,klzzwxh:28334klzzwxh:28303klzzwxh:28304klzzwxh:28305klzzwxh:28306klzzwxh:28307klzzwxh:28308klzzwxh:28309klzzwxh:28310klzzwxh:28311klzzwxh:28312klzzwxh:28313klzzwxh:28314klzzwxh:28315klzzwxh:28316klzzwxh:28317klzzwxh:28318klzzwxh:28319klzzwxh:28320klzzwxh:28321klzzwxh:28322klzzwxh:28323klzzwxh:28324klzzwxh:28325klzzwxh:28326 const char klzzwxh:28256name, const char klzzwxh:28257klzzwxh:28258attsklzzwxh:28259 klzzwxh:28260

      klzzwxh:28342klzzwxh:28343klzzwxh:28344 if klzzwxh:28335strcmpklzzwxh:28336name, typeklzzwxh:28337REGklzzwxh:28338klzzwxh:28339 klzzwxh:28340= 0klzzwxh:28341klzzwxh:28352klzzwxh:28345klzzwxh:28346klzzwxh:28347klzzwxh:28348klzzwxh:28349klzzwxh:28350klzzwxh:28351 return 0;

      klzzwxh:28358klzzwxh:28359klzzwxh:28360 if klzzwxh:28353parent klzzwxh:28354= DDIR klzzwxh:28361klzzwxh:28362 parent klzzwxh:28355= BACKUP klzzwxh:28363klzzwxh:28364 parent klzzwxh:28356= ROOTklzzwxh:28357klzzwxh:28372klzzwxh:28365klzzwxh:28366klzzwxh:28367klzzwxh:28368klzzwxh:28369klzzwxh:28370klzzwxh:28371 return -1;

      klzzwxh:28400klzzwxh:28401klzzwxh:28402 davklzzwxh:28373node klzzwxh:28374reg = newklzzwxh:28375nodeklzzwxh:28376klzzwxh:28377klzzwxh:28378klzzwxh:28379davklzzwxh:28380node klzzwxh:28381klzzwxh:28382klzzwxh:28383 userdataklzzwxh:28384, defaultklzzwxh:28385fileklzzwxh:28386modeklzzwxh:28387;klzzwxh:28417klzzwxh:28403klzzwxh:28404klzzwxh:28405 klzzwxh:28388klzzwxh:28389klzzwxh:28390davklzzwxh:28391node klzzwxh:28392klzzwxh:28393klzzwxh:28394 userdataklzzwxh:28395 = reg;klzzwxh:28418klzzwxh:28406klzzwxh:28407klzzwxh:28408 if klzzwxh:28396parent klzzwxh:28397= BACKUPklzzwxh:28398klzzwxh:28419klzzwxh:28409klzzwxh:28410klzzwxh:28411klzzwxh:28412klzzwxh:28413klzzwxh:28414klzzwxh:28415 reg-klzzwxh:28416remoteklzzwxh:28399exists = 1;

      klzzwxh:28421klzzwxh:28422klzzwxh:28423 return REG;klzzwxh:28424klzzwxh:28420

      /klzzwxh:28425 Will be called when the start tag of a XML-element is found, and testsklzzwxh:28500klzzwxh:28437klzzwxh:28438 whether the element represents the root node. In this case parent must be 0.klzzwxh:28501klzzwxh:28439klzzwxh:28440 return value : 0 not responsible for this kind of element.klzzwxh:28502klzzwxh:28441klzzwxh:28442klzzwxh:28443klzzwxh:28444klzzwxh:28445klzzwxh:28446klzzwxh:28447klzzwxh:28448klzzwxh:28449klzzwxh:28450klzzwxh:28451klzzwxh:28452klzzwxh:28453klzzwxh:28454klzzwxh:28455klzzwxh:28456klzzwxh:28457 ROOT if it is the root node element.klzzwxh:28503klzzwxh:28458klzzwxh:28459klzzwxh:28460klzzwxh:28461klzzwxh:28462klzzwxh:28463klzzwxh:28464klzzwxh:28465klzzwxh:28466klzzwxh:28467klzzwxh:28468klzzwxh:28469klzzwxh:28470klzzwxh:28471klzzwxh:28472klzzwxh:28473klzzwxh:28474 -1 XML error, root property with parent not equal 0. klzzwxh:28426/klzzwxh:28504static int xmlklzzwxh:28427startklzzwxh:28428rootklzzwxh:28429void klzzwxh:28430userdata, int parent, const char klzzwxh:28431nspace,klzzwxh:28505klzzwxh:28475klzzwxh:28476klzzwxh:28477klzzwxh:28478klzzwxh:28479klzzwxh:28480klzzwxh:28481klzzwxh:28482klzzwxh:28483klzzwxh:28484klzzwxh:28485klzzwxh:28486klzzwxh:28487klzzwxh:28488klzzwxh:28489klzzwxh:28490klzzwxh:28491klzzwxh:28492klzzwxh:28493klzzwxh:28494klzzwxh:28495klzzwxh:28496klzzwxh:28497klzzwxh:28498klzzwxh:28499 const char klzzwxh:28432name, const char klzzwxh:28433klzzwxh:28434attsklzzwxh:28435 klzzwxh:28436

      klzzwxh:28513klzzwxh:28514klzzwxh:28515 if klzzwxh:28506strcmpklzzwxh:28507name, typeklzzwxh:28508ROOTklzzwxh:28509klzzwxh:28510 klzzwxh:28511= 0klzzwxh:28512klzzwxh:28523klzzwxh:28516klzzwxh:28517klzzwxh:28518klzzwxh:28519klzzwxh:28520klzzwxh:28521klzzwxh:28522 return 0;

      klzzwxh:28527klzzwxh:28528klzzwxh:28529 if klzzwxh:28524parent klzzwxh:28525= 0klzzwxh:28526klzzwxh:28537klzzwxh:28530klzzwxh:28531klzzwxh:28532klzzwxh:28533klzzwxh:28534klzzwxh:28535klzzwxh:28536 return -1;

      klzzwxh:28539klzzwxh:28540klzzwxh:28541 return ROOT;klzzwxh:28542klzzwxh:28538

      /klzzwxh:28543 Will be called when the start tag of a XML-element is found, and testsklzzwxh:28640klzzwxh:28555klzzwxh:28556 whether it is an element that contains the file size. In this caseklzzwxh:28641klzzwxh:28557klzzwxh:28558 the parent must be a file node.klzzwxh:28642klzzwxh:28559klzzwxh:28560 return value : 0 not responsible for this kind of element.klzzwxh:28643klzzwxh:28561klzzwxh:28562klzzwxh:28563klzzwxh:28564klzzwxh:28565klzzwxh:28566klzzwxh:28567klzzwxh:28568klzzwxh:28569klzzwxh:28570klzzwxh:28571klzzwxh:28572klzzwxh:28573klzzwxh:28574klzzwxh:28575klzzwxh:28576klzzwxh:28577 SIZE if the element represents the file size.klzzwxh:28644klzzwxh:28578klzzwxh:28579klzzwxh:28580klzzwxh:28581klzzwxh:28582klzzwxh:28583klzzwxh:28584klzzwxh:28585klzzwxh:28586klzzwxh:28587klzzwxh:28588klzzwxh:28589klzzwxh:28590klzzwxh:28591klzzwxh:28592klzzwxh:28593klzzwxh:28594 value must be assigned to.klzzwxh:28645klzzwxh:28595klzzwxh:28596klzzwxh:28597klzzwxh:28598klzzwxh:28599klzzwxh:28600klzzwxh:28601klzzwxh:28602klzzwxh:28603klzzwxh:28604klzzwxh:28605klzzwxh:28606klzzwxh:28607klzzwxh:28608klzzwxh:28609klzzwxh:28610klzzwxh:28611 -1 XML error, parent must not contain this property. klzzwxh:28544/klzzwxh:28646static int xmlklzzwxh:28545startklzzwxh:28546sizeklzzwxh:28547void klzzwxh:28548userdata, int parent, const char klzzwxh:28549nspace,klzzwxh:28647klzzwxh:28612klzzwxh:28613klzzwxh:28614klzzwxh:28615klzzwxh:28616klzzwxh:28617klzzwxh:28618klzzwxh:28619klzzwxh:28620klzzwxh:28621klzzwxh:28622klzzwxh:28623klzzwxh:28624klzzwxh:28625klzzwxh:28626klzzwxh:28627klzzwxh:28628klzzwxh:28629klzzwxh:28630klzzwxh:28631klzzwxh:28632klzzwxh:28633klzzwxh:28634klzzwxh:28635klzzwxh:28636klzzwxh:28637klzzwxh:28638klzzwxh:28639 const char klzzwxh:28550name, const char klzzwxh:28551klzzwxh:28552attsklzzwxh:28553 klzzwxh:28554

      klzzwxh:28657klzzwxh:28658klzzwxh:28659 if klzzwxh:28648strcmpklzzwxh:28649name, typeklzzwxh:28650SIZEklzzwxh:28651klzzwxh:28652 klzzwxh:28653= 0klzzwxh:28654 klzzwxh:28655klzzwxh:28670klzzwxh:28660klzzwxh:28661klzzwxh:28662klzzwxh:28663klzzwxh:28664klzzwxh:28665klzzwxh:28666 return 0;klzzwxh:28671klzzwxh:28667klzzwxh:28668klzzwxh:28669 klzzwxh:28656

      klzzwxh:28675klzzwxh:28676klzzwxh:28677 if klzzwxh:28672parent klzzwxh:28673= REGklzzwxh:28674klzzwxh:28685klzzwxh:28678klzzwxh:28679klzzwxh:28680klzzwxh:28681klzzwxh:28682klzzwxh:28683klzzwxh:28684 return -1;

      klzzwxh:28687klzzwxh:28688klzzwxh:28689 return SIZE;klzzwxh:28690klzzwxh:28686

      /klzzwxh:28691 Will be called when the start tag of a XML-element is found, and testsklzzwxh:28787klzzwxh:28703klzzwxh:28704 whether it is an element that rcontains a string. In this case parent mustklzzwxh:28788klzzwxh:28705klzzwxh:28706 be a directory or a file node.klzzwxh:28789klzzwxh:28707klzzwxh:28708 return value : 0 not responsible for this kind of element.klzzwxh:28790klzzwxh:28709klzzwxh:28710klzzwxh:28711klzzwxh:28712klzzwxh:28713klzzwxh:28714klzzwxh:28715klzzwxh:28716klzzwxh:28717klzzwxh:28718klzzwxh:28719klzzwxh:28720klzzwxh:28721klzzwxh:28722klzzwxh:28723klzzwxh:28724klzzwxh:28725 A value that indicates which member of a node the string mustklzzwxh:28791klzzwxh:28726klzzwxh:28727klzzwxh:28728klzzwxh:28729klzzwxh:28730klzzwxh:28731klzzwxh:28732klzzwxh:28733klzzwxh:28734klzzwxh:28735klzzwxh:28736klzzwxh:28737klzzwxh:28738klzzwxh:28739klzzwxh:28740klzzwxh:28741klzzwxh:28742 be assigned to.klzzwxh:28792klzzwxh:28743klzzwxh:28744klzzwxh:28745klzzwxh:28746klzzwxh:28747klzzwxh:28748klzzwxh:28749klzzwxh:28750klzzwxh:28751klzzwxh:28752klzzwxh:28753klzzwxh:28754klzzwxh:28755klzzwxh:28756klzzwxh:28757klzzwxh:28758klzzwxh:28759 -1 XML error, parent must not contain this property. klzzwxh:28692/klzzwxh:28793static int xmlklzzwxh:28693startklzzwxh:28694stringklzzwxh:28695void klzzwxh:28696userdata, int parent, const char klzzwxh:28697nspace,klzzwxh:28794klzzwxh:28760klzzwxh:28761klzzwxh:28762klzzwxh:28763klzzwxh:28764klzzwxh:28765klzzwxh:28766klzzwxh:28767klzzwxh:28768klzzwxh:28769klzzwxh:28770klzzwxh:28771klzzwxh:28772klzzwxh:28773klzzwxh:28774klzzwxh:28775klzzwxh:28776klzzwxh:28777klzzwxh:28778klzzwxh:28779klzzwxh:28780klzzwxh:28781klzzwxh:28782klzzwxh:28783klzzwxh:28784klzzwxh:28785klzzwxh:28786 const char klzzwxh:28698name, const char klzzwxh:28699klzzwxh:28700attsklzzwxh:28701 klzzwxh:28702

      klzzwxh:28839klzzwxh:28840klzzwxh:28841 int ret;klzzwxh:28905klzzwxh:28842klzzwxh:28843klzzwxh:28844 if klzzwxh:28795strcmpklzzwxh:28796name, typeklzzwxh:28797PATHklzzwxh:28798klzzwxh:28799 == 0klzzwxh:28800 klzzwxh:28801klzzwxh:28906klzzwxh:28845klzzwxh:28846klzzwxh:28847klzzwxh:28848klzzwxh:28849klzzwxh:28850klzzwxh:28851 ret = PATH;klzzwxh:28907klzzwxh:28852klzzwxh:28853klzzwxh:28854 klzzwxh:28802 else if klzzwxh:28803strcmpklzzwxh:28804name, typeklzzwxh:28805NAMEklzzwxh:28806klzzwxh:28807 == 0klzzwxh:28808 klzzwxh:28809klzzwxh:28908klzzwxh:28855klzzwxh:28856klzzwxh:28857klzzwxh:28858klzzwxh:28859klzzwxh:28860klzzwxh:28861 ret = NAME;klzzwxh:28909klzzwxh:28862klzzwxh:28863klzzwxh:28864 klzzwxh:28810 else if klzzwxh:28811strcmpklzzwxh:28812name, typeklzzwxh:28813CACHEklzzwxh:28814PATHklzzwxh:28815klzzwxh:28816 == 0klzzwxh:28817 klzzwxh:28818klzzwxh:28910klzzwxh:28865klzzwxh:28866klzzwxh:28867klzzwxh:28868klzzwxh:28869klzzwxh:28870klzzwxh:28871 ret = CACHEklzzwxh:28819PATH;klzzwxh:28911klzzwxh:28872klzzwxh:28873klzzwxh:28874 klzzwxh:28820 else if klzzwxh:28821strcmpklzzwxh:28822name, typeklzzwxh:28823ETAGklzzwxh:28824klzzwxh:28825 == 0klzzwxh:28826 klzzwxh:28827klzzwxh:28912klzzwxh:28875klzzwxh:28876klzzwxh:28877klzzwxh:28878klzzwxh:28879klzzwxh:28880klzzwxh:28881 ret = ETAG;klzzwxh:28913klzzwxh:28882klzzwxh:28883klzzwxh:28884 klzzwxh:28828 else if klzzwxh:28829strcmpklzzwxh:28830name, typeklzzwxh:28831MIMEklzzwxh:28832klzzwxh:28833 == 0klzzwxh:28834 klzzwxh:28835klzzwxh:28914klzzwxh:28885klzzwxh:28886klzzwxh:28887klzzwxh:28888klzzwxh:28889klzzwxh:28890klzzwxh:28891 ret = MIME;klzzwxh:28915klzzwxh:28892klzzwxh:28893klzzwxh:28894 klzzwxh:28836 else klzzwxh:28837klzzwxh:28916klzzwxh:28895klzzwxh:28896klzzwxh:28897klzzwxh:28898klzzwxh:28899klzzwxh:28900klzzwxh:28901 return 0;klzzwxh:28917klzzwxh:28902klzzwxh:28903klzzwxh:28904 klzzwxh:28838

      klzzwxh:28922klzzwxh:28923klzzwxh:28924 if klzzwxh:28918parent klzzwxh:28919= DDIR klzzwxh:28925klzzwxh:28926 parent klzzwxh:28920= REGklzzwxh:28921klzzwxh:28934klzzwxh:28927klzzwxh:28928klzzwxh:28929klzzwxh:28930klzzwxh:28931klzzwxh:28932klzzwxh:28933 return -1;

      klzzwxh:28936klzzwxh:28937klzzwxh:28938 return ret;klzzwxh:28939klzzwxh:28935

      /klzzwxh:28940 Auxiliary. klzzwxh:28941/

      /klzzwxh:28942 Tries to evaluate the alignment of structure davklzzwxh:28943node. It allocatesklzzwxh:28975klzzwxh:28952klzzwxh:28953 davklzzwxh:28944node structures and random length strings alternatively and inspects theklzzwxh:28976klzzwxh:28954klzzwxh:28955 address.klzzwxh:28977klzzwxh:28956klzzwxh:28957 return value : the alignment klzzwxh:28945e.g. alignment = 4 means addressesklzzwxh:28978klzzwxh:28958klzzwxh:28959klzzwxh:28960klzzwxh:28961klzzwxh:28962klzzwxh:28963klzzwxh:28964klzzwxh:28965klzzwxh:28966klzzwxh:28967klzzwxh:28968klzzwxh:28969klzzwxh:28970klzzwxh:28971klzzwxh:28972klzzwxh:28973klzzwxh:28974 are always multiples of 4 klzzwxh:28946/klzzwxh:28979static sizeklzzwxh:28947t testklzzwxh:28948alignmentklzzwxh:28949klzzwxh:28950 klzzwxh:28951

      klzzwxh:28993klzzwxh:28994klzzwxh:28995 srandklzzwxh:28980timeklzzwxh:289810klzzwxh:28982klzzwxh:28983;klzzwxh:29008klzzwxh:28996klzzwxh:28997klzzwxh:28998 sizeklzzwxh:28984t align = 64;klzzwxh:29009klzzwxh:28999klzzwxh:29000klzzwxh:29001 sizeklzzwxh:28985t trials = 100;klzzwxh:29010klzzwxh:29002klzzwxh:29003klzzwxh:29004 char klzzwxh:28986sklzzwxh:28987trialsklzzwxh:28988;klzzwxh:29011klzzwxh:29005klzzwxh:29006klzzwxh:29007 davklzzwxh:28989node klzzwxh:28990nklzzwxh:28991trialsklzzwxh:28992;

      klzzwxh:29056klzzwxh:29057klzzwxh:29058 sizeklzzwxh:29012t j = 0;klzzwxh:29112klzzwxh:29059klzzwxh:29060klzzwxh:29061 while klzzwxh:29013align klzzwxh:29062 0 klzzwxh:29063klzzwxh:29064 j klzzwxh:29065 trialsklzzwxh:29014 klzzwxh:29015klzzwxh:29113klzzwxh:29066klzzwxh:29067klzzwxh:29068klzzwxh:29069klzzwxh:29070klzzwxh:29071klzzwxh:29072 sklzzwxh:29016jklzzwxh:29017 = klzzwxh:29018char klzzwxh:29019klzzwxh:29020 neklzzwxh:29021mallocklzzwxh:29022klzzwxh:29023randklzzwxh:29024klzzwxh:29025 / klzzwxh:29026RANDklzzwxh:29027MAX / 1024klzzwxh:29028klzzwxh:29029 % klzzwxh:290304 klzzwxh:29031alignklzzwxh:29032klzzwxh:29033;klzzwxh:29114klzzwxh:29073klzzwxh:29074klzzwxh:29075klzzwxh:29076klzzwxh:29077klzzwxh:29078klzzwxh:29079 nklzzwxh:29034jklzzwxh:29035 = klzzwxh:29036davklzzwxh:29037node klzzwxh:29038klzzwxh:29039 neklzzwxh:29040mallocklzzwxh:29041sizeofklzzwxh:29042davklzzwxh:29043nodeklzzwxh:29044klzzwxh:29045;klzzwxh:29115klzzwxh:29080klzzwxh:29081klzzwxh:29082klzzwxh:29083klzzwxh:29084klzzwxh:29085klzzwxh:29086 while klzzwxh:29046align klzzwxh:29087 0 klzzwxh:29088klzzwxh:29089 klzzwxh:29047klzzwxh:29048sizeklzzwxh:29049tklzzwxh:29050 nklzzwxh:29051jklzzwxh:29052 % alignklzzwxh:29053 klzzwxh:29090 0klzzwxh:29054klzzwxh:29116klzzwxh:29091klzzwxh:29092klzzwxh:29093klzzwxh:29094klzzwxh:29095klzzwxh:29096klzzwxh:29097klzzwxh:29098klzzwxh:29099klzzwxh:29100klzzwxh:29101 align /= 2;klzzwxh:29117klzzwxh:29102klzzwxh:29103klzzwxh:29104klzzwxh:29105klzzwxh:29106klzzwxh:29107klzzwxh:29108 ++j;klzzwxh:29118klzzwxh:29109klzzwxh:29110klzzwxh:29111 klzzwxh:29055

      klzzwxh:29142klzzwxh:29143klzzwxh:29144 for klzzwxh:29119j = 0; j klzzwxh:29145 trials; j++klzzwxh:29120 klzzwxh:29121klzzwxh:29188klzzwxh:29146klzzwxh:29147klzzwxh:29148klzzwxh:29149klzzwxh:29150klzzwxh:29151klzzwxh:29152 if klzzwxh:29122nklzzwxh:29123jklzzwxh:29124 klzzwxh:29125= NULLklzzwxh:29126klzzwxh:29189klzzwxh:29153klzzwxh:29154klzzwxh:29155klzzwxh:29156klzzwxh:29157klzzwxh:29158klzzwxh:29159klzzwxh:29160klzzwxh:29161klzzwxh:29162klzzwxh:29163 freeklzzwxh:29127nklzzwxh:29128jklzzwxh:29129klzzwxh:29130;klzzwxh:29190klzzwxh:29164klzzwxh:29165klzzwxh:29166klzzwxh:29167klzzwxh:29168klzzwxh:29169klzzwxh:29170 if klzzwxh:29131sklzzwxh:29132jklzzwxh:29133 klzzwxh:29134= NULLklzzwxh:29135klzzwxh:29191klzzwxh:29171klzzwxh:29172klzzwxh:29173klzzwxh:29174klzzwxh:29175klzzwxh:29176klzzwxh:29177klzzwxh:29178klzzwxh:29179klzzwxh:29180klzzwxh:29181 freeklzzwxh:29136sklzzwxh:29137jklzzwxh:29138klzzwxh:29139;klzzwxh:29192klzzwxh:29182klzzwxh:29183klzzwxh:29184 klzzwxh:29140klzzwxh:29193klzzwxh:29185klzzwxh:29186klzzwxh:29187 return align;klzzwxh:29194klzzwxh:29141

       
    • Werner Baumann
      Werner Baumann
      2008-05-22

      Hello Mario,

      the files you send compile without error on my system.

      You will have to look for a serious problem of your local build system.

      Alle the errors, reported by your compiler, start with a parse error. No other compiler ever reported a parse error for the same lines. You may also look at the code yourself, if you can find anything like a syntax error.

      Conclusion:
      Either your compiler uses its very own, randomly generated syntax rules,
      or what your compiler sees is very different from what I see, or my compiler sees or you see.

      Maybe
      - you get read errors on yourfile system
      - there are hidden characters in your file, that don't show when copying over HTTP
      - some of your system's include files are broken
      - ?

      But you must search for the bug on your system.

      Cheers
      Werner