<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="http://blog.teatime.com.tw/styles/rss.css" type="text/css"?>
<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns="http://my.netscape.com/rdf/simple/0.9/"
>

 <channel>
  <title>Tommy 碎碎念</title>
  <link>http://blog.teatime.com.tw/1</link>
  <description>&lt;p&gt;Tommy Wu&#039;s blog&lt;/p&gt;
</description>
 </channel>
    <item>
   <title>奇怪的 pure-ftpd 錯誤: (?@?) [ERROR] Sorry, invalid address given</title>
   <description>&lt;p&gt;今天在辦公室要連回家裡的 ftp 抓些檔案時, 突然發現無法連線的錯誤, 在 FileZilla 會看到連線之後, 出現&amp;nbsp;425 Sorry, invalid address given 的訊息. 找了半天也查不出原因. 不過.... 奇怪的是, 另一台電腦連線回去又可以正常連線. 所以... 看起來不像是 server 的問題, 而是 client 的問題.&lt;/p&gt;&lt;p&gt;不過... 這台不能連的機器, 昨天還可以正常連線, 為什麼今天就不能用呢?&lt;/p&gt;&lt;p&gt;後來在 Google 看到了&lt;a href=&quot;http://blog.obsidianproject.co.uk/2009/10/pure-ftpd-error-sorry-invalid-address.html&quot; target=&quot;_blank&quot;&gt;這篇文章&lt;/a&gt;, 指出 pure-ftpd 在反解 client 的 IP 出錯時, 會出現這個訊息. 依照說明, 加上 -H 參數 (如果用 Debian 系列, 在 /etc/pure-ftpd/conf/DontResolve 加上 yes 就可以了) 之後, 果然可以正常的連線了.&lt;/p&gt;&lt;p&gt;PS. 我記得反查失敗應該還是可以正常使用才對, 畢竟另一台電腦也應該反查不會有任何結果, 而宿舍的 ADSL 也應該一樣, 不過都可以正常連線. 只有今天早上才碰到這問題.... 也許是今天上層的 DNS 有點問題造成的吧.&amp;nbsp;&lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/351</link>
      <pubDate>Mon, 16 Aug 2010 14:24:03 +0800</pubDate>   
  </item>
    <item>
   <title>修正 Pure-ftpd 1.0.22 在使用 TLS 協定時, 下傳檔案續傳不正確的問題.</title>
   <description>&lt;p&gt;一個多月之前, &lt;a href=&quot;http://www.pureftpd.org/project/pure-ftpd/&quot; target=&quot;_blank&quot;&gt;Pure-ftpd&lt;/a&gt; 推出了新的 1.0.22&amp;nbsp;版,&amp;nbsp;對我來說,&amp;nbsp;其中最重大的改變就是支援在 TLS/SSL&amp;nbsp;時也對傳送的資料加密.&amp;nbsp;所以...&amp;nbsp;我馬上就裝起來用了.&amp;nbsp;不過... 隔天確發現下載的檔案都有問題,&amp;nbsp;不過我試了幾個小檔案,&amp;nbsp;發現又很正常.&amp;nbsp;後來想到這兒的網路狀況有點不好,&amp;nbsp;或許是斷線後續傳造成的, 再測試一下, 果然經過續傳後, 檔案大小在傳送後就不一樣了.&lt;/p&gt;&lt;p&gt;改了一下, 寫了一些 log, 發現在使用 TLS/SSL 下傳檔案時, 是透過 mmap_send() 去處理, 而一般的情形是用 sendfile_send() 來處理. 而且在 sendfile_send() 裡頭, 是這樣處理續傳位置的:&lt;/p&gt;&lt;pre class=&quot;c&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;&lt;span class=&quot;co2&quot;&gt;#ifndef SENDFILE_NONE&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; sendfile_send&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; f, &lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; stat st, &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;started&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    off_t left;&lt;br /&gt;    off_t o;&lt;br /&gt;&lt;span class=&quot;co2&quot;&gt;# ifdef THROTTLING&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; ended;&lt;br /&gt;    off_t transmitted &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;co2&quot;&gt;# endif&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;    o &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; restartat;&lt;br /&gt;    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;o &amp;lt; st.&lt;span class=&quot;me1&quot;&gt;st_size&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;但是在 mmap_send() 中是:&lt;/p&gt;&lt;pre class=&quot;c&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; mmap_send&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; f, &lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; stat st, &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;started&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    off_t s;&lt;br /&gt;    off_t skip;&lt;br /&gt;    off_t o;&lt;br /&gt;    &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;p, &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;buf;&lt;br /&gt;    off_t left;&lt;br /&gt;&lt;span class=&quot;co2&quot;&gt;# ifdef THROTTLING&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; ended;&lt;br /&gt;    off_t transmitted &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;co2&quot;&gt;# endif&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;    o &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; restartat &lt;span class=&quot;sy0&quot;&gt;&amp;amp;&lt;/span&gt; ~&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;map_size &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;    skip &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; restartat &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt; o;&lt;br /&gt;    &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;o &amp;lt; st.&lt;span class=&quot;me1&quot;&gt;st_size&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;至少在我家的 Debian 伺服器上頭, 上頭的運作是不正常的. 所以我就改了一下:&lt;/p&gt;&lt;pre class=&quot;c&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; mmap_send&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; f, &lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; stat st, &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;started&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    off_t s;&lt;br /&gt;    off_t skip;&lt;br /&gt;    off_t o;&lt;br /&gt;    &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;p, &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt;buf;&lt;br /&gt;    off_t left;&lt;br /&gt;&lt;span class=&quot;co2&quot;&gt;# ifdef THROTTLING&lt;/span&gt;&lt;br /&gt;    &lt;span class=&quot;kw4&quot;&gt;double&lt;/span&gt; ended;&lt;br /&gt;    off_t transmitted &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;span class=&quot;co2&quot;&gt;# endif&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class=&quot;co1&quot;&gt;// twu2 20090523 begin&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;co1&quot;&gt;// why change the restart pos?&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;co1&quot;&gt;//    o = restartat &amp;amp; ~(map_size - 1);&lt;/span&gt;&lt;br /&gt;    o &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; restartat;&lt;br /&gt;&lt;span class=&quot;co1&quot;&gt;// twu2 20090523 end&lt;/span&gt;&lt;br /&gt;    skip &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; restartat &lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt; o;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;直接就使用 restartat 的值, 這樣子處理之後, 至少在 Debian 裡頭是正常的.&lt;/p&gt;&lt;p&gt;這個 patch 的內容如下:&lt;/p&gt;&lt;pre class=&quot;diff&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur src.orig/ftpd.c src/ftpd.c&lt;br /&gt;&lt;span class=&quot;re3&quot;&gt;--- src.orig/ftpd.c     &lt;span class=&quot;nu0&quot;&gt;2009&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;-04&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;-26&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;19&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;04.000000000&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+0800&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;re4&quot;&gt;+++ src/ftpd.c  &lt;span class=&quot;nu0&quot;&gt;2009&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;-06&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;-04&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;25.024105416&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+0800&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;re6&quot;&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-3106&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+3106&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt; @@&lt;/span&gt;&lt;br /&gt;     off_t transmitted = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt; # endif&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span class=&quot;re7&quot;&gt;-    o = restartat &amp;amp; ~&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;map_size - &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;re8&quot;&gt;+// twu2 &lt;span class=&quot;nu0&quot;&gt;20090523&lt;/span&gt; begin&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;re8&quot;&gt;+// why change the restart pos?&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;re8&quot;&gt;+//    o = restartat &amp;amp; ~&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;map_size - &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;re8&quot;&gt;+    o = restartat;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;re8&quot;&gt;+// twu2 &lt;span class=&quot;nu0&quot;&gt;20090523&lt;/span&gt; end&lt;/span&gt;&lt;br /&gt;     skip = restartat - o;&lt;br /&gt;     while &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;o &amp;lt; st.st_size&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt; # ifdef FTPWHO&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;檔案可以在這兒抓: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/mypatch/pureftpd_1.0.22_tls_resume.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/pureftpd_1.0.22_tls_resume.patch&lt;/a&gt; &lt;/p&gt;&lt;p&gt;有需要的可能要自行修改. 這個 patch 我也有送給作者.... 不過也許是我的英文太破了, 就如同之前送的 patch 一樣, 都沒有後續的消息, 看起來似乎也不會進到官方的程式中, 至少目前的 snapshot 版本還沒包含這個修正. &lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/326</link>
      <pubDate>Thu, 04 Jun 2009 19:13:32 +0800</pubDate>   
  </item>
    <item>
   <title>FileZilla 3.0.4 keepalive 功能</title>
   <description>&lt;p&gt;在 &lt;a href=&quot;http://filezilla-project.org/&quot; target=&quot;_blank&quot;&gt;FileZilla&lt;/a&gt;  3.0.4 版中, 作者終於加上了 KeepAlive 的功能了. 原本以為, 我另外加上的那個 keepalive patch 就用不到了. 不過... 用了兩天後, 發現... 目前這個版本的 keepalive 還是有些問題.&lt;/p&gt;&lt;p&gt;首先是由於使用的指令的關係, 在 pure-ftpd 中, 仍然會照成斷線. 這個問題比較容易解決, 只要多加一個 STAT 指令, 就可以避免 pure-ftpd 的逾時設計了. 修正如下:&lt;/p&gt;&lt;pre class=&quot;c&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;orig&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;orig&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Tue Nov &lt;span class=&quot;nu0&quot;&gt;27&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;04&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;42&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Tue Nov &lt;span class=&quot;nu0&quot;&gt;27&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;42&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;42&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-4175&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+4175&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Status, _&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Sending keep-alive command&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;   wxString cmd;&lt;br /&gt;-  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; i = rand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt; / &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX + &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; i = rand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; * &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt; / &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX + &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!i&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     cmd = _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;NOOP&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;i == &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-4185&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+4185&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;       cmd = _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;TYPE A&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;i == &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    cmd = _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;STAT&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;     cmd = _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;PWD&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/mypatch/filezilla_3.0.4_keepalive_for_pureftpd.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla_3.0.4_keepalive_for_pureftpd.patch&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;不過, 在加上上頭的 patch 之後, 還是發現有逾時的情形, 因為不好查, 所以, 就在顯示的訊息上頭, 先加上時間, 方便於除錯.&amp;nbsp; 修正如下:&lt;/p&gt;&lt;pre class=&quot;php&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;.orig/src/&lt;span class=&quot;kw2&quot;&gt;interface&lt;/span&gt;/StatusView.cpp filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;/src/&lt;span class=&quot;kw2&quot;&gt;interface&lt;/span&gt;/StatusView.cpp&lt;br /&gt;--- filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;.orig/src/&lt;span class=&quot;kw2&quot;&gt;interface&lt;/span&gt;/StatusView.cpp  Tue Nov &lt;span class=&quot;nu0&quot;&gt;27&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;04&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;42&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;/src/&lt;span class=&quot;kw2&quot;&gt;interface&lt;/span&gt;/StatusView.cpp  Thu Nov &lt;span class=&quot;nu0&quot;&gt;29&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;40&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-151&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+151&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   m_pTextCtrl-&amp;gt;&lt;span class=&quot;me1&quot;&gt;SetDefaultStyle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_attributeCache&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;messagetype&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;.attr&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  wxDateTime now = wxDateTime::&lt;span class=&quot;me2&quot;&gt;Now&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  prefix += now.FormatISOTime&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  prefix += _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   prefix += m_attributeCache&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;messagetype&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;.prefix;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   int lineLength = m_attributeCache&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;messagetype&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;.len + message.Length&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/mypatch/filezilla_3.0.4_add_time_to_message.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla_3.0.4_add_time_to_message.patch&lt;/a&gt;&lt;/p&gt;&lt;p&gt;經過上頭的修正之後, 發現系統在經過 30 分鐘的閒置後, 就停止送出 keepalive 的指令. 看一下程式碼, 果然有個檢查 30 分鐘的地方, 不知道是作者故意的設計, 還是 bug? 到 SourceForge submit  給作者, 看是否是真要如此設計. 在得到答案之前, 當然只好自己弄個 patch 來用. 修正如下:&lt;/p&gt;&lt;pre class=&quot;c&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;orig&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;orig&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Tue Nov &lt;span class=&quot;nu0&quot;&gt;27&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;04&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;42&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ filezilla&lt;span class=&quot;nu0&quot;&gt;-3.0&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;.4&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Nov &lt;span class=&quot;nu0&quot;&gt;29&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;33&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;40&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-4204&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+4204&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_lastCommandCompletionTime.&lt;span class=&quot;me1&quot;&gt;IsValid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;+&lt;span class=&quot;coMULTI&quot;&gt;/*&lt;br /&gt;   wxTimeSpan span = wxDateTime::Now() - m_lastCommandCompletionTime;&lt;br /&gt;   if (span.GetSeconds() &amp;gt;= (60 * 30))&lt;br /&gt;     return;&lt;br /&gt;+*/&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   m_idleTimer.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;30000&lt;/span&gt;, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/mypatch/filezilla_3.0.4_keepalive_after_30_minutes.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla_3.0.4_keepalive_after_30_minutes.patch&lt;/a&gt;&lt;/p&gt;&lt;p&gt;經過上頭的處理之後, 目前看起來運作就正常了. &lt;/p&gt;&lt;p&gt;如果需要 patch 過的執行檔, 請到 &lt;a href=&quot;http://sourceforge.net/projects/filezillapv/&quot; target=&quot;_blank&quot;&gt;FileZillaPV&lt;/a&gt;  專案去下載吧.&amp;nbsp;&lt;/p&gt;&lt;hr width=&quot;100%&quot; size=&quot;2&quot; /&gt;2007/11/30:&amp;nbsp;&lt;p&gt;作者表示, 30 分鐘的限制是故意的設計. 所以... 如果有這種一直連線的需求, 就自己 patch 吧. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/276</link>
      <pubDate>Thu, 29 Nov 2007 13:10:50 +0800</pubDate>   
  </item>
    <item>
   <title>FileZilla 3.0.3 patch for invalid hostname delay problem</title>
   <description>&lt;p&gt;由於前一陣子宿舍的 ADSL 十分的不穩定, 每隔幾分鐘就會斷線一次, 就發現在 &lt;a href=&quot;http://filezilla.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;FileZilla&lt;/a&gt;  3 傳檔的時候, 會因為斷線之後, 無法正確解析出 IP 時, 會馬上再次嘗試連線, 結果在不到一分鐘的時間內, 就達到 FileZilla3 允許設定的 99 次, 然後就會把該檔案放到失敗的 queue 當中, 不會再傳送了. 如果這時不小心把程式關了, 該檔案就消失在 queue 裡頭了.&lt;/p&gt;&lt;p&gt;不過, 自從九月的時候, 反應&lt;a href=&quot;http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=1795505&amp;amp;group_id=21558&amp;amp;atid=887596&quot; target=&quot;_blank&quot;&gt;這個問題&lt;/a&gt;到現在, 仍然沒有解決. 在昨天 3.0.3 推出後, 就順便處理一下, 看起來似乎是可以正常使用.&lt;/p&gt;&lt;p&gt;這個修正如下:&lt;/p&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur Filezilla3/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Nov  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;07&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Nov  &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-219&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+219&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pCurrentCommand-&amp;gt;GetId&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; == cmd_connect&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;-      &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;nErrorCode &amp;amp; ~&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED | FZ_REPLY_TIMEOUT&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;amp;&amp;amp; &lt;br /&gt;-        nErrorCode &amp;amp; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;+      &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pEventHandler-&amp;gt;IsKindOf&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CLASSINFO&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxFrame&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;+        !&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;nErrorCode &amp;amp; ~&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED | FZ_REPLY_TIMEOUT | FZ_REPLY_CRITICALERROR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;+        nErrorCode &amp;amp; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED | FZ_REPLY_CRITICALERROR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; ||&lt;br /&gt;+        &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;nErrorCode &amp;amp; ~&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED | FZ_REPLY_TIMEOUT&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;amp;&amp;amp; &lt;br /&gt;+        nErrorCode &amp;amp; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;amp;&amp;amp;&lt;br /&gt;         m_retryCount &amp;lt; m_pOptions-&amp;gt;GetOptionVal&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_RECONNECTCOUNT&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;       &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;         m_retryCount++;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/mypatch/filezilla_3.0.3_delay_for_invalid_hostname.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla_3.0.3_delay_for_invalid_hostname.patch&lt;/a&gt;&lt;/p&gt;&lt;p&gt;至於使用這個 patch 的執行檔, 請到 &lt;a href=&quot;http://sourceforge.net/projects/filezillapv/&quot; target=&quot;_blank&quot;&gt;FileZillaPV&lt;/a&gt;  去抓吧.&amp;nbsp;&lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/270</link>
      <pubDate>Thu, 08 Nov 2007 16:26:11 +0800</pubDate>   
  </item>
    <item>
   <title>KeepAlive patch (version 3) for FileZilla 3.0.1</title>
   <description>&lt;p&gt;修改之前的版本, 加上 QuickConnect 的處理.&lt;/p&gt;&lt;p&gt;修正如下:&lt;/p&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur Filezilla3/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-115&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+115&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CChmodCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_NOTSUPPORTED; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; Connected&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// If m_pCurrentOpData is zero, this function returns the current command&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// from the engine.&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;enum&lt;/span&gt; Command GetCurrentCommandId&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-70&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+70&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_chmod:&lt;br /&gt;     res = Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;reinterpret_cast&amp;lt;const CChmodCommand&amp;amp;&amp;gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_keepalive:&lt;br /&gt;+    res = KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;reinterpret_cast&amp;lt;const CKeepAliveCommand &amp;amp;&amp;gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;default&lt;/span&gt;:&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_SYNTAXERROR;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/engine/commands.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/commands.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/commands.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/commands.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_Server;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+CKeepAliveCommand::&lt;span class=&quot;me2&quot;&gt;CKeepAliveCommand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive &lt;span class=&quot;coMULTI&quot;&gt;/*=true*/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    : m_keepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;keepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CKeepAliveCommand::&lt;span class=&quot;me2&quot;&gt;IsKeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_keepAlive;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt; CListCommand::&lt;span class=&quot;me2&quot;&gt;CListCommand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; refresh &lt;span class=&quot;coMULTI&quot;&gt;/*=false*/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   : m_refresh&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;refresh&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-525&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+525&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_pControlSocket-&amp;gt;Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFileZillaEnginePrivate::&lt;span class=&quot;me2&quot;&gt;KeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  m_pCurrentCommand = command.&lt;span class=&quot;me1&quot;&gt;Clone&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_pControlSocket-&amp;gt;KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CFileZillaEnginePrivate::&lt;span class=&quot;me2&quot;&gt;SendDirectoryListingNotification&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; onList, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; modified, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; failed&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   wxASSERT&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pControlSocket&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt; @@&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#define LOGON_CUSTOMCOMMANDS 10&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#define LOGON_DONE    11&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+&lt;span class=&quot;co2&quot;&gt;#define KEEPALIVE_TIMER_ID wxID_HIGHEST + 5&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt; BEGIN_EVENT_TABLE&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CFtpControlSocket, CRealControlSocket&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; EVT_FZ_EXTERNALIPRESOLVE&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxID_ANY, CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;OnExternalIPAddress&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+EVT_TIMER&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxID_ANY, CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;OnTimer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; END_EVENT_TABLE&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; CRawTransferOpData::&lt;span class=&quot;me2&quot;&gt;CRawTransferOpData&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-137&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+140&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;   m_pTlsSocket = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;   m_protectDataChannel = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;   m_lastTypeBinary = &lt;span class=&quot;nu0&quot;&gt;-1&lt;/span&gt;;&lt;br /&gt;+  m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;+  m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;SetOwner&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, KEEPALIVE_TIMER_ID&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; CFtpControlSocket::~CFtpControlSocket&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-147&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+152&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; @@&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::OnReceive()&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  m_keepAliveStopWatch.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   m_pBackend-&amp;gt;Read&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_receiveBuffer + m_bufferLen, RECVBUFFERSIZE - m_bufferLen&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;-  &lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pBackend-&amp;gt;Error&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pBackend-&amp;gt;LastError&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; != wxSOCKET_WOULDBLOCK&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;       LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;::&lt;span class=&quot;me2&quot;&gt;Error&lt;/span&gt;, _&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Disconnected from server&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;       DoClose&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-344&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+353&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_repliesToSkip&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    SetWait&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Info, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Skipping reply after cancelled operation.&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_Response&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; != &lt;span class=&quot;st0&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;       m_repliesToSkip--;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-798&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+808&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;     LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;::&lt;span class=&quot;me2&quot;&gt;Error&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Failed to convert command to 8 bit charset&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  m_keepAliveStopWatch.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; len = &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;strlen&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;buffer&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; res = CRealControlSocket::&lt;span class=&quot;me2&quot;&gt;Send&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;buffer, len&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;res&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-3006&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+3017&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;75&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_WOULDBLOCK;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;KeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::KeepAlive&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command.&lt;span class=&quot;me1&quot;&gt;IsKeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_bEnableKeepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+      &lt;span class=&quot;co1&quot;&gt;// read keepalive option here&lt;/span&gt;&lt;br /&gt;+      &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; min_wait = &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; max_wait = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; waitsecond = min_wait + &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;max_wait - min_wait&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX&lt;span class=&quot;nu0&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;waitsecond * &lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_bEnableKeepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+  m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;DoKeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::DoKeepAlive&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// ignore keepalive for last I/O for socket less than 15 seconds&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_keepAliveStopWatch.&lt;span class=&quot;kw3&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;lt; &lt;span class=&quot;nu0&quot;&gt;15000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// choose any command&lt;/span&gt;&lt;br /&gt;+  wxString commands&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;PWD&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;,_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;REST 0&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;NOOP&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;STAT&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; choice=&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;*&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX&lt;span class=&quot;nu0&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  m_repliesToSkip++;&lt;br /&gt;+  Send&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;commands&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;choice&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;OnTimer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxTimerEvent&amp;amp; event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;event.&lt;span class=&quot;me1&quot;&gt;GetId&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; == KEEPALIVE_TIMER_ID&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;IsRunning&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_bEnableKeepAlive &amp;amp;&amp;amp; IsConnected&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+        &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+        &lt;span class=&quot;co1&quot;&gt;// need to read the values from options...&lt;/span&gt;&lt;br /&gt;+        &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; min_wait = &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;;&lt;br /&gt;+        &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; max_wait = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+        &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; waitsecond = min_wait + &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;max_wait - min_wait&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX&lt;span class=&quot;nu0&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;waitsecond * &lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        DoKeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;+    CControlSocket::&lt;span class=&quot;me2&quot;&gt;OnTimer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;IsMisleadingListResponse&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;   &lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; m_bEnableKeepAlive;&lt;br /&gt;+  wxTimer m_keepAliveTimer;&lt;br /&gt;+  wxStopWatch m_keepAliveStopWatch;&lt;br /&gt;+  &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; DoKeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; nErrorCode&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer &amp;amp;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-128&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+134&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   DECLARE_EVENT_TABLE&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; OnExternalIPAddress&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;fzExternalIPResolveEvent&amp;amp; event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; OnTimer&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxTimerEvent&amp;amp; event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; CIOThread;&lt;br /&gt;diff -Nur Filezilla3/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-19&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+19&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   cmd_rename,&lt;br /&gt;   cmd_chmod,&lt;br /&gt;   cmd_raw,&lt;br /&gt;+  cmd_keepalive,&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// Only used internally&lt;/span&gt;&lt;br /&gt;   cmd_cwd,&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-74&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+75&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer GetServer&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;   CServer m_Server;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+DECLARE_COMMAND&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CKeepAliveCommand, cmd_keepalive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  CKeepAliveCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; IsKeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; m_keepAlive;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; DECLARE_COMMAND&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CDisconnectCommand, cmd_disconnect&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-69&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+69&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Mkdir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CMkdirCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;Rename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CRenameCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CChmodCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; ContinueConnect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;diff -Nur Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;08&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;09&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-932&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+932&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   CServerPath path;&lt;br /&gt;   path.&lt;span class=&quot;me1&quot;&gt;SetSafePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_LASTSERVERPATH&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;-  m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;, path&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// read keepalive from option&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+  m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;, keepAlive, path&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CMainFrame::&lt;span class=&quot;me2&quot;&gt;OnRefresh&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxCommandEvent &amp;amp;event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-1456&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+1459&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; @@&lt;br /&gt;       &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;-  m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;, pData-&amp;gt;m_remoteDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// read keepalive from option&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+  m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;, keepAlive, pData-&amp;gt;m_remoteDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_localDir != _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     m_pState-&amp;gt;SetLocalDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_localDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/interface/quickconnectbar.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/quickconnectbar.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/quickconnectbar.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;08&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/quickconnectbar.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;09&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-108&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+108&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;-  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// read keepalive from option&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;, keepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   CRecentServerList::&lt;span class=&quot;me2&quot;&gt;SetMostRecentServer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/interface/state.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/state.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/state.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;08&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/state.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;09&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-259&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+259&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   NotifyHandlers&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;STATECHANGE_APPLYFILTER&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;-&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CState::&lt;span class=&quot;me2&quot;&gt;Connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer&amp;amp; server, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; askBreak, &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path &lt;span class=&quot;coMULTI&quot;&gt;/*=CServerPath()*/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CState::&lt;span class=&quot;me2&quot;&gt;Connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer&amp;amp; server, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; askBreak, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive &lt;span class=&quot;coMULTI&quot;&gt;/*=false*/&lt;/span&gt;, &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path &lt;span class=&quot;coMULTI&quot;&gt;/*=CServerPath()*/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pEngine&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-273&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+273&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   m_pCommandQueue-&amp;gt;ProcessCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CConnectCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pCommandQueue-&amp;gt;ProcessCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CListCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;path&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;keepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    m_pCommandQueue-&amp;gt;ProcessCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CKeepAliveCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;   COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;SetLastServer&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;SetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_LASTSERVERPATH, path.&lt;span class=&quot;me1&quot;&gt;GetSafePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/interface/state.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/state.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/state.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;08&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/state.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;22&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;09&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-40&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+40&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; LocalDirHasParent&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; wxString&amp;amp; dir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; LocalDirIsWriteable&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; wxString&amp;amp; dir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;-  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer&amp;amp; server, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; askBreak, &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path = CServerPath&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer&amp;amp; server, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; askBreak, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;, &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path = CServerPath&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; SetRemoteDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CDirectoryListing *m_pDirectoryListing, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; modified = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CDirectoryListing *GetRemoteDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/%7Etommy/mypatch/filezilla3_keepalive.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla3_keepalive.patch&lt;/a&gt; &lt;a href=&quot;http://www.teatime.com.tw/%7Etommy/mypatch/filezilla3_keepalive.patch&quot; target=&quot;_blank&quot;&gt; &lt;/a&gt; &lt;br /&gt;製作出來的 Windows 執行檔可以由這兒抓: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/files/filezilla/filezilla301.7z&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/files/filezilla/filezilla301.7z&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;有需要的就自己抓回去用吧. &lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/266</link>
      <pubDate>Mon, 24 Sep 2007 22:50:57 +0800</pubDate>   
  </item>
    <item>
   <title>在 FileZilla3 的視窗標題顯示連線的伺服器</title>
   <description>&lt;p&gt;由於公司內有好幾台伺服器的常用路徑都一樣, 所以在使用 FileZilla 時, 常常忘了同前連線的是那一個伺服器, 就想到是否可以把目前連線的伺服器給顯示在程式的標題上頭, 也因此就產生的這樣的一個 patch 了.這個 patch 如下:&lt;/p&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;26&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;58&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-911&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+911&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  SetLabel&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;FileZilla&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   CServer server;&lt;br /&gt;   event.&lt;span class=&quot;me1&quot;&gt;Enable&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetLastServer&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-930&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+932&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;       &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  SetLabel&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;FileZilla - &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; + server.&lt;span class=&quot;me1&quot;&gt;FormatServer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   CServerPath path;&lt;br /&gt;   path.&lt;span class=&quot;me1&quot;&gt;SetSafePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_LASTSERVERPATH&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;, path&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-1455&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+1459&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!CLoginManager::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;GetPassword&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_server, &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;, pData-&amp;gt;m_name&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;       &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+  SetLabel&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;FileZilla - &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; + pData-&amp;gt;m_server.&lt;span class=&quot;me1&quot;&gt;FormatServer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;, pData-&amp;gt;m_remoteDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;diff -Nur Filezilla3/src/interface/quickconnectbar.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/quickconnectbar.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/quickconnectbar.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;49&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;26&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/quickconnectbar.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Sep &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;46&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-108&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+108&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;GetParent&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; != &lt;span class=&quot;kw2&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    GetParent&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;SetLabel&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;FileZilla - &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; + server.&lt;span class=&quot;me1&quot;&gt;FormatServer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/mypatch/filezilla3_title_show_server.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla3_title_show_server.patch&lt;/a&gt; &lt;br /&gt;製作出來的 Windows 執行檔可以由這兒抓: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/files/filezilla/filezilla301.7z&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/files/filezilla/filezilla301.7z&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;hr width=&quot;100%&quot; size=&quot;2&quot; /&gt;2007/09/24:&amp;nbsp;&lt;p&gt;加上對於 QuickConnect 的處理.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/265</link>
      <pubDate>Mon, 24 Sep 2007 14:02:38 +0800</pubDate>   
  </item>
    <item>
   <title>KeepAlive patch (version 2) for FileZilla 3</title>
   <description>&lt;p&gt;&lt;a href=&quot;http://blog.teatime.com.tw/1/post/261&quot; target=&quot;_blank&quot;&gt;昨天的 patch&lt;/a&gt;  被作者給 reject 了. 因為他認為把 timer 放到主視窗中,&amp;nbsp; 在執行 keepalive 指令時, 會 block UI 的操作 (不過, 就算不放在這兒, 本來在送出指令時, 一定會影響到其他指令的執行啊?), 另外就是送出 TYPE I 與 TYPE A 指令, 因為原本的程式內有記錄目前的狀態, 可能會造成錯誤. 所以就暫時不接受這個 patch. 所以改了一下, 做了第二版的 patch, 把 timer 移出 MainFrm, 放到 CFtpControlSocket 裡頭, 並修改 keepalive 會送出的指令, 去除 TYPE I/TYPE A, 然後加上 NOOP/STAT/MKD/RMD 等指令. 因為 MKD/RMD 等指令沒有參數, 會回傳 5xx 的錯誤 (其他的指令如果 server 沒支援, 也應該是回傳 5xx), 所以在處理 keepalive 時, 也順便忽略所有的 5xx 錯誤碼.&lt;/p&gt;&lt;p&gt;這個修正如下: &lt;/p&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur Filezilla3/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;33&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;42&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-115&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+115&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CChmodCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_NOTSUPPORTED; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; Connected&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// If m_pCurrentOpData is zero, this function returns the current command&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// from the engine.&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;enum&lt;/span&gt; Command GetCurrentCommandId&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;35&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-70&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+70&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_chmod:&lt;br /&gt;     res = Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;reinterpret_cast&amp;lt;const CChmodCommand&amp;amp;&amp;gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_keepalive:&lt;br /&gt;+    res = KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;reinterpret_cast&amp;lt;const CKeepAliveCommand &amp;amp;&amp;gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;default&lt;/span&gt;:&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_SYNTAXERROR;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/engine/commands.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/commands.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/commands.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;35&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/commands.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;57&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+10&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_Server;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+CKeepAliveCommand::&lt;span class=&quot;me2&quot;&gt;CKeepAliveCommand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive &lt;span class=&quot;coMULTI&quot;&gt;/*=true*/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    : m_keepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;keepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CKeepAliveCommand::&lt;span class=&quot;me2&quot;&gt;IsKeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_keepAlive;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt; CListCommand::&lt;span class=&quot;me2&quot;&gt;CListCommand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; refresh &lt;span class=&quot;coMULTI&quot;&gt;/*=false*/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   : m_refresh&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;refresh&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;35&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;05&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-525&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+525&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_pControlSocket-&amp;gt;Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFileZillaEnginePrivate::&lt;span class=&quot;me2&quot;&gt;KeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  m_pCurrentCommand = command.&lt;span class=&quot;me1&quot;&gt;Clone&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_pControlSocket-&amp;gt;KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CFileZillaEnginePrivate::&lt;span class=&quot;me2&quot;&gt;SendDirectoryListingNotification&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; onList, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; modified, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; failed&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   wxASSERT&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pControlSocket&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;35&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt; @@&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#define LOGON_CUSTOMCOMMANDS 10&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#define LOGON_DONE    11&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+&lt;span class=&quot;co2&quot;&gt;#define KEEPALIVE_TIMER_ID wxID_HIGHEST + 5&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt; BEGIN_EVENT_TABLE&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CFtpControlSocket, CRealControlSocket&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; EVT_FZ_EXTERNALIPRESOLVE&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxID_ANY, CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;OnExternalIPAddress&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+EVT_TIMER&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxID_ANY, CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;OnTimer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; END_EVENT_TABLE&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; CRawTransferOpData::&lt;span class=&quot;me2&quot;&gt;CRawTransferOpData&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-137&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+140&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;   m_pTlsSocket = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;   m_protectDataChannel = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;   m_lastTypeBinary = &lt;span class=&quot;nu0&quot;&gt;-1&lt;/span&gt;;&lt;br /&gt;+  m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;+  m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;SetOwner&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, KEEPALIVE_TIMER_ID&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; CFtpControlSocket::~CFtpControlSocket&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-147&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+152&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; @@&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::OnReceive()&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  m_keepAliveStopWatch.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   m_pBackend-&amp;gt;Read&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_receiveBuffer + m_bufferLen, RECVBUFFERSIZE - m_bufferLen&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pBackend-&amp;gt;Error&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pBackend-&amp;gt;LastError&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; != wxSOCKET_WOULDBLOCK&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;       LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;::&lt;span class=&quot;me2&quot;&gt;Error&lt;/span&gt;, _&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Disconnected from server&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;       DoClose&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-386&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+395&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_rawtransfer:&lt;br /&gt;     TransferParseResponse&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_keepalive:&lt;br /&gt;+    KeepAliveParseResponse&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_none:&lt;br /&gt;     LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Out-of-order reply, ignoring.&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-798&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+810&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;     LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;::&lt;span class=&quot;me2&quot;&gt;Error&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Failed to convert command to 8 bit charset&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  m_keepAliveStopWatch.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; len = &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;strlen&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;buffer&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; res = CRealControlSocket::&lt;span class=&quot;me2&quot;&gt;Send&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;buffer, len&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;res&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-1254&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+1267&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; DeleteSend&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;prevResult&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_removedir:&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; RemoveDirSend&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;prevResult&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_keepalive:&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; KeepAliveSend&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;default&lt;/span&gt;:&lt;br /&gt;     LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;__TFILE__, __LINE__, &lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, ::&lt;span class=&quot;me2&quot;&gt;Debug_Warning&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Unknown opID (%d) in SendNextCommand&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, m_pCurOpData-&amp;gt;opId&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_INTERNALERROR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-3006&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+3021&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;126&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_WOULDBLOCK;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; CKeepAliveOpData : &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; COpData&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;:&lt;br /&gt;+  CKeepAliveOpData&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; wxString&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    : COpData&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;cmd_keepalive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    m_command = command;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+  wxString m_command;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;KeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::KeepAlive&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command.&lt;span class=&quot;me1&quot;&gt;IsKeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_bEnableKeepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+      &lt;span class=&quot;co1&quot;&gt;// read keepalive option here&lt;/span&gt;&lt;br /&gt;+      &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; min_wait = &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; max_wait = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; waitsecond = min_wait + &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;max_wait - min_wait&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX&lt;span class=&quot;nu0&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;waitsecond * &lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_bEnableKeepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+  m_bEnableKeepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;DoKeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::DoKeepAlive&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// ignore keepalive for last I/O for socket less than 15 seconds&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_keepAliveStopWatch.&lt;span class=&quot;kw3&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;lt; &lt;span class=&quot;nu0&quot;&gt;15000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// choose any command&lt;/span&gt;&lt;br /&gt;+  wxString commands&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;PWD&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;,_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;REST 0&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;NOOP&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;STAT&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;RMD&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;MKD&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; choice=&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;*&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX&lt;span class=&quot;nu0&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  m_pCurOpData = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CKeepAliveOpData&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;commands&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;choice&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; SendNextCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;KeepAliveSend&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::KeepAliveSend&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pCurOpData&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;__TFILE__, __LINE__, &lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, Debug_Info, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Empty m_pCurOpData&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_INTERNALERROR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_ERROR;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+  CDirectoryCache cache;&lt;br /&gt;+  cache.&lt;span class=&quot;me1&quot;&gt;InvalidateServer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;*m_pCurrentServer&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  m_CurrentPath = CServerPath&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  CKeepAliveOpData *pData = static_cast&amp;lt;CKeepAliveOpData *&amp;gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pCurOpData&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!Send&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_ERROR;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_WOULDBLOCK;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;KeepAliveParseResponse&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::KeepAliveParseResponse&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; code = GetReplyCode&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;code == &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt; || code == &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt; || code == &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_OK&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_ERROR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_ERROR;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;OnTimer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxTimerEvent&amp;amp; event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;event.&lt;span class=&quot;me1&quot;&gt;GetId&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; == KEEPALIVE_TIMER_ID&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;IsRunning&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_bEnableKeepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+        &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+        &lt;span class=&quot;co1&quot;&gt;// need to read the values from options...&lt;/span&gt;&lt;br /&gt;+        &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; min_wait = &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;;&lt;br /&gt;+        &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; max_wait = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+        &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; waitsecond = min_wait + &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;max_wait - min_wait&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX&lt;span class=&quot;nu0&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;waitsecond * &lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        DoKeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;+    CControlSocket::&lt;span class=&quot;me2&quot;&gt;OnTimer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;IsMisleadingListResponse&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;33&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;55&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;33&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;   &lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; m_bEnableKeepAlive;&lt;br /&gt;+  wxTimer m_keepAliveTimer;&lt;br /&gt;+  wxStopWatch m_keepAliveStopWatch;&lt;br /&gt;+  &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; DoKeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAliveParseResponse&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAliveSend&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; nErrorCode&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer &amp;amp;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-128&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+136&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   DECLARE_EVENT_TABLE&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; OnExternalIPAddress&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;fzExternalIPResolveEvent&amp;amp; event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; OnTimer&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxTimerEvent&amp;amp; event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; CIOThread;&lt;br /&gt;diff -Nur Filezilla3/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;39&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-19&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+19&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   cmd_rename,&lt;br /&gt;   cmd_chmod,&lt;br /&gt;   cmd_raw,&lt;br /&gt;+  cmd_keepalive,&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// Only used internally&lt;/span&gt;&lt;br /&gt;   cmd_cwd,&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-74&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+75&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer GetServer&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;   CServer m_Server;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+DECLARE_COMMAND&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CKeepAliveCommand, cmd_keepalive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  CKeepAliveCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; IsKeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; m_keepAlive;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; DECLARE_COMMAND&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CDisconnectCommand, cmd_disconnect&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;39&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;27&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-69&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+69&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Mkdir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CMkdirCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;Rename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CRenameCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CChmodCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; ContinueConnect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;diff -Nur Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;57&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;02&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-825&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+825&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   CServerPath path;&lt;br /&gt;   path.&lt;span class=&quot;me1&quot;&gt;SetSafePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_LASTSERVERPATH&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;-  m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;, path&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// read keepalive from option&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+  m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;, path, keepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CMainFrame::&lt;span class=&quot;me2&quot;&gt;OnRefresh&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxCommandEvent &amp;amp;event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-1341&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+1344&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; @@&lt;br /&gt;       &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;-  m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;, pData-&amp;gt;m_remoteDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// read keepalive from option&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;+  m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;, pData-&amp;gt;m_remoteDir, keepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_localDir != _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     m_pState-&amp;gt;SetLocalDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_localDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/interface/state.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/state.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/state.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/state.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;57&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-247&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+247&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   NotifyHandlers&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;STATECHANGE_APPLYFILTER&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;-&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CState::&lt;span class=&quot;me2&quot;&gt;Connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer&amp;amp; server, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; askBreak, &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path &lt;span class=&quot;coMULTI&quot;&gt;/*=CServerPath()*/&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CState::&lt;span class=&quot;me2&quot;&gt;Connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer&amp;amp; server, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; askBreak, &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path &lt;span class=&quot;coMULTI&quot;&gt;/*=CServerPath()*/&lt;/span&gt;, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pEngine&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-261&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+261&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   m_pCommandQueue-&amp;gt;ProcessCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CConnectCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pCommandQueue-&amp;gt;ProcessCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CListCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;path&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;keepAlive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    m_pCommandQueue-&amp;gt;ProcessCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CKeepAliveCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;   COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;SetLastServer&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;SetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_LASTSERVERPATH, path.&lt;span class=&quot;me1&quot;&gt;GetSafePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/interface/state.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/state.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/state.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;54&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;43&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/state.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Thu Aug &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;57&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-40&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+40&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; LocalDirHasParent&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; wxString&amp;amp; dir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; LocalDirIsWriteable&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; wxString&amp;amp; dir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;-  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer&amp;amp; server, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; askBreak, &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path = CServerPath&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer&amp;amp; server, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; askBreak, &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path = CServerPath&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; keepAlive = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; SetRemoteDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CDirectoryListing *m_pDirectoryListing, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; modified = &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CDirectoryListing *GetRemoteDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/%7Etommy/mypatch/filezilla3_rc1_keepalive2.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla3_rc1_keepalive2.patch&lt;/a&gt; &lt;br /&gt;製作出來的 Windows 執行檔可以由這兒抓: &lt;a href=&quot;http://www.teatime.com.tw/%7Etommy/files/filezilla/filezilla3_rc1.7z&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/files/filezilla/filezilla3_rc1.7z&lt;/a&gt; &lt;/p&gt;&lt;p&gt;有需要的就自己抓回去用吧. &lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/262</link>
      <pubDate>Thu, 16 Aug 2007 13:17:16 +0800</pubDate>   
  </item>
    <item>
   <title>KeepAlive patch for FileZilla3</title>
   <description>&lt;p&gt;在 &lt;a href=&quot;http://filezilla.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;FileZilla&lt;/a&gt;  3 rc1 裡頭, sftp 似乎原本就有 keepalive 的功能, 但是在 FTP 裡頭, 這個功能並不存在. 所以當 FTP 連線過一段時間後, 會發現目前的連線就因為 timeout 而中斷了. 如果要使用就必須重新連線. 不知道為什麼作者一直不把這個在 FileZilla 2 就提供的功能, 實作到 FileZilla 3? 這兩天因為看了 FileZilla 3 的 source code, 就順便加上這個功能.&lt;/p&gt;&lt;p&gt;這個 patch 內容如下:&lt;/p&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur Filezilla3/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ControlSocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;19&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-115&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+115&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CChmodCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_NOTSUPPORTED; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; Connected&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// If m_pCurrentOpData is zero, this function returns the current command&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// from the engine.&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;enum&lt;/span&gt; Command GetCurrentCommandId&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;52&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/FileZillaEngine.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;34&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;45&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-70&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+70&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_chmod:&lt;br /&gt;     res = Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;reinterpret_cast&amp;lt;const CChmodCommand&amp;amp;&amp;gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_keepalive:&lt;br /&gt;+    res = KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;reinterpret_cast&amp;lt;const CKeepAliveCommand &amp;amp;&amp;gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;default&lt;/span&gt;:&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_SYNTAXERROR;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;52&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/engineprivate.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;35&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-525&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+525&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;18&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_pControlSocket-&amp;gt;Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFileZillaEnginePrivate::&lt;span class=&quot;me2&quot;&gt;KeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!IsConnected&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_NOTCONNECTED;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;IsBusy&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_BUSY;&lt;br /&gt;+&lt;br /&gt;+  m_pCurrentCommand = command.&lt;span class=&quot;me1&quot;&gt;Clone&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; m_pControlSocket-&amp;gt;KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CFileZillaEnginePrivate::&lt;span class=&quot;me2&quot;&gt;SendDirectoryListingNotification&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServerPath&amp;amp; path, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; onList, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; modified, &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; failed&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   wxASSERT&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pControlSocket&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;52&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;38&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;08&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-147&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+147&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::OnReceive()&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  m_stopWatch.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   m_pBackend-&amp;gt;Read&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_receiveBuffer + m_bufferLen, RECVBUFFERSIZE - m_bufferLen&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pBackend-&amp;gt;Error&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-386&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+388&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_rawtransfer:&lt;br /&gt;     TransferParseResponse&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_keepalive:&lt;br /&gt;+    KeepAliveParseResponse&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_none:&lt;br /&gt;     LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Out-of-order reply, ignoring.&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw2&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-798&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+803&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;     LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;::&lt;span class=&quot;me2&quot;&gt;Error&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Failed to convert command to 8 bit charset&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  m_stopWatch.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; len = &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;strlen&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;buffer&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; res = CRealControlSocket::&lt;span class=&quot;me2&quot;&gt;Send&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;buffer, len&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;res&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-1254&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+1260&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; DeleteSend&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;prevResult&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_removedir:&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; RemoveDirSend&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;prevResult&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;case&lt;/span&gt; cmd_keepalive:&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; KeepAliveSend&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;default&lt;/span&gt;:&lt;br /&gt;     LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;__TFILE__, __LINE__, &lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, ::&lt;span class=&quot;me2&quot;&gt;Debug_Warning&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Unknown opID (%d) in SendNextCommand&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, m_pCurOpData-&amp;gt;opId&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_INTERNALERROR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-3007&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+3015&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;74&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_WOULDBLOCK;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw2&quot;&gt;class&lt;/span&gt; CKeepAliveOpData : &lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt; COpData&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;kw2&quot;&gt;public&lt;/span&gt;:&lt;br /&gt;+  CKeepAliveOpData&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; wxString&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    : COpData&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;cmd_keepalive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    m_command = command;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+  wxString m_command;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;KeepAlive&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::KeepAlive&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// ignore keepalive for last I/O for socket less than 15 seconds&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_stopWatch.&lt;span class=&quot;kw3&quot;&gt;Time&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &amp;lt; &lt;span class=&quot;nu0&quot;&gt;15000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// choose any command&lt;/span&gt;&lt;br /&gt;+  wxString commands&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;PWD&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;,_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;REST 0&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;TYPE A&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;TYPE I&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; choice=&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;*&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX&lt;span class=&quot;nu0&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  m_pCurOpData = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CKeepAliveOpData&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;commands&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;choice&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; SendNextCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;KeepAliveSend&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::KeepAliveSend&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pCurOpData&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;__TFILE__, __LINE__, &lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, Debug_Info, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;Empty m_pCurOpData&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_INTERNALERROR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_ERROR;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+  CDirectoryCache cache;&lt;br /&gt;+  cache.&lt;span class=&quot;me1&quot;&gt;InvalidateServer&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;*m_pCurrentServer&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  m_CurrentPath = CServerPath&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  CKeepAliveOpData *pData = static_cast&amp;lt;CKeepAliveOpData *&amp;gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pCurOpData&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!Send&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_ERROR;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_WOULDBLOCK;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;+&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;KeepAliveParseResponse&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  LogMessage&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;Debug_Verbose, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;CFtpControlSocket::KeepAliveParseResponse&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; code = GetReplyCode&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;code == &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt; || code == &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_OK&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_OK;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;FZ_REPLY_ERROR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; FZ_REPLY_ERROR;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; CFtpControlSocket::&lt;span class=&quot;me2&quot;&gt;IsMisleadingListResponse&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;diff -Nur Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;50&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/engine/ftpcontrolsocket.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+24&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;   &lt;br /&gt;+  wxStopWatch m_stopWatch;&lt;br /&gt;+  &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAliveParseResponse&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAliveSend&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; ResetOperation&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; nErrorCode&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CServer &amp;amp;server&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;37&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/commands.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;07&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-19&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+19&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   cmd_rename,&lt;br /&gt;   cmd_chmod,&lt;br /&gt;   cmd_raw,&lt;br /&gt;+  cmd_keepalive,&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// Only used internally&lt;/span&gt;&lt;br /&gt;   cmd_cwd,&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-76&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+77&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;   CServer m_Server;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+DECLARE_COMMAND&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CKeepAliveCommand, cmd_keepalive&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt; DECLARE_COMMAND&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;CDisconnectCommand, cmd_disconnect&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;diff -Nur Filezilla3/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;37&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/include/engineprivate.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;07&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-69&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+69&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Mkdir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CMkdirCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;Rename&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CRenameCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; Chmod&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CChmodCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; KeepAlive&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CKeepAliveCommand&amp;amp; command&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; ContinueConnect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;diff -Nur Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;58&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;33&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-43&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+43&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#endif&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#define TRANSFERSTATUS_TIMER_ID wxID_HIGHEST + 3&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;co2&quot;&gt;#define KEEPALIVE_TIMER_ID TRANSFERSTATUS_TIMER_ID + 1&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; statbarWidths&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#ifdef __WXMSW__&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-159&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+160&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   m_transferStatusTimer.&lt;span class=&quot;me1&quot;&gt;SetOwner&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, TRANSFERSTATUS_TIMER_ID&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;SetOwner&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, KEEPALIVE_TIMER_ID&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   CreateMenus&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   CreateToolBar&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-696&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+698&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pState-&amp;gt;m_pCommandQueue-&amp;gt;Idle&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pState-&amp;gt;m_pCommandQueue-&amp;gt;ProcessCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CDisconnectCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-769&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+772&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;   m_pSendLed = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;   m_pRecvLed = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+  m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   m_transferStatusTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; res = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-826&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+831&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;   CServerPath path;&lt;br /&gt;   path.&lt;span class=&quot;me1&quot;&gt;SetSafePath&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_LASTSERVERPATH&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;server, &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;, path&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// need to read from options, do this only for KeepAlive enabled&lt;/span&gt;&lt;br /&gt;+  m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CMainFrame::&lt;span class=&quot;me2&quot;&gt;OnRefresh&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxCommandEvent &amp;amp;event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-898&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+906&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;39&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;       m_transferStatusTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;event.&lt;span class=&quot;me1&quot;&gt;GetId&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; == KEEPALIVE_TIMER_ID &amp;amp;&amp;amp; m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;IsRunning&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// make sure engine and commandqueue exist&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pState &amp;amp;&amp;amp; !m_pState-&amp;gt;m_pEngine &amp;amp;&amp;amp; !m_pState-&amp;gt;m_pCommandQueue&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// just do this for idle, wait for next timer&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pState-&amp;gt;m_pCommandQueue-&amp;gt;Idle&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+      &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// if not connected, stop keepalive timer&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pState-&amp;gt;m_pEngine-&amp;gt;IsConnected&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+      m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+      &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// need to read the values from options...&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; min_wait = &lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; max_wait = &lt;span class=&quot;nu0&quot;&gt;60&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// if just connected, the interval will be 1000&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; first_time = &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;GetInterval&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; == &lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+    &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; waitsecond = min_wait + &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;rand&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;max_wait - min_wait&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;RAND_MAX&lt;span class=&quot;nu0&quot;&gt;+1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Stop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;waitsecond * &lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// skip keepalive for just connected&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;first_time&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+      &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;+    m_pState-&amp;gt;m_pCommandQueue-&amp;gt;ProcessCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CKeepAliveCommand&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CMainFrame::&lt;span class=&quot;me2&quot;&gt;SetProgress&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; CTransferStatus *pStatus&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-1342&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+1383&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   m_pState-&amp;gt;Connect&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_server, &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;, pData-&amp;gt;m_remoteDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// FIXME:&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;co1&quot;&gt;// need to read from options, do this only for KeepAlive enabled&lt;/span&gt;&lt;br /&gt;+  m_keepAliveTimer.&lt;span class=&quot;me1&quot;&gt;Start&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_localDir != _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     m_pState-&amp;gt;SetLocalDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;pData-&amp;gt;m_localDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;diff -Nur Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;56&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Wed Aug &lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;15&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-84&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+84&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt; @@&lt;br /&gt;   CLed* m_pRecvLed;&lt;br /&gt;   CLed* m_pSendLed;&lt;br /&gt;   wxTimer m_transferStatusTimer;&lt;br /&gt;+&lt;br /&gt;+  wxTimer m_keepAliveTimer;&lt;br /&gt;+&lt;br /&gt;   CThemeProvider* m_pThemeProvider;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#if FZ_MANUALUPDATECHECK &amp;amp;&amp;amp; FZ_AUTOUPDATECHECK&lt;/span&gt;&lt;br /&gt;   CUpdateWizard* m_pUpdateWizard;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/%7Etommy/mypatch/filezilla3_rc1_keepalive.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla3_rc1_keepalive.patch&lt;/a&gt; &lt;br /&gt;製作出來的 Windows 執行檔可以由這兒抓: &lt;a href=&quot;http://www.teatime.com.tw/%7Etommy/files/filezilla/filezilla3_rc1.7z&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/files/filezilla/filezilla3_rc1.7z&lt;/a&gt; &lt;br /&gt;Patch 已送給作者: &lt;a href=&quot;http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=1774714&amp;amp;group_id=21558&amp;amp;atid=372243&quot; target=&quot;_blank&quot;&gt;http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=1774714&amp;amp;group_id=21558&amp;amp;atid=372243&lt;/a&gt; &lt;/p&gt;&lt;p&gt;由於不知道怎麼處理設定的部份,&amp;nbsp; 所以這個版本一定會啟用 keepalive 的功能, 目前是 30-60 秒會送出一個指令, 設定的部份如果作者接受這個 patch 的話, 就應該會加上吧.&lt;/p&gt;&lt;p&gt;如果有需要可以先抓上頭的版本回去使用吧. 如果這個版本執行時, 使用某些 dialog  (如 About ...) 會當掉的話, 可以抓 &lt;a href=&quot;http://filezilla-project.org/nightly.php&quot; target=&quot;_blank&quot;&gt;nightly builds&lt;/a&gt;  裡頭的 zip, 把裡面的 resources 目錄的檔案覆蓋掉你目前的版本就可以了. &lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/261</link>
      <pubDate>Wed, 15 Aug 2007 22:21:16 +0800</pubDate>   
  </item>
    <item>
   <title>讓 FileZilla3 rc1 記得之前的視窗大小與位置</title>
   <description>&lt;p&gt;前幾天 &lt;a href=&quot;http://filezilla.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;FileZilla&lt;/a&gt;  作者發表了 FileZilla 3.0 RC1 的版本. 終於進入 RC 的階段了. 對我來說, 我在 FileZilla 2.x 裡頭會用到的功能, 在這個版本中多數都已經存在了. 所以就想之後都改用 FileZilla 3 的版本. 不過.... 用了一下, 發現... 這個版本仍然不會記錄之前的 UI 大小與位置, 也就是每次執行時, 所出現的畫面並不是我熟悉的, 變成每次都要調整一次. 所以... 乾脆自己修改一下, 加上這個功能來使用.這個修正如下:&lt;/p&gt;&lt;pre class=&quot;cpp&quot;&gt;&lt;div class=&quot;insertcode&quot;&gt;diff -Nur Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Aug &lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;01&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Mainfrm.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Aug &lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;17&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;19&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;00&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-29&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+29&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#include &amp;quot;export.h&amp;quot;&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#include &amp;quot;import.h&amp;quot;&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#include &amp;quot;recursive_operation.h&amp;quot;&lt;/span&gt;&lt;br /&gt;+&lt;span class=&quot;co2&quot;&gt;#include &amp;lt;wx/tokenzr.h&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#ifndef __WXMSW__&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;co2&quot;&gt;#include &amp;quot;resources/filezilla.xpm&amp;quot;&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-198&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+199&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   m_pStatusView = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CStatusView&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pTopSplitter, &lt;span class=&quot;nu0&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pQueuePane = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CQueue&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pBottomSplitter, &lt;span class=&quot;kw3&quot;&gt;this&lt;/span&gt;, m_pAsyncRequestQueue&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pQueueView = m_pQueuePane-&amp;gt;GetQueueView&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;-  &lt;br /&gt;+&lt;br /&gt;   m_pLocalTreeViewPanel = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CView&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pLocalSplitter&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pLocalListViewPanel = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CView&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pLocalSplitter&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_pLocalTreeView = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CLocalTreeView&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pLocalTreeViewPanel, &lt;span class=&quot;nu0&quot;&gt;-1&lt;/span&gt;, m_pState, m_pQueueView&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-251&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+252&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;     m_pLocalListViewPanel-&amp;gt;SetHeader&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pLocalViewHeader&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;     m_pLocalSplitter-&amp;gt;Initialize&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pLocalListViewPanel&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;-  &lt;br /&gt;+&lt;br /&gt;   m_pRemoteViewHeader = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; CRemoteViewHeader&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pRemoteSplitter, m_pState&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetOptionVal&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_SHOW_TREE_REMOTE&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-275&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+276&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;38&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   Layout&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// is_maximized win_x win_y win_width win_height top_pos bottom_height view_pos view_height local_pos remote_pos&lt;/span&gt;&lt;br /&gt;+  wxString posString = COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_WINDOW_POSITION&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    wxStringTokenizer tokens&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;posString, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; count = tokens.&lt;span class=&quot;me1&quot;&gt;CountTokens&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; * aPosValues = &lt;span class=&quot;kw3&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;count&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; i = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;; i &amp;lt; count; i++&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+        wxString token = tokens.&lt;span class=&quot;me1&quot;&gt;GetNextToken&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        token.&lt;span class=&quot;me1&quot;&gt;ToULong&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;aPosValues + i&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;count == &lt;span class=&quot;nu0&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+            Maximize&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+            Move&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;, PosaValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+            SetClientSize&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;, aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+        m_pTopSplitter-&amp;gt;SetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+        &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; x, y;&lt;br /&gt;+        m_pBottomSplitter-&amp;gt;GetClientSize&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&amp;amp;x, &amp;amp;y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        y -= aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;+        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;y &amp;lt; &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; y = &lt;span class=&quot;nu0&quot;&gt;100&lt;/span&gt;;&lt;br /&gt;+        m_pBottomSplitter-&amp;gt;SetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+        m_ViewSplitterSashPos = &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;/aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;+        m_pViewSplitter-&amp;gt;SetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;+        m_pLocalSplitter-&amp;gt;SetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;9&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+        m_pRemoteSplitter-&amp;gt;SetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;aPosValues&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+    &lt;span class=&quot;kw3&quot;&gt;delete&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; aValues;&lt;br /&gt;+&lt;br /&gt;   wxString localDir = COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_LASTLOCALDIR&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!m_pState-&amp;gt;SetLocalDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;localDir&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     m_pState-&amp;gt;SetLocalDir&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;/&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-750&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+783&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;35&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt; &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; CMainFrame::&lt;span class=&quot;me2&quot;&gt;OnClose&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;wxCloseEvent &amp;amp;event&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;+  wxString posString;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// is_maximized&lt;/span&gt;&lt;br /&gt;+    locations += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, IsMaximized&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; ? &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; : &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; x, y;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// pos_x pos_y&lt;/span&gt;&lt;br /&gt;+    GetPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&amp;amp;x, &amp;amp;y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d %d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, x, y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// pos_width pos_height&lt;/span&gt;&lt;br /&gt;+    GetClientSize&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&amp;amp;x, &amp;amp;y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d %d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, x, y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// top_pos&lt;/span&gt;&lt;br /&gt;+    posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, m_pTopSplitter-&amp;gt;GetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// bottom_height&lt;/span&gt;&lt;br /&gt;+  m_pBottomSplitter-&amp;gt;GetClientSize&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&amp;amp;x, &amp;amp;y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, y - m_pBottomSplitter-&amp;gt;GetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// view_pos&lt;/span&gt;&lt;br /&gt;+    posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, m_pViewSplitter-&amp;gt;GetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// view_height&lt;/span&gt;&lt;br /&gt;+  m_pViewSplitter-&amp;gt;GetClientSize&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&amp;amp;x, &amp;amp;y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;GetOptionVal&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_FILEPANE_LAYOUT&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; != &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;+        posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, x&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;br /&gt;+        posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, y&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// local_pos&lt;/span&gt;&lt;br /&gt;+    posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, m_pLocalSplitter-&amp;gt;GetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+    &lt;span class=&quot;co1&quot;&gt;// remote_pos&lt;/span&gt;&lt;br /&gt;+    posString += wxString::&lt;span class=&quot;me2&quot;&gt;Format&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;%d &amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;, m_pRemoteSplitter-&amp;gt;GetSashPosition&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+  COptions::&lt;span class=&quot;me2&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;-&amp;gt;SetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;OPTION_WINDOW_POSITION, posString&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;+&lt;br /&gt;   Show&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   m_bQuit = &lt;span class=&quot;kw2&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw3&quot;&gt;delete&lt;/span&gt; m_pSendLed;&lt;br /&gt;diff -Nur Filezilla3/src/interface/Options.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Options.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/Options.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Aug &lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;01&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Options.&lt;span class=&quot;me1&quot;&gt;cpp&lt;/span&gt;  Mon Aug &lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;59&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;12&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-81&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+81&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt; @@&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Queue successful autoclear&amp;quot;&lt;/span&gt;, number, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;,&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Queue column widths&amp;quot;&lt;/span&gt;, string, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;,&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Local filelist colwidths&amp;quot;&lt;/span&gt;, string, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;,&lt;br /&gt;-  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Remote filelist colwidths&amp;quot;&lt;/span&gt;, string, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Remote filelist colwidths&amp;quot;&lt;/span&gt;, string, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;,&lt;br /&gt;+  &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;Window position and size&amp;quot;&lt;/span&gt;, string, _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt; COptions::&lt;span class=&quot;me2&quot;&gt;COptions&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-195&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+196&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;!SetOptionNoSave&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;nID, value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;false&lt;/span&gt;;&lt;br /&gt;-  &lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;m_pXmlFile&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     m_pXmlFile-&amp;gt;Save&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-416&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+417&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;     &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   TiXmlElement *element = m_pXmlFile-&amp;gt;GetElement&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;-  &lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;path != _T&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;br /&gt;     wxString sub;&lt;br /&gt;diff -Nur Filezilla3/src/interface/Options.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt; Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Options.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;&lt;br /&gt;--- Filezilla3/src/interface/Options.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Aug &lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;14&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;01&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;+++ Filezilla3.&lt;span class=&quot;me1&quot;&gt;patch&lt;/span&gt;/src/interface/Options.&lt;span class=&quot;me1&quot;&gt;h&lt;/span&gt;  Mon Aug &lt;span class=&quot;nu0&quot;&gt;13&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;58&lt;/span&gt;:&lt;span class=&quot;nu0&quot;&gt;26&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;2007&lt;/span&gt;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-35&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+35&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;   OPTION_QUEUE_COLUMN_WIDTHS,&lt;br /&gt;   OPTION_LOCALFILELIST_COLUMN_WIDTHS,&lt;br /&gt;   OPTION_REMOTEFILELIST_COLUMN_WIDTHS,&lt;br /&gt;+  OPTION_WINDOW_POSITION,&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;co1&quot;&gt;// Has to be last element&lt;/span&gt;&lt;br /&gt;   OPTIONS_NUM&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-57&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+58&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; SetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; nID, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; SetOption&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; nID, wxString value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;-  &lt;br /&gt;+&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; SetOptionNoSave&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; nID, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; SetOptionNoSave&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; nID, wxString value&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;@@ &lt;span class=&quot;nu0&quot;&gt;-72&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;+73&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; @@&lt;br /&gt;&amp;nbsp;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;void&lt;/span&gt; SaveColumnWidths&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; wxListCtrl* &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; pListCtrl, &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; optionId&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw4&quot;&gt;bool&lt;/span&gt; ReadColumnWidths&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; optionId, &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; count, &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt;* widths&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;-  &lt;br /&gt;+&lt;br /&gt; &lt;span class=&quot;kw2&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;   COptions&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;   &lt;span class=&quot;kw2&quot;&gt;virtual&lt;/span&gt; ~COptions&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Patch 可以由這兒抓取: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/mypatch/filezilla3_rc1_save_position.patch&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/mypatch/filezilla3_rc1_save_position.patch&lt;/a&gt; &lt;br /&gt;製作出來的 Windows 執行檔可以由這兒抓: &lt;a href=&quot;http://www.teatime.com.tw/~tommy/files/filezilla/filezilla3_rc1_save_position.7z&quot; target=&quot;_blank&quot;&gt;http://www.teatime.com.tw/~tommy/files/filezilla/filezilla3_rc1_save_position.7z&lt;/a&gt; &lt;br /&gt;Patch 已送給作者:&amp;nbsp; &lt;a href=&quot;https://sourceforge.net/tracker/?func=detail&amp;amp;atid=372243&amp;amp;aid=1773124&amp;amp;group_id=21558&quot; target=&quot;_blank&quot;&gt;https://sourceforge.net/tracker/?func=detail&amp;amp;atid=372243&amp;amp;aid=1773124&amp;amp;group_id=21558&lt;/a&gt; &lt;/p&gt;&lt;p&gt;這樣子處理之後, 果然使用上就順手多了.&lt;/p&gt;&lt;p&gt;在 FileZilla 3 RC1 中, 除了這個問題外, 我覺得還有兩個小問題:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Keep Alive 的功能還沒有, 所以隔一段時間就會斷線.&lt;/li&gt;&lt;li&gt;在 Queue 裡頭的檔案, 不能暫時停止, 只能移除.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;如果你認為這兩個小問題對你沒影響, 歡迎也加入 FileZilla 3 的使用行列吧.&amp;nbsp;&lt;/p&gt;&lt;hr width=&quot;100%&quot; size=&quot;2&quot; /&gt;2007/08/14:&amp;nbsp;&lt;p&gt;作者做了部份修改之後, 把這個 patch 納入官方版本中了. (另外... 好像 SourceForge 上頭的 CVS 與 SVN 並沒有同步.... 目前在 CVS 上頭的版本比較舊, 要抓 SVN 上頭的才會是最新的版本) &lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/260</link>
      <pubDate>Mon, 13 Aug 2007 22:53:02 +0800</pubDate>   
  </item>
    <item>
   <title>FileZilla 3 beta 8, 可以考慮取代 FileZilla 2 了</title>
   <description>&lt;p&gt;&lt;a href=&quot;http://filezilla.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;FileZilla&lt;/a&gt;  的作者在這幾天發表了 FileZilla 3 beta8, 試用了一下下, 多數 FileZilla 2 在 ftp/sftp 上頭的功能, 都已經在裡頭了. 就整個 ftp/sfpt 的引擎部份來看, 目前運作都正常. 包含了 UTF-8 的支援, 目前已經不需要另外自己 patch 了.&lt;/p&gt;&lt;p&gt;在 sftp 的傳輸速度上, 也比 FileZilla 2 要快上許多. 我在 local 的網路測試, 記得以前用 FileZilla 2.x 的時候, 都只能有 300-400KB/s 上下的速度, 而在 FileZilla 3 上頭, 可以到 3-4MB/s 左右. 效能好了十倍左右.&lt;/p&gt;&lt;p&gt;不過目前在 UI 上頭的方便性來說, 仍不如 FileZilla 2 好用, 視窗大小, 位置, 裡頭的欄位大小等等, 每次進入都會歸零, 並不會記憶之前的設定. 這也是後續的 beta 版本或 rc 版本要改進的地方. 另外, 這個版本目前沒有辦法匯入 FileZilla 2 的設定, 所以, 所有的站台設定要重設一次. 應該在正式版之前也會加上這個功能才對. 在這些小改進之後, 相信 FileZilla 3 的正式版本, 應該很快就會出來了.&lt;/p&gt;&lt;p&gt;就目前的試用感覺來看. 至少這個版本已經足夠滿足一般的使用.  應該可以考慮取代 FileZilla 2.x 了. &lt;/p&gt;</description>
   <link>http://blog.teatime.com.tw/1/post/240</link>
      <pubDate>Sun, 13 May 2007 10:40:02 +0800</pubDate>   
  </item>
  </rdf:RDF>

