mirror of
https://github.com/kingk85/uFTP.git
synced 2025-07-14 15:56:16 +03:00
Some debug with valgrind, fixed rnto returncode variable scope issue
This commit is contained in:
@ -1,71 +0,0 @@
|
|||||||
#Linux Generic
|
|
||||||
CC=gcc
|
|
||||||
|
|
||||||
OUTPATH=./build/
|
|
||||||
SOURCE_MODULES_PATH=./library/
|
|
||||||
|
|
||||||
#FOR DEBUG PURPOSE
|
|
||||||
CFLAGS=-c -Wall -I. -g -O0
|
|
||||||
#CFLAGS=-c -Wall -I.
|
|
||||||
OPTIMIZATION=-O3
|
|
||||||
HEADERS=-I
|
|
||||||
LIBPATH=./build/modules/
|
|
||||||
BUILDFILES=start uFTP end
|
|
||||||
LIBS=-lpthread -lssl -lcrypto
|
|
||||||
|
|
||||||
#DEFINITIONS=
|
|
||||||
|
|
||||||
#TO ENABLE THE LARGE FILE SUPPORT UNCOMMENT THE NEXT LINE
|
|
||||||
DEFINITIONS=-D_LARGEFILE64_SOURCE
|
|
||||||
|
|
||||||
all: $(BUILDFILES)
|
|
||||||
|
|
||||||
start:
|
|
||||||
@echo Compiler: $(CC)
|
|
||||||
@echo Output Directory: $(OUTPATH)
|
|
||||||
@echo CGI FILES: $(BUILDFILES)
|
|
||||||
@rm -rf $(LIBPATH)*.o $(OUTPATH)uFTP
|
|
||||||
@echo "Clean ok"
|
|
||||||
|
|
||||||
end:
|
|
||||||
@echo Build process end
|
|
||||||
|
|
||||||
uFTP: uFTP.c fileManagement.o configRead.o logFunctions.o ftpCommandElaborate.o ftpData.o ftpServer.o daemon.o signals.o connection.o openSsl.o
|
|
||||||
@$(CC) $(DEFINITIONS) uFTP.c $(LIBPATH)dynamicVectors.o $(LIBPATH)fileManagement.o $(LIBPATH)configRead.o $(LIBPATH)logFunctions.o $(LIBPATH)ftpCommandElaborate.o $(LIBPATH)ftpData.o $(LIBPATH)ftpServer.o $(LIBPATH)daemon.o $(LIBPATH)signals.o $(LIBPATH)connection.o $(LIBPATH)openSsl.o -o $(OUTPATH)uFTP $(LIBS)
|
|
||||||
|
|
||||||
daemon.o:
|
|
||||||
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)daemon.c -o $(LIBPATH)daemon.o
|
|
||||||
|
|
||||||
dynamicVectors.o:
|
|
||||||
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)dynamicVectors.c -o $(LIBPATH)dynamicVectors.o
|
|
||||||
|
|
||||||
openSsl.o:
|
|
||||||
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)openSsl.c -o $(LIBPATH)openSsl.o
|
|
||||||
|
|
||||||
configRead.o: dynamicVectors.o fileManagement.o
|
|
||||||
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)configRead.c -o $(LIBPATH)configRead.o
|
|
||||||
|
|
||||||
fileManagement.o:
|
|
||||||
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)fileManagement.c -o $(LIBPATH)fileManagement.o
|
|
||||||
|
|
||||||
signals.o:
|
|
||||||
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)signals.c -o $(LIBPATH)signals.o
|
|
||||||
|
|
||||||
connection.o:
|
|
||||||
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)connection.c -o $(LIBPATH)connection.o
|
|
||||||
|
|
||||||
logFunctions.o:
|
|
||||||
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)logFunctions.c -o $(LIBPATH)logFunctions.o
|
|
||||||
|
|
||||||
ftpCommandElaborate.o:
|
|
||||||
@$(CC) $(CFLAGS) ftpCommandElaborate.c -o $(LIBPATH)ftpCommandElaborate.o
|
|
||||||
|
|
||||||
ftpData.o:
|
|
||||||
@$(CC) $(CFLAGS) ftpData.c -o $(LIBPATH)ftpData.o
|
|
||||||
|
|
||||||
ftpServer.o: openSsl.o
|
|
||||||
@$(CC) $(CFLAGS) ftpServer.c -o $(LIBPATH)ftpServer.o
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@rm -rf $(LIBPATH)*.o $(OUTPATH)uFTP
|
|
||||||
@echo "Clean ok"
|
|
165
Makefile
165
Makefile
@ -1,128 +1,71 @@
|
|||||||
#
|
#Linux Generic
|
||||||
# There exist several targets which are by default empty and which can be
|
CC=gcc
|
||||||
# used for execution of your targets. These targets are usually executed
|
|
||||||
# before and after some main targets. They are:
|
|
||||||
#
|
|
||||||
# .build-pre: called before 'build' target
|
|
||||||
# .build-post: called after 'build' target
|
|
||||||
# .clean-pre: called before 'clean' target
|
|
||||||
# .clean-post: called after 'clean' target
|
|
||||||
# .clobber-pre: called before 'clobber' target
|
|
||||||
# .clobber-post: called after 'clobber' target
|
|
||||||
# .all-pre: called before 'all' target
|
|
||||||
# .all-post: called after 'all' target
|
|
||||||
# .help-pre: called before 'help' target
|
|
||||||
# .help-post: called after 'help' target
|
|
||||||
#
|
|
||||||
# Targets beginning with '.' are not intended to be called on their own.
|
|
||||||
#
|
|
||||||
# Main targets can be executed directly, and they are:
|
|
||||||
#
|
|
||||||
# build build a specific configuration
|
|
||||||
# clean remove built files from a configuration
|
|
||||||
# clobber remove all built files
|
|
||||||
# all build all configurations
|
|
||||||
# help print help mesage
|
|
||||||
#
|
|
||||||
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
|
|
||||||
# .help-impl are implemented in nbproject/makefile-impl.mk.
|
|
||||||
#
|
|
||||||
# Available make variables:
|
|
||||||
#
|
|
||||||
# CND_BASEDIR base directory for relative paths
|
|
||||||
# CND_DISTDIR default top distribution directory (build artifacts)
|
|
||||||
# CND_BUILDDIR default top build directory (object files, ...)
|
|
||||||
# CONF name of current configuration
|
|
||||||
# CND_PLATFORM_${CONF} platform name (current configuration)
|
|
||||||
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
|
|
||||||
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
|
|
||||||
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
|
|
||||||
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
|
|
||||||
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
|
|
||||||
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
|
|
||||||
#
|
|
||||||
# NOCDDL
|
|
||||||
|
|
||||||
|
OUTPATH=./build/
|
||||||
|
SOURCE_MODULES_PATH=./library/
|
||||||
|
|
||||||
# Environment
|
#FOR DEBUG PURPOSE
|
||||||
MKDIR=mkdir
|
CFLAGS=-c -Wall -I. -g -O0
|
||||||
CP=cp
|
#CFLAGS=-c -Wall -I.
|
||||||
CCADMIN=CCadmin
|
OPTIMIZATION=-O3
|
||||||
|
HEADERS=-I
|
||||||
|
LIBPATH=./build/modules/
|
||||||
|
BUILDFILES=start uFTP end
|
||||||
|
LIBS=-lpthread -lssl -lcrypto
|
||||||
|
|
||||||
|
#DEFINITIONS=
|
||||||
|
|
||||||
# build
|
#TO ENABLE THE LARGE FILE SUPPORT UNCOMMENT THE NEXT LINE
|
||||||
build: .build-post
|
DEFINITIONS=-D_LARGEFILE64_SOURCE
|
||||||
|
|
||||||
.build-pre:
|
all: $(BUILDFILES)
|
||||||
# Add your pre 'build' code here...
|
|
||||||
|
|
||||||
.build-post: .build-impl
|
start:
|
||||||
# Add your post 'build' code here...
|
@echo Compiler: $(CC)
|
||||||
|
@echo Output Directory: $(OUTPATH)
|
||||||
|
@echo CGI FILES: $(BUILDFILES)
|
||||||
|
@rm -rf $(LIBPATH)*.o $(OUTPATH)uFTP
|
||||||
|
@echo "Clean ok"
|
||||||
|
|
||||||
|
end:
|
||||||
|
@echo Build process end
|
||||||
|
|
||||||
|
uFTP: uFTP.c fileManagement.o configRead.o logFunctions.o ftpCommandElaborate.o ftpData.o ftpServer.o daemon.o signals.o connection.o openSsl.o
|
||||||
|
@$(CC) $(DEFINITIONS) uFTP.c $(LIBPATH)dynamicVectors.o $(LIBPATH)fileManagement.o $(LIBPATH)configRead.o $(LIBPATH)logFunctions.o $(LIBPATH)ftpCommandElaborate.o $(LIBPATH)ftpData.o $(LIBPATH)ftpServer.o $(LIBPATH)daemon.o $(LIBPATH)signals.o $(LIBPATH)connection.o $(LIBPATH)openSsl.o -o $(OUTPATH)uFTP $(LIBS)
|
||||||
|
|
||||||
# clean
|
daemon.o:
|
||||||
clean: .clean-post
|
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)daemon.c -o $(LIBPATH)daemon.o
|
||||||
|
|
||||||
.clean-pre:
|
dynamicVectors.o:
|
||||||
# Add your pre 'clean' code here...
|
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)dynamicVectors.c -o $(LIBPATH)dynamicVectors.o
|
||||||
|
|
||||||
|
openSsl.o:
|
||||||
|
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)openSsl.c -o $(LIBPATH)openSsl.o
|
||||||
|
|
||||||
.clean-post: .clean-impl
|
configRead.o: dynamicVectors.o fileManagement.o
|
||||||
# Add your post 'clean' code here...
|
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)configRead.c -o $(LIBPATH)configRead.o
|
||||||
|
|
||||||
|
fileManagement.o:
|
||||||
|
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)fileManagement.c -o $(LIBPATH)fileManagement.o
|
||||||
|
|
||||||
# clobber
|
signals.o:
|
||||||
clobber: .clobber-post
|
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)signals.c -o $(LIBPATH)signals.o
|
||||||
|
|
||||||
|
connection.o:
|
||||||
|
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)connection.c -o $(LIBPATH)connection.o
|
||||||
|
|
||||||
.clobber-pre:
|
logFunctions.o:
|
||||||
# Add your pre 'clobber' code here...
|
@$(CC) $(CFLAGS) $(SOURCE_MODULES_PATH)logFunctions.c -o $(LIBPATH)logFunctions.o
|
||||||
|
|
||||||
.clobber-post: .clobber-impl
|
ftpCommandElaborate.o:
|
||||||
# Add your post 'clobber' code here...
|
@$(CC) $(CFLAGS) ftpCommandElaborate.c -o $(LIBPATH)ftpCommandElaborate.o
|
||||||
|
|
||||||
|
ftpData.o:
|
||||||
|
@$(CC) $(CFLAGS) ftpData.c -o $(LIBPATH)ftpData.o
|
||||||
|
|
||||||
# all
|
ftpServer.o: openSsl.o
|
||||||
all: .all-post
|
@$(CC) $(CFLAGS) ftpServer.c -o $(LIBPATH)ftpServer.o
|
||||||
|
|
||||||
.all-pre:
|
clean:
|
||||||
# Add your pre 'all' code here...
|
@rm -rf $(LIBPATH)*.o $(OUTPATH)uFTP
|
||||||
|
@echo "Clean ok"
|
||||||
.all-post: .all-impl
|
|
||||||
# Add your post 'all' code here...
|
|
||||||
|
|
||||||
|
|
||||||
# build tests
|
|
||||||
build-tests: .build-tests-post
|
|
||||||
|
|
||||||
.build-tests-pre:
|
|
||||||
# Add your pre 'build-tests' code here...
|
|
||||||
|
|
||||||
.build-tests-post: .build-tests-impl
|
|
||||||
# Add your post 'build-tests' code here...
|
|
||||||
|
|
||||||
|
|
||||||
# run tests
|
|
||||||
test: .test-post
|
|
||||||
|
|
||||||
.test-pre: build-tests
|
|
||||||
# Add your pre 'test' code here...
|
|
||||||
|
|
||||||
.test-post: .test-impl
|
|
||||||
# Add your post 'test' code here...
|
|
||||||
|
|
||||||
|
|
||||||
# help
|
|
||||||
help: .help-post
|
|
||||||
|
|
||||||
.help-pre:
|
|
||||||
# Add your pre 'help' code here...
|
|
||||||
|
|
||||||
.help-post: .help-impl
|
|
||||||
# Add your post 'help' code here...
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# include project implementation makefile
|
|
||||||
include nbproject/Makefile-impl.mk
|
|
||||||
|
|
||||||
# include project make variables
|
|
||||||
include nbproject/Makefile-variables.mk
|
|
||||||
|
128
MakefileNetBeans
Normal file
128
MakefileNetBeans
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
#
|
||||||
|
# There exist several targets which are by default empty and which can be
|
||||||
|
# used for execution of your targets. These targets are usually executed
|
||||||
|
# before and after some main targets. They are:
|
||||||
|
#
|
||||||
|
# .build-pre: called before 'build' target
|
||||||
|
# .build-post: called after 'build' target
|
||||||
|
# .clean-pre: called before 'clean' target
|
||||||
|
# .clean-post: called after 'clean' target
|
||||||
|
# .clobber-pre: called before 'clobber' target
|
||||||
|
# .clobber-post: called after 'clobber' target
|
||||||
|
# .all-pre: called before 'all' target
|
||||||
|
# .all-post: called after 'all' target
|
||||||
|
# .help-pre: called before 'help' target
|
||||||
|
# .help-post: called after 'help' target
|
||||||
|
#
|
||||||
|
# Targets beginning with '.' are not intended to be called on their own.
|
||||||
|
#
|
||||||
|
# Main targets can be executed directly, and they are:
|
||||||
|
#
|
||||||
|
# build build a specific configuration
|
||||||
|
# clean remove built files from a configuration
|
||||||
|
# clobber remove all built files
|
||||||
|
# all build all configurations
|
||||||
|
# help print help mesage
|
||||||
|
#
|
||||||
|
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
|
||||||
|
# .help-impl are implemented in nbproject/makefile-impl.mk.
|
||||||
|
#
|
||||||
|
# Available make variables:
|
||||||
|
#
|
||||||
|
# CND_BASEDIR base directory for relative paths
|
||||||
|
# CND_DISTDIR default top distribution directory (build artifacts)
|
||||||
|
# CND_BUILDDIR default top build directory (object files, ...)
|
||||||
|
# CONF name of current configuration
|
||||||
|
# CND_PLATFORM_${CONF} platform name (current configuration)
|
||||||
|
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
|
||||||
|
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
|
||||||
|
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
|
||||||
|
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
|
||||||
|
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
|
||||||
|
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
|
||||||
|
#
|
||||||
|
# NOCDDL
|
||||||
|
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
MKDIR=mkdir
|
||||||
|
CP=cp
|
||||||
|
CCADMIN=CCadmin
|
||||||
|
|
||||||
|
|
||||||
|
# build
|
||||||
|
build: .build-post
|
||||||
|
|
||||||
|
.build-pre:
|
||||||
|
# Add your pre 'build' code here...
|
||||||
|
|
||||||
|
.build-post: .build-impl
|
||||||
|
# Add your post 'build' code here...
|
||||||
|
|
||||||
|
|
||||||
|
# clean
|
||||||
|
clean: .clean-post
|
||||||
|
|
||||||
|
.clean-pre:
|
||||||
|
# Add your pre 'clean' code here...
|
||||||
|
|
||||||
|
.clean-post: .clean-impl
|
||||||
|
# Add your post 'clean' code here...
|
||||||
|
|
||||||
|
|
||||||
|
# clobber
|
||||||
|
clobber: .clobber-post
|
||||||
|
|
||||||
|
.clobber-pre:
|
||||||
|
# Add your pre 'clobber' code here...
|
||||||
|
|
||||||
|
.clobber-post: .clobber-impl
|
||||||
|
# Add your post 'clobber' code here...
|
||||||
|
|
||||||
|
|
||||||
|
# all
|
||||||
|
all: .all-post
|
||||||
|
|
||||||
|
.all-pre:
|
||||||
|
# Add your pre 'all' code here...
|
||||||
|
|
||||||
|
.all-post: .all-impl
|
||||||
|
# Add your post 'all' code here...
|
||||||
|
|
||||||
|
|
||||||
|
# build tests
|
||||||
|
build-tests: .build-tests-post
|
||||||
|
|
||||||
|
.build-tests-pre:
|
||||||
|
# Add your pre 'build-tests' code here...
|
||||||
|
|
||||||
|
.build-tests-post: .build-tests-impl
|
||||||
|
# Add your post 'build-tests' code here...
|
||||||
|
|
||||||
|
|
||||||
|
# run tests
|
||||||
|
test: .test-post
|
||||||
|
|
||||||
|
.test-pre: build-tests
|
||||||
|
# Add your pre 'test' code here...
|
||||||
|
|
||||||
|
.test-post: .test-impl
|
||||||
|
# Add your post 'test' code here...
|
||||||
|
|
||||||
|
|
||||||
|
# help
|
||||||
|
help: .help-post
|
||||||
|
|
||||||
|
.help-pre:
|
||||||
|
# Add your pre 'help' code here...
|
||||||
|
|
||||||
|
.help-post: .help-impl
|
||||||
|
# Add your post 'help' code here...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# include project implementation makefile
|
||||||
|
include nbproject/Makefile-impl.mk
|
||||||
|
|
||||||
|
# include project make variables
|
||||||
|
include nbproject/Makefile-variables.mk
|
Binary file not shown.
@ -1,32 +0,0 @@
|
|||||||
build/Debug/GNU-Linux/ftpCommandElaborate.o: ftpCommandElaborate.c \
|
|
||||||
library/dynamicVectors.h library/fileManagement.h \
|
|
||||||
library/dynamicVectors.h ftpData.h library/dynamicVectors.h ftpServer.h \
|
|
||||||
library/logFunctions.h library/fileManagement.h library/configRead.h \
|
|
||||||
library/dynamicVectors.h library/../ftpData.h library/openSsl.h \
|
|
||||||
ftpCommandsElaborate.h
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
ftpData.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
ftpServer.h:
|
|
||||||
|
|
||||||
library/logFunctions.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/configRead.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/../ftpData.h:
|
|
||||||
|
|
||||||
library/openSsl.h:
|
|
||||||
|
|
||||||
ftpCommandsElaborate.h:
|
|
Binary file not shown.
@ -1,27 +0,0 @@
|
|||||||
build/Debug/GNU-Linux/ftpData.o: ftpData.c library/dynamicVectors.h \
|
|
||||||
library/fileManagement.h library/dynamicVectors.h ftpServer.h \
|
|
||||||
ftpCommandsElaborate.h ftpData.h library/dynamicVectors.h \
|
|
||||||
library/configRead.h library/dynamicVectors.h library/../ftpData.h \
|
|
||||||
library/fileManagement.h
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
ftpServer.h:
|
|
||||||
|
|
||||||
ftpCommandsElaborate.h:
|
|
||||||
|
|
||||||
ftpData.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/configRead.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/../ftpData.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
Binary file not shown.
@ -1,36 +0,0 @@
|
|||||||
build/Debug/GNU-Linux/ftpServer.o: ftpServer.c library/dynamicVectors.h \
|
|
||||||
library/fileManagement.h library/dynamicVectors.h ftpServer.h ftpData.h \
|
|
||||||
library/dynamicVectors.h ftpCommandsElaborate.h library/fileManagement.h \
|
|
||||||
library/logFunctions.h library/configRead.h library/dynamicVectors.h \
|
|
||||||
library/../ftpData.h library/signals.h library/openSsl.h \
|
|
||||||
library/connection.h
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
ftpServer.h:
|
|
||||||
|
|
||||||
ftpData.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
ftpCommandsElaborate.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/logFunctions.h:
|
|
||||||
|
|
||||||
library/configRead.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/../ftpData.h:
|
|
||||||
|
|
||||||
library/signals.h:
|
|
||||||
|
|
||||||
library/openSsl.h:
|
|
||||||
|
|
||||||
library/connection.h:
|
|
Binary file not shown.
Binary file not shown.
@ -1,20 +0,0 @@
|
|||||||
build/Release/GNU-Linux/ftpData.o: ftpData.c ftpServer.h \
|
|
||||||
ftpCommandsElaborate.h ftpData.h library/dynamicVectors.h \
|
|
||||||
library/configRead.h library/dynamicVectors.h library/../ftpData.h \
|
|
||||||
library/fileManagement.h
|
|
||||||
|
|
||||||
ftpServer.h:
|
|
||||||
|
|
||||||
ftpCommandsElaborate.h:
|
|
||||||
|
|
||||||
ftpData.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/configRead.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/../ftpData.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
Binary file not shown.
@ -1,26 +0,0 @@
|
|||||||
build/Release/GNU-Linux/ftpServer.o: ftpServer.c ftpServer.h ftpData.h \
|
|
||||||
library/dynamicVectors.h ftpCommandsElaborate.h library/fileManagement.h \
|
|
||||||
library/dynamicVectors.h library/logFunctions.h library/configRead.h \
|
|
||||||
library/../ftpData.h library/signals.h library/connection.h
|
|
||||||
|
|
||||||
ftpServer.h:
|
|
||||||
|
|
||||||
ftpData.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
ftpCommandsElaborate.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/logFunctions.h:
|
|
||||||
|
|
||||||
library/configRead.h:
|
|
||||||
|
|
||||||
library/../ftpData.h:
|
|
||||||
|
|
||||||
library/signals.h:
|
|
||||||
|
|
||||||
library/connection.h:
|
|
Binary file not shown.
@ -1,16 +0,0 @@
|
|||||||
build/Release/GNU-Linux/library/configRead.o: library/configRead.c \
|
|
||||||
library/configRead.h library/dynamicVectors.h library/../ftpData.h \
|
|
||||||
library/../library/dynamicVectors.h library/fileManagement.h \
|
|
||||||
library/daemon.h
|
|
||||||
|
|
||||||
library/configRead.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/../ftpData.h:
|
|
||||||
|
|
||||||
library/../library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/daemon.h:
|
|
Binary file not shown.
@ -1,9 +0,0 @@
|
|||||||
build/Release/GNU-Linux/library/connection.o: library/connection.c \
|
|
||||||
library/../ftpData.h library/../library/dynamicVectors.h \
|
|
||||||
library/connection.h
|
|
||||||
|
|
||||||
library/../ftpData.h:
|
|
||||||
|
|
||||||
library/../library/dynamicVectors.h:
|
|
||||||
|
|
||||||
library/connection.h:
|
|
Binary file not shown.
@ -1,6 +0,0 @@
|
|||||||
build/Release/GNU-Linux/library/daemon.o: library/daemon.c \
|
|
||||||
library/fileManagement.h library/dynamicVectors.h
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
Binary file not shown.
@ -1,4 +0,0 @@
|
|||||||
build/Release/GNU-Linux/library/dynamicVectors.o: \
|
|
||||||
library/dynamicVectors.c library/dynamicVectors.h
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
Binary file not shown.
@ -1,7 +0,0 @@
|
|||||||
build/Release/GNU-Linux/library/fileManagement.o: \
|
|
||||||
library/fileManagement.c library/fileManagement.h \
|
|
||||||
library/dynamicVectors.h
|
|
||||||
|
|
||||||
library/fileManagement.h:
|
|
||||||
|
|
||||||
library/dynamicVectors.h:
|
|
Binary file not shown.
@ -1,4 +0,0 @@
|
|||||||
build/Release/GNU-Linux/library/logFunctions.o: library/logFunctions.c \
|
|
||||||
library/logFunctions.h
|
|
||||||
|
|
||||||
library/logFunctions.h:
|
|
Binary file not shown.
@ -1,4 +0,0 @@
|
|||||||
build/Release/GNU-Linux/library/signals.o: library/signals.c \
|
|
||||||
library/../ftpServer.h
|
|
||||||
|
|
||||||
library/../ftpServer.h:
|
|
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
build/Release/GNU-Linux/uFTP.o: uFTP.c ftpServer.h
|
|
||||||
|
|
||||||
ftpServer.h:
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/uFTP
BIN
build/uFTP
Binary file not shown.
BIN
dist/Debug/GNU-Linux/uftp
vendored
BIN
dist/Debug/GNU-Linux/uftp
vendored
Binary file not shown.
@ -342,6 +342,7 @@ int parseCommandPasv(ftpDataType * data, int socketId)
|
|||||||
{
|
{
|
||||||
/* Create worker thread */
|
/* Create worker thread */
|
||||||
void *pReturn;
|
void *pReturn;
|
||||||
|
printf("\n data->clients[%d].workerData.workerThread = %d",socketId, (int)data->clients[socketId].workerData.workerThread);
|
||||||
|
|
||||||
if (data->clients[socketId].workerData.threadIsAlive == 1)
|
if (data->clients[socketId].workerData.threadIsAlive == 1)
|
||||||
{
|
{
|
||||||
@ -977,7 +978,7 @@ int parseCommandRnfr(clientDataType *theClientData)
|
|||||||
|
|
||||||
int parseCommandRnto(clientDataType *theClientData)
|
int parseCommandRnto(clientDataType *theClientData)
|
||||||
{
|
{
|
||||||
int returnCode;
|
int returnCode = 0;
|
||||||
int isSafePath;
|
int isSafePath;
|
||||||
char *theRntoFileName;
|
char *theRntoFileName;
|
||||||
|
|
||||||
@ -993,29 +994,39 @@ int parseCommandRnto(clientDataType *theClientData)
|
|||||||
if (FILE_IsFile(theClientData->renameFromFile.text) == 1 ||
|
if (FILE_IsFile(theClientData->renameFromFile.text) == 1 ||
|
||||||
FILE_IsDirectory(theClientData->renameFromFile.text) == 1)
|
FILE_IsDirectory(theClientData->renameFromFile.text) == 1)
|
||||||
{
|
{
|
||||||
int returnCode = 0;
|
|
||||||
returnCode = rename (theClientData->renameFromFile.text, theClientData->renameToFile.text);
|
returnCode = rename (theClientData->renameFromFile.text, theClientData->renameToFile.text);
|
||||||
if (returnCode == 0)
|
if (returnCode == 0)
|
||||||
{
|
{
|
||||||
|
printf("\n250 File successfully renamed or moved");
|
||||||
returnCode = dprintf(theClientData->socketDescriptor, "250 File successfully renamed or moved\r\n");
|
returnCode = dprintf(theClientData->socketDescriptor, "250 File successfully renamed or moved\r\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
printf("\n503 Error Renaming the file");
|
||||||
returnCode = dprintf(theClientData->socketDescriptor, "503 Error Renaming the file\r\n");
|
returnCode = dprintf(theClientData->socketDescriptor, "503 Error Renaming the file\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
printf("\n503 Need RNFR before RNTO");
|
||||||
returnCode = dprintf(theClientData->socketDescriptor, "503 Need RNFR before RNTO\r\n");
|
returnCode = dprintf(theClientData->socketDescriptor, "503 Need RNFR before RNTO\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
printf("\n503 Error Renaming the file");
|
||||||
returnCode = dprintf(theClientData->socketDescriptor, "503 Error Renaming the file\r\n");
|
returnCode = dprintf(theClientData->socketDescriptor, "503 Error Renaming the file\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (returnCode <= 0) return FTP_COMMAND_PROCESSED_WRITE_ERROR;
|
if (returnCode <= 0)
|
||||||
return FTP_COMMAND_PROCESSED;
|
{
|
||||||
|
printf("\, parseCommandRnto return code: %d", returnCode);
|
||||||
|
return FTP_COMMAND_PROCESSED_WRITE_ERROR;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return FTP_COMMAND_PROCESSED;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int parseCommandCdup(clientDataType *theClientData)
|
int parseCommandCdup(clientDataType *theClientData)
|
||||||
@ -1294,7 +1305,7 @@ int setPermissions(char * permissionsCommand, char * basePath, ownerShip_DataTyp
|
|||||||
}
|
}
|
||||||
|
|
||||||
returnCode = strtol(thePermissionString, 0, 8);
|
returnCode = strtol(thePermissionString, 0, 8);
|
||||||
if (returnCodeSetPermissions = chmod (theFinalFilename, returnCode) < 0)
|
if ((returnCodeSetPermissions = chmod (theFinalFilename, returnCode)) < 0)
|
||||||
{
|
{
|
||||||
printf("\n---> ERROR WHILE SETTING FILE PERMISSION");
|
printf("\n---> ERROR WHILE SETTING FILE PERMISSION");
|
||||||
}
|
}
|
||||||
|
@ -372,7 +372,9 @@ int writeListDataInfoToSocket(char * thePath, int theSocket, int *filesNumber, i
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fileList != NULL)
|
if (fileList != NULL)
|
||||||
|
{
|
||||||
free (fileList);
|
free (fileList);
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -579,6 +581,7 @@ void resetWorkerData(workerDataType *workerData, int isInitialization)
|
|||||||
{
|
{
|
||||||
DYNV_VectorGeneric_Init(&workerData->directoryInfo);
|
DYNV_VectorGeneric_Init(&workerData->directoryInfo);
|
||||||
workerData->theStorFile = NULL;
|
workerData->theStorFile = NULL;
|
||||||
|
workerData->workerThread = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutex_init(&workerData->conditionMutex, NULL);
|
pthread_mutex_init(&workerData->conditionMutex, NULL);
|
||||||
@ -698,4 +701,4 @@ int isCharInString(char *theString, int stringLen, char theChar)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -428,6 +428,7 @@ void runFtpServer(void)
|
|||||||
if (ftpData.clients[processingSock].buffer[i] == '\n')
|
if (ftpData.clients[processingSock].buffer[i] == '\n')
|
||||||
{
|
{
|
||||||
ftpData.clients[processingSock].socketCommandReceived = 1;
|
ftpData.clients[processingSock].socketCommandReceived = 1;
|
||||||
|
printf("\n Processing the command: %s", ftpData.clients[processingSock].theCommandReceived);
|
||||||
commandProcessStatus = processCommand(processingSock);
|
commandProcessStatus = processCommand(processingSock);
|
||||||
//Echo unrecognized commands
|
//Echo unrecognized commands
|
||||||
if (commandProcessStatus == FTP_COMMAND_NOT_RECONIZED)
|
if (commandProcessStatus == FTP_COMMAND_NOT_RECONIZED)
|
||||||
@ -448,7 +449,7 @@ void runFtpServer(void)
|
|||||||
else if (commandProcessStatus == FTP_COMMAND_PROCESSED_WRITE_ERROR)
|
else if (commandProcessStatus == FTP_COMMAND_PROCESSED_WRITE_ERROR)
|
||||||
{
|
{
|
||||||
ftpData.clients[processingSock].closeTheClient = 1;
|
ftpData.clients[processingSock].closeTheClient = 1;
|
||||||
printf("\n Write error, closing the client!");
|
printf("\n Write error WARNING!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -723,4 +724,4 @@ static int processCommand(int processingElement)
|
|||||||
void deallocateMemory(void)
|
void deallocateMemory(void)
|
||||||
{
|
{
|
||||||
printf("\n Deallocating the memory.. ");
|
printf("\n Deallocating the memory.. ");
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
</data>
|
</data>
|
||||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||||
<group>
|
<group/>
|
||||||
<file>file:/home/ugo/NetBeansProjects/uFTP/MakeFileGeneric</file>
|
|
||||||
</group>
|
|
||||||
</open-files>
|
</open-files>
|
||||||
</project-private>
|
</project-private>
|
||||||
|
Reference in New Issue
Block a user