diff options
author | Kostyantyn Ovechko <fastinetserver@gmail.com> | 2010-08-11 05:15:57 +0300 |
---|---|---|
committer | Kostyantyn Ovechko <fastinetserver@gmail.com> | 2010-08-11 05:15:57 +0300 |
commit | f8ae48ad0de6ce471bf4e0cf2985ef8f1417b8da (patch) | |
tree | 0da83d0528fb6c53bf01ec2b5371b8ded25ae272 | |
parent | Replace tuiclient argument: --wait-distfile=df_name by --wait-distfiles=df_na... (diff) | |
download | idfetch-f8ae48ad0de6ce471bf4e0cf2985ef8f1417b8da.tar.gz idfetch-f8ae48ad0de6ce471bf4e0cf2985ef8f1417b8da.tar.bz2 idfetch-f8ae48ad0de6ce471bf4e0cf2985ef8f1417b8da.zip |
Fix warnings: unused return value.
-rw-r--r-- | segget/Makefile | 2 | ||||
-rw-r--r-- | segget/network0.conf | 11 | ||||
-rw-r--r-- | segget/scriptserver.cpp | 4 | ||||
-rw-r--r-- | segget/segget.conf | 10 | ||||
-rw-r--r-- | segget/segget.cpp | 12 |
5 files changed, 24 insertions, 15 deletions
diff --git a/segget/Makefile b/segget/Makefile index 07280ff..e00327d 100644 --- a/segget/Makefile +++ b/segget/Makefile @@ -18,7 +18,7 @@ all: clean $(BINS) %.o: %.cxx $(CXX) -c -o $@ $(CXXFLAGS) $^ -segget: segget.o connection.o checksum.o config.o distfile.o log.o mirror.o network.o networkbroker.o phase.o pkg.o response.o segment.o settings.o stats.o str.o tui.o utils.o ui_server.o proxyfetcher.o requestserver.o +segget: segget.o connection.o checksum.o config.o distfile.o log.o mirror.o network.o networkbroker.o phase.o pkg.o response.o segment.o settings.o stats.o str.o tui.o utils.o ui_server.o proxyfetcher.o requestserver.o scriptserver.o $(CXX) -o $@ -lncurses $(LIBS) $(CIBS) $^ #%: %.o # $(CXX) -o $@ $(LIBS) $(CIBS) $^ diff --git a/segget/network0.conf b/segget/network0.conf index bd16fca..ccc4586 100644 --- a/segget/network0.conf +++ b/segget/network0.conf @@ -34,7 +34,7 @@ # network1 segget will have to use a gateway to access remote mirrors. # Default: # network_mode=0 -network_mode=2 +network_mode=0 [network_bind] # BIND INTERFACE / IP @@ -69,7 +69,6 @@ bind_local_port=0 # Default: # bind_local_port_range=20 bind_local_port_range=20 - [network_connections] # NETWORK_MAX_CONNECTIONS @@ -78,7 +77,7 @@ bind_local_port_range=20 # Maximum value: 20 # Default: # max_connections=10 -max_connections=20 +max_connections=3 # CONNECTION_TIMEOUT # Set the number of seconds to wait while trying to connect. Use 0 to wait @@ -91,7 +90,7 @@ max_connections=20 # Maximum value: 1000 # Default: # connection_timeout=15 -connection_timeout=15 +connection_timeout=150 # FTP_RESPONSE_TIMEOUT # Set a timeout period (in seconds) on the amount of time that the server is @@ -103,7 +102,7 @@ connection_timeout=15 # Maximum value: -1 (for no limit) # Default: # ftp_response_timeout=180 -ftp_response_timeout=180 +ftp_response_timeout=1800 # TIMEOUT # maximum amount of time to download segment in seconds @@ -116,7 +115,7 @@ ftp_response_timeout=180 # Maximum value: -1 (for no limit) # Default: # timeout=500 -timeout=500 +timeout=5000 # LOW_CONNECTION_SPEED_LIMIT # Define the low speed limit for connection. Pass a long as parameter. It diff --git a/segget/scriptserver.cpp b/segget/scriptserver.cpp index 1632c0d..bd095a6 100644 --- a/segget/scriptserver.cpp +++ b/segget/scriptserver.cpp @@ -225,7 +225,9 @@ bool run_user_python_script(uint connection_num){ dup2(fileno(stdout_file), 1); fclose(stdout_file); } - system((settings.python_path+" /home/mona/idfetcha/scripts/client.py").c_str()); + if (system((settings.python_path+" /home/mona/idfetcha/scripts/client.py").c_str())){ + error_log_no_msg("Error in scriptserver.cpp: run_user_python_script calling system()"); + } _exit(0); }else{ if (pID < 0){ // failed to fork diff --git a/segget/segget.conf b/segget/segget.conf index 3cc9bb9..f2de2f5 100644 --- a/segget/segget.conf +++ b/segget/segget.conf @@ -2,14 +2,14 @@ # DISTFILES_DIR # Define a dir to store distfiles # Default: -# distfiles_dir=./distfiles +# distfiles_dir=/usr/portage/distfiles distfiles_dir=./distfiles # SEGMENTS_DIR # Define a dir to store distfiles' segments # Default: -# segments_dir=./tmp -segments_dir=./tmp +# segments_dir=/tmp/seggetd/segments +#segments_dir=./tmp [pkg_list] # PKG_LIST_DIR @@ -370,7 +370,7 @@ python_path=/usr/bin/python # error message would be saved to net3_script_stderr.log. Results of print would # be saved in net3_script_stdout.log. # Default: -# scripts_dir=./scripts +# scripts_dir=/usr/share/seggetd/scripts scripts_dir=./scripts # SCRIPT_SOCKET_PATH @@ -385,7 +385,7 @@ script_socket_path=/tmp/segget_script_socket # LOGS_DIR # Define a dir to store log files. # Default: -# logs_dir=./logs +# logs_dir=/var/log/seggetd logs_dir=/home/mona/idfetcha/logs # GENERAL_LOG_FILE diff --git a/segget/segget.cpp b/segget/segget.cpp index 409bf9f..1b472f1 100644 --- a/segget/segget.cpp +++ b/segget/segget.cpp @@ -487,8 +487,16 @@ void start_daemon_mode(){ // chdir("/"); // create descriptors in case someone will use them int fileDesc = open("/dev/null", O_RDWR); //stdin - dup(fileDesc); //stdout - dup(fileDesc); //stderr + //stdout + if (dup(fileDesc)){ + log_no_msg("Error in segget.cpp: start_daemon_mode: during dup(fileDesc) - stdout"); + exit(1); + } + //stderr + if (dup(fileDesc)){ + log_no_msg("Error in segget.cpp: start_daemon_mode: during dup(fileDesc) - stderr"); + exit(1); + } log_no_msg("Starting daemon routine"); routine(); log_no_msg("Exited daemon routine"); |