From 1b63551705508fe38cbdceec2b34fcce03dbf580 Mon Sep 17 00:00:00 2001 From: nisargshah95 Date: Wed, 21 Mar 2018 16:10:11 +0000 Subject: [PATCH] Fix FTPC logging, change log file path git-svn-id: svn://kolibrios.org@7201 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ftpc/console.inc | 2 -- programs/network/ftpc/ftpc.asm | 5 +++++ programs/network/ftpc/ftpc.ini | 2 +- programs/network/ftpc/gui.inc | 3 +-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/programs/network/ftpc/console.inc b/programs/network/ftpc/console.inc index af92208d95..e17535ccef 100755 --- a/programs/network/ftpc/console.inc +++ b/programs/network/ftpc/console.inc @@ -103,8 +103,6 @@ console: ;////////////////////////////////////////////////////////////////////// jnz @b ; write to log file mov eax, [esp+36] - cmp [logfile_offset], -1 - je @f call write_to_file @@: diff --git a/programs/network/ftpc/ftpc.asm b/programs/network/ftpc/ftpc.asm index 4d093fcbec..2fc9c102ae 100644 --- a/programs/network/ftpc/ftpc.asm +++ b/programs/network/ftpc/ftpc.asm @@ -644,6 +644,11 @@ write_to_file: ;//////////////////////////////////////////////////////////////// ;;------------------------------------------------------------------------------------------------;; ;< eax = status of SF 70.3 ;; ;;================================================================================================;; + cmp [logfile_offset], -1 ; if offset == -1 => logging disabled + jne @f + mov eax, 0 + ret + @@: mov [filestruct2.subfn], 3 m2m [filestruct2.offset], [logfile_offset] mov [filestruct2.size], ecx diff --git a/programs/network/ftpc/ftpc.ini b/programs/network/ftpc/ftpc.ini index af35cedfa6..03f6703595 100644 --- a/programs/network/ftpc/ftpc.ini +++ b/programs/network/ftpc/ftpc.ini @@ -2,7 +2,7 @@ ; 0 = passive / 1 = active mode=0 dir=/tmp0/1/ -logfile=/usbhd0/1/ftpc.log +logfile=/tmp0/1/ftpc.log [active] ; Local starting port for active connections port_start=2000 diff --git a/programs/network/ftpc/gui.inc b/programs/network/ftpc/gui.inc index a2dcf03992..3aa913fb46 100755 --- a/programs/network/ftpc/gui.inc +++ b/programs/network/ftpc/gui.inc @@ -332,8 +332,7 @@ gui: ;////////////////////////////////////////////////////////////////////////// stdcall [ted_draw], tedit0 ; write to log file mov eax, [esp+36] - cmp [logfile_offset], -1 ; disabled logging? - je @f + sub ecx, 2 ; 0a0d is not included call write_to_file @@: