]> git.pld-linux.org Git - packages/lftp.git/blob - lftp-git.patch
- rel 2; fixes from git
[packages/lftp.git] / lftp-git.patch
1 diff --git a/src/ChangeLog b/src/ChangeLog
2 index 7d65003..e804bc4 100644
3 --- a/src/ChangeLog
4 +++ b/src/ChangeLog
5 @@ -1,3 +1,18 @@
6 +2013-07-04  Alexander V. Lukyanov <lav@yars.free.net>
7 +
8 +       * network.cc: don't use IPV6_V6ONLY if not defined.
9 +         (from y-iida@secom.co.jp).
10 +       * FileSet.cc: (FileInfo::Merge) copy size properly.
11 +
12 +2013-07-04  Alexander V. Lukyanov <lav@yars.free.net>
13 +
14 +       * FileSet.cc: recognize and ignore human readable sizes.
15 +
16 +2013-05-30  Alexander V. Lukyanov <lav@yars.free.net>
17 +
18 +       * lftp_tinfo.cc: fixed segfault when there is no TERM env var.
19 +       * buffer_zlib.cc: fixed compilation with older zlib.
20 +
21  2013-05-28  Alexander V. Lukyanov <lav@yars.free.net>
22  
23         * buffer_zlib.cc, buffer_zlib.h: implement inflator.
24 diff --git a/src/FileSet.cc b/src/FileSet.cc
25 index 49c9df4..4c93ea1 100644
26 --- a/src/FileSet.cc
27 +++ b/src/FileSet.cc
28 @@ -56,6 +56,8 @@ void  FileInfo::Merge(const FileInfo& f)
29        SetMode(f.mode);
30     if(dif&DATE || (defined&DATE && f.defined&DATE && f.date.ts_prec<date.ts_prec))
31        SetDate(f.date,f.date.ts_prec);
32 +   if(dif&SIZE)
33 +      SetSize(f.size);
34     if(dif&TYPE)
35        SetType(f.filetype);
36     if(dif&SYMLINK)
37 @@ -792,7 +794,8 @@ FileInfo *FileInfo::parse_ls_line(const char *line_c,const char *tz)
38        // it's size, so the previous was group:
39        fi->SetGroup(group_or_size);
40        long long size;
41 -      if(sscanf(t,"%lld",&size)==1)
42 +      int n;
43 +      if(sscanf(t,"%lld%n",&size,&n)==1 && t[n]==0)
44          fi->SetSize(size);
45        t = NEXT_TOKEN;
46        if(!t)
47 @@ -802,7 +805,8 @@ FileInfo *FileInfo::parse_ls_line(const char *line_c,const char *tz)
48     {
49        // it was month, so the previous was size:
50        long long size;
51 -      if(sscanf(group_or_size,"%lld",&size)==1)
52 +      int n;
53 +      if(sscanf(group_or_size,"%lld%n",&size,&n)==1 && group_or_size[n]==0)
54          fi->SetSize(size);
55     }
56  
57 diff --git a/src/buffer_zlib.cc b/src/buffer_zlib.cc
58 index 2ceaee9..ef79e6f 100644
59 --- a/src/buffer_zlib.cc
60 +++ b/src/buffer_zlib.cc
61 @@ -87,5 +87,5 @@ DataInflator::~DataInflator()
62  }
63  void DataInflator::ResetTranslation()
64  {
65 -   z_err = inflateReset2(&z, 16+MAX_WBITS);
66 +   z_err = inflateReset(&z);
67  }
68 diff --git a/src/lftp_tinfo.cc b/src/lftp_tinfo.cc
69 index 714d50d..0368497 100644
70 --- a/src/lftp_tinfo.cc
71 +++ b/src/lftp_tinfo.cc
72 @@ -54,7 +54,8 @@ static void init_terminfo()
73        terminfo_ok = false;
74  #elif defined(HAVE_TGETSTR)
75     static char buf[2048];
76 -   if(tgetent(buf,getenv("TERM")) == -1)
77 +   const char *term=getenv("TERM");
78 +   if(!term || tgetent(buf,term) == -1)
79        terminfo_ok = false;
80  #endif
81  }
82 diff --git a/src/network.cc b/src/network.cc
83 index cbffaac..36fe88e 100644
84 --- a/src/network.cc
85 +++ b/src/network.cc
86 @@ -362,7 +362,7 @@ int Networker::SocketAccept(int fd,sockaddr_u *u,const char *hostname)
87  
88  void Networker::SocketSinglePF(int s,int pf)
89  {
90 -#if INET6
91 +#if INET6 && defined(IPV6_V6ONLY)
92     if(pf==PF_INET6) {
93        int on = 1;
94        if(-1==setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&on, sizeof(on)))
This page took 0.030913 seconds and 4 git commands to generate.