mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2220
This commit is contained in:
parent
fa22e933e1
commit
f1eceb8605
|
@ -20,6 +20,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -158,6 +158,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -158,6 +158,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -5981,3 +5981,19 @@ David Sept 1 2003
|
|||
client_state.C
|
||||
doc/
|
||||
client.php
|
||||
|
||||
David Sept 2 2003
|
||||
- changed tools (create_work, add) to use config.xml if it's present
|
||||
(reduces number of command-line args)
|
||||
- renamed config.h to sched_config.h
|
||||
- renamed tools/add to add.py (to avoid confusion with binary)
|
||||
|
||||
sched/
|
||||
Makefile.am
|
||||
sched_config.h (renamed from config.h)
|
||||
*.C
|
||||
tools/
|
||||
Makefile.am
|
||||
add.py (renamed from add)
|
||||
add.C
|
||||
create_work.C
|
||||
|
|
|
@ -160,6 +160,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -158,6 +158,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -158,6 +158,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ LIB_SCHED = libsched.a
|
|||
libsched_a_SOURCES = \
|
||||
sched_shmem.C \
|
||||
sched_util.C \
|
||||
config.C \
|
||||
sched_config.C \
|
||||
sched_messages.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
|
|
|
@ -158,6 +158,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
@ -187,7 +188,7 @@ LIB_SCHED = libsched.a
|
|||
libsched_a_SOURCES = \
|
||||
sched_shmem.C \
|
||||
sched_util.C \
|
||||
config.C \
|
||||
sched_config.C \
|
||||
sched_messages.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
|
@ -272,9 +273,9 @@ LIBRARIES = $(noinst_LIBRARIES)
|
|||
libsched_a_AR = $(AR) cru
|
||||
libsched_a_LIBADD =
|
||||
am_libsched_a_OBJECTS = sched_shmem.$(OBJEXT) sched_util.$(OBJEXT) \
|
||||
config.$(OBJEXT) sched_messages.$(OBJEXT) boinc_db.$(OBJEXT) \
|
||||
db_base.$(OBJEXT) util.$(OBJEXT) crypt.$(OBJEXT) \
|
||||
parse.$(OBJEXT) shmem.$(OBJEXT) md5.$(OBJEXT) \
|
||||
sched_config.$(OBJEXT) sched_messages.$(OBJEXT) \
|
||||
boinc_db.$(OBJEXT) db_base.$(OBJEXT) util.$(OBJEXT) \
|
||||
crypt.$(OBJEXT) parse.$(OBJEXT) shmem.$(OBJEXT) md5.$(OBJEXT) \
|
||||
md5_file.$(OBJEXT) messages.$(OBJEXT) \
|
||||
process_result_template.$(OBJEXT) backend_lib.$(OBJEXT)
|
||||
libsched_a_OBJECTS = $(am_libsched_a_OBJECTS)
|
||||
|
@ -349,8 +350,8 @@ am__depfiles_maybe = depfiles
|
|||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/assimilate_handler.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/assimilator.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/backend_lib.Po ./$(DEPDIR)/boinc_db.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/config.Po ./$(DEPDIR)/crypt.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/db_base.Po ./$(DEPDIR)/db_dump.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/crypt.Po ./$(DEPDIR)/db_base.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/db_dump.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/fcgi-handle_request.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/fcgi-main.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/fcgi-server_types.Po \
|
||||
|
@ -361,6 +362,7 @@ am__depfiles_maybe = depfiles
|
|||
@AMDEP_TRUE@ ./$(DEPDIR)/md5_file.Po ./$(DEPDIR)/messages.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/parse.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/process_result_template.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_config.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_messages.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_shmem.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_util.Po \
|
||||
|
@ -496,7 +498,6 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assimilator.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backend_lib.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boinc_db.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db_base.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db_dump.Po@am__quote@
|
||||
|
@ -514,6 +515,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messages.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_result_template.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_config.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_messages.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_shmem.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_util.Po@am__quote@
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#define LOCKFILE "assimilator.out"
|
||||
#define PIDFILE "assimilator.pid"
|
||||
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
|
||||
// assimilate all WUs that need it
|
||||
// return nonzero if did anything
|
||||
|
@ -94,7 +94,7 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
}
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::CRITICAL, "Can't parse config file\n");
|
||||
exit(1);
|
||||
|
|
|
@ -455,7 +455,7 @@ int tables_file() {
|
|||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
int retval, i;
|
||||
char dir[256];
|
||||
|
||||
|
@ -493,7 +493,7 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
log_messages.printf(SchedMessages::NORMAL, "Starting\n");
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::NORMAL, "Can't parse config file\n");
|
||||
exit(1);
|
||||
|
|
|
@ -64,12 +64,11 @@
|
|||
#define LOCKFILE "feeder.out"
|
||||
#define PIDFILE "feeder.pid"
|
||||
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
|
||||
SCHED_SHMEM* ssp;
|
||||
|
||||
void cleanup_shmem()
|
||||
{
|
||||
void cleanup_shmem() {
|
||||
detach_shmem((void*)ssp);
|
||||
destroy_shmem(config.shmem_key);
|
||||
}
|
||||
|
@ -222,7 +221,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
unlink(REREAD_DB_FILENAME);
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::CRITICAL, "can't parse config file\n");
|
||||
exit(1);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#define LOCKFILE "file_deleter.out"
|
||||
#define PIDFILE "file_deleter.pid"
|
||||
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
|
||||
int wu_delete_files(WORKUNIT& wu) {
|
||||
char* p;
|
||||
|
@ -143,7 +143,7 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
}
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::CRITICAL, "Can't parse config file\n");
|
||||
exit(1);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "sched_util.h"
|
||||
#include "crypt.h"
|
||||
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
|
||||
#define ERR_TRANSIENT true
|
||||
#define ERR_PERMANENT false
|
||||
|
@ -340,7 +340,7 @@ int main() {
|
|||
|
||||
log_messages.set_debug_level(DEBUG_LEVEL);
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
return_error(ERR_TRANSIENT, "can't read config file");
|
||||
exit(1);
|
||||
|
|
|
@ -51,7 +51,7 @@ static const char* STDERR_FILENAME = "../log/cgi.log";
|
|||
bool use_files = false; // use disk files for req/reply msgs (for debugging)
|
||||
|
||||
DB_PROJECT gproject;
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
|
||||
int main() {
|
||||
FILE* fin, *fout;
|
||||
|
@ -70,7 +70,7 @@ int main() {
|
|||
|
||||
log_messages.set_debug_level(DEBUG_LEVEL);
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::CRITICAL, "Can't parse config file\n");
|
||||
exit(1);
|
||||
|
|
|
@ -21,4 +21,4 @@
|
|||
#include "sched_config.h"
|
||||
|
||||
extern DB_PROJECT gproject;
|
||||
extern CONFIG config;
|
||||
extern SCHED_CONFIG config;
|
||||
|
|
|
@ -20,8 +20,13 @@
|
|||
// make_work
|
||||
// -wu_name name
|
||||
// -result_template filename
|
||||
// [ -cushion n ]
|
||||
// [ -max_wus n ]
|
||||
// [ -cushion n ] // make work if fewer than this many unsent results
|
||||
// [ -max_wus n ] // don't make work if more than this many WUs
|
||||
// [ -min_quorum n ]
|
||||
// [ -target_nresults n ]
|
||||
// [ -max_error_results n ]
|
||||
// [ -max_total_results n ]
|
||||
// [ -max_success_results n ]
|
||||
//
|
||||
// Create WU and result records as needed to maintain a pool of work (for
|
||||
// testing purposes).
|
||||
|
@ -46,12 +51,12 @@
|
|||
#define PIDFILE "make_work.pid"
|
||||
|
||||
int max_wus = 0;
|
||||
int cushion = 30;
|
||||
// int min_quorum = 0;
|
||||
// int target_nresults = 0;
|
||||
// int max_error_results = 0;
|
||||
// int max_total_results = 0;
|
||||
// int max_success_results = 0;
|
||||
int cushion = 300;
|
||||
int min_quorum = 2;
|
||||
int target_nresults = 5;
|
||||
int max_error_results = 10;
|
||||
int max_total_results = 20;
|
||||
int max_success_results = 10;
|
||||
|
||||
char wu_name[256], result_template_file[256];
|
||||
|
||||
|
@ -97,8 +102,7 @@ inline const char* get_query_unsent_results()
|
|||
return query_unsent_results;
|
||||
}
|
||||
|
||||
inline int count_results(const char* query="")
|
||||
{
|
||||
inline int count_results(const char* query="") {
|
||||
int n;
|
||||
DB_RESULT result;
|
||||
int retval = result.count(n, const_cast<char*>(query));
|
||||
|
@ -109,8 +113,7 @@ inline int count_results(const char* query="")
|
|||
return n;
|
||||
}
|
||||
|
||||
inline int count_workunits(const char* query="")
|
||||
{
|
||||
inline int count_workunits(const char* query="") {
|
||||
int n;
|
||||
DB_WORKUNIT workunit;
|
||||
int retval = workunit.count(n, const_cast<char*>(query));
|
||||
|
@ -122,7 +125,7 @@ inline int count_workunits(const char* query="")
|
|||
}
|
||||
|
||||
void make_work() {
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
char * p;
|
||||
int retval, start_time=time(0);
|
||||
char keypath[256], result_template[MAX_BLOB_SIZE];
|
||||
|
@ -133,7 +136,7 @@ void make_work() {
|
|||
DB_WORKUNIT wu;
|
||||
int seqno = 0;
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::CRITICAL, "can't read config file\n");
|
||||
exit(1);
|
||||
|
@ -213,11 +216,11 @@ void make_work() {
|
|||
sprintf(wu.name, "wu_%d_%d", start_time, seqno++);
|
||||
wu.id = 0;
|
||||
wu.create_time = time(0);
|
||||
// wu.min_quorum = min_quorum;
|
||||
// wu.target_nresults = target_nresults;
|
||||
// wu.max_error_results = max_error_results;
|
||||
// wu.max_total_results = max_total_results;
|
||||
// wu.max_success_results = max_success_results;
|
||||
wu.min_quorum = min_quorum;
|
||||
wu.target_nresults = target_nresults;
|
||||
wu.max_error_results = max_error_results;
|
||||
wu.max_total_results = max_total_results;
|
||||
wu.max_success_results = max_success_results;
|
||||
strcpy(wu.result_template, result_template);
|
||||
process_result_template_upload_url_only(wu.result_template, config.upload_url);
|
||||
wu.transition_time = time(0);
|
||||
|
@ -245,16 +248,16 @@ int main(int argc, char** argv) {
|
|||
strcpy(wu_name, argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-max_wus")) {
|
||||
max_wus = atoi(argv[++i]);
|
||||
// } else if (!strcmp(argv[i], "-min_quorum")) {
|
||||
// min_quorum = atoi(argv[++i]);
|
||||
// } else if (!strcmp(argv[i], "-target_nresults")) {
|
||||
// target_nresults = atoi(argv[++i]);
|
||||
// } else if (!strcmp(argv[i], "-max_error_results")) {
|
||||
// max_error_results = atoi(argv[++i]);
|
||||
// } else if (!strcmp(argv[i], "-max_total_results")) {
|
||||
// max_total_results = atoi(argv[++i]);
|
||||
// } else if (!strcmp(argv[i], "-max_success_results")) {
|
||||
// max_success_results = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-min_quorum")) {
|
||||
min_quorum = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-target_nresults")) {
|
||||
target_nresults = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-max_error_results")) {
|
||||
max_error_results = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-max_total_results")) {
|
||||
max_total_results = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-max_success_results")) {
|
||||
max_success_results = atoi(argv[++i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,11 +265,6 @@ int main(int argc, char** argv) {
|
|||
#define CHKARG_STR(v,m) CHKARG(strlen(v),m)
|
||||
CHKARG_STR(result_template_file , "need -result_template_file");
|
||||
CHKARG_STR(wu_name , "need -wu_name");
|
||||
// CHKARG(min_quorum, "need -min_quorum");
|
||||
// CHKARG(target_nresults, "need -target_nresults");
|
||||
// CHKARG(max_error_results, "need -max_error_results");
|
||||
// CHKARG(max_total_results, "need -max_total_results");
|
||||
// CHKARG(max_success_results, "need -max_success_results");
|
||||
#undef CHKARG
|
||||
#undef CHKARG_STR
|
||||
|
||||
|
@ -282,9 +280,11 @@ int main(int argc, char** argv) {
|
|||
// exit(1);
|
||||
// }
|
||||
// write_pid_file(PIDFILE);
|
||||
// log_messages.printf(SchedMessages::NORMAL, "Starting: min_quorum=%d target_nresults=%d max_error_results=%d max_total_results=%d max_success_results=%d\n",
|
||||
// min_quorum, target_nresults, max_error_results, max_total_results, max_success_results);
|
||||
log_messages.printf(SchedMessages::NORMAL, "Starting");
|
||||
log_messages.printf(
|
||||
SchedMessages::NORMAL,
|
||||
"Starting: min_quorum=%d target_nresults=%d max_error_results=%d max_total_results=%d max_success_results=%d\n",
|
||||
min_quorum, target_nresults, max_error_results, max_total_results, max_success_results
|
||||
);
|
||||
install_sigint_handler();
|
||||
|
||||
srand48(getpid() + time(0));
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
|
||||
#include "sched_config.h"
|
||||
|
||||
const char* CONFIG_FILE = "../config.xml";
|
||||
const char* CONFIG_FILE = "config.xml";
|
||||
|
||||
int CONFIG::parse(FILE* in) {
|
||||
int SCHED_CONFIG::parse(FILE* in) {
|
||||
char buf[256];
|
||||
|
||||
memset(this, 0, sizeof(CONFIG));
|
||||
memset(this, 0, sizeof(SCHED_CONFIG));
|
||||
while (fgets(buf, 256, in)) {
|
||||
if (match_tag(buf, "</config>")) return 0;
|
||||
else if (parse_str(buf, "<db_name>", db_name, sizeof(db_name))) continue;
|
||||
|
@ -48,10 +48,15 @@ int CONFIG::parse(FILE* in) {
|
|||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
||||
int CONFIG::parse_file() {
|
||||
int SCHED_CONFIG::parse_file(char* dir) {
|
||||
FILE* f;
|
||||
char path[256];
|
||||
int retval;
|
||||
|
||||
f = fopen(CONFIG_FILE, "r");
|
||||
sprintf(path, "%s/%s", dir, CONFIG_FILE);
|
||||
f = fopen(path, "r");
|
||||
if (!f) return ERR_FOPEN;
|
||||
return parse(f);
|
||||
retval = parse(f);
|
||||
fclose(f);
|
||||
return retval;
|
||||
}
|
|
@ -17,12 +17,12 @@
|
|||
// Contributor(s):
|
||||
//
|
||||
|
||||
#ifndef _CONFIG_
|
||||
#define _CONFIG_
|
||||
#ifndef _SCHED_CONFIG_
|
||||
#define _SCHED_CONFIG_
|
||||
|
||||
// parsed version of server configuration file
|
||||
//
|
||||
class CONFIG {
|
||||
class SCHED_CONFIG {
|
||||
public:
|
||||
char db_name[256];
|
||||
char db_passwd[256];
|
||||
|
@ -33,10 +33,9 @@ public:
|
|||
char upload_url[256];
|
||||
char upload_dir[256];
|
||||
char user_name[256];
|
||||
// char* start_commands[20];
|
||||
|
||||
int parse(FILE*);
|
||||
int parse_file();
|
||||
int parse_file(char* dir=".");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
|
||||
SchedMessages log_messages;
|
||||
|
||||
const char* SchedMessages::v_format_kind(int kind) const
|
||||
{
|
||||
const char* SchedMessages::v_format_kind(int kind) const {
|
||||
switch(kind) {
|
||||
case CRITICAL: return "CRITICAL";
|
||||
case NORMAL: return "normal ";
|
||||
|
@ -32,7 +31,6 @@ const char* SchedMessages::v_format_kind(int kind) const
|
|||
}
|
||||
}
|
||||
|
||||
bool SchedMessages::v_message_wanted(int kind) const
|
||||
{
|
||||
bool SchedMessages::v_message_wanted(int kind) const {
|
||||
return ( kind <= debug_level );
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ int main() {
|
|||
SCHED_SHMEM* ssp;
|
||||
int retval, i;
|
||||
void* p;
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
printf("can't parse config\n");
|
||||
exit(1);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "sched_util.h"
|
||||
|
||||
int main() {
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
int i, retval;
|
||||
char* p;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ using namespace std;
|
|||
#define PIDFILE "transitioner.pid"
|
||||
|
||||
int startup_time;
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
R_RSA_PRIVATE_KEY key;
|
||||
|
||||
void handle_wu(DB_WORKUNIT& wu) {
|
||||
|
@ -333,7 +333,7 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
}
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::CRITICAL, "can't read config file\n");
|
||||
exit(1);
|
||||
|
|
|
@ -117,7 +117,7 @@ int update_teams() {
|
|||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
int retval, i;
|
||||
bool do_update_teams = false, do_update_users = false;
|
||||
bool do_update_hosts = false, asynch = false;
|
||||
|
@ -155,7 +155,7 @@ int main(int argc, char** argv) {
|
|||
log_messages.printf(SchedMessages::NORMAL, "Starting\n");
|
||||
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::CRITICAL, "Can't parse config file\n");
|
||||
exit(1);
|
||||
|
|
|
@ -56,7 +56,7 @@ using namespace std;
|
|||
extern int check_set(vector<RESULT>&, int& canonical, double& credit);
|
||||
extern int check_pair(RESULT const&, RESULT const&, bool&);
|
||||
|
||||
CONFIG config;
|
||||
SCHED_CONFIG config;
|
||||
char app_name[256];
|
||||
|
||||
// here when a result has been validated;
|
||||
|
@ -371,7 +371,7 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
}
|
||||
|
||||
retval = config.parse_file();
|
||||
retval = config.parse_file("..");
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::CRITICAL, "Can't parse config file\n");
|
||||
exit(1);
|
||||
|
|
|
@ -22,36 +22,35 @@
|
|||
// TODO: use md5 hash
|
||||
|
||||
// read file into memory
|
||||
int init_result_trivial(RESULT const& result, void*& data)
|
||||
{
|
||||
int init_result_trivial(RESULT const& result, void*& data) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int check_pair_initialized_trivial(RESULT const& /*r1*/, void* /*data1*/,
|
||||
RESULT const& /*r2*/, void* /*data2*/,
|
||||
bool& match)
|
||||
{
|
||||
int check_pair_initialized_trivial(
|
||||
RESULT const& /*r1*/, void* /*data1*/,
|
||||
RESULT const& /*r2*/, void* /*data2*/,
|
||||
bool& match
|
||||
) {
|
||||
match = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cleanup_result_trivial(RESULT const& /*result*/, void* /*data*/)
|
||||
{
|
||||
int cleanup_result_trivial(RESULT const& /*result*/, void* /*data*/) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Always grant credit to everybody
|
||||
//
|
||||
int check_set(vector<RESULT>& results, int& canonicalid, double& credit)
|
||||
{
|
||||
return generic_check_set_majority(results, canonicalid, credit,
|
||||
init_result_trivial,
|
||||
check_pair_initialized_trivial,
|
||||
cleanup_result_trivial);
|
||||
int check_set(vector<RESULT>& results, int& canonicalid, double& credit) {
|
||||
return generic_check_set_majority(
|
||||
results, canonicalid, credit,
|
||||
init_result_trivial,
|
||||
check_pair_initialized_trivial,
|
||||
cleanup_result_trivial
|
||||
);
|
||||
}
|
||||
|
||||
int check_pair(RESULT const& r1, RESULT const& r2, bool& match)
|
||||
{
|
||||
int check_pair(RESULT const& r1, RESULT const& r2, bool& match) {
|
||||
// return generic_check_pair(r1, r2, match,
|
||||
// init_result_trivial,
|
||||
// check_pair_initialized_trivial,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "parse.h"
|
||||
#include <cassert>
|
||||
|
||||
extern CONFIG config;
|
||||
extern SCHED_CONFIG config;
|
||||
|
||||
// get the name of a result's (first) output file
|
||||
//
|
||||
|
|
|
@ -158,6 +158,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
|
|
@ -8,34 +8,36 @@ EXTRA_DIST = make_project
|
|||
|
||||
# TODO: use libboinc for these:
|
||||
|
||||
create_work_SOURCES = \
|
||||
create_work.C \
|
||||
backend_lib.C \
|
||||
process_result_template.C \
|
||||
../lib/md5_file.C \
|
||||
../lib/md5.c \
|
||||
../lib/parse.C \
|
||||
../lib/util.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
../lib/crypt.C \
|
||||
backend_lib.h
|
||||
create_work_SOURCES = \
|
||||
create_work.C \
|
||||
backend_lib.C \
|
||||
process_result_template.C \
|
||||
../lib/md5_file.C \
|
||||
../lib/md5.c \
|
||||
../lib/parse.C \
|
||||
../lib/util.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
../lib/crypt.C \
|
||||
../sched/sched_config.C \
|
||||
backend_lib.h
|
||||
|
||||
create_work_DEPENDENCIES = $(LIBRSA)
|
||||
create_work_LDADD = $(RSA_LIBS) $(MYSQL_LIBS)
|
||||
|
||||
add_SOURCES = \
|
||||
add.C \
|
||||
backend_lib.C \
|
||||
process_result_template.C \
|
||||
../lib/md5_file.C \
|
||||
../lib/md5.c \
|
||||
../lib/parse.C \
|
||||
../lib/util.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
../lib/crypt.C \
|
||||
backend_lib.h
|
||||
add_SOURCES = \
|
||||
add.C \
|
||||
backend_lib.C \
|
||||
process_result_template.C \
|
||||
../lib/md5_file.C \
|
||||
../lib/md5.c \
|
||||
../lib/parse.C \
|
||||
../lib/util.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
../lib/crypt.C \
|
||||
../sched/sched_config.C \
|
||||
backend_lib.h
|
||||
|
||||
add_DEPENDENCIES = $(LIBRSA)
|
||||
add_LDADD = $(RSA_LIBS) $(MYSQL_LIBS)
|
||||
|
|
|
@ -158,6 +158,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_srcdir)/RSAEuro/source \
|
||||
-I$(top_srcdir)/client \
|
||||
-I$(top_srcdir)/tools \
|
||||
-I$(top_srcdir)/sched \
|
||||
$(MYSQL_CFLAGS) \
|
||||
-include $(top_builddir)/config.h
|
||||
|
||||
|
@ -173,34 +174,36 @@ EXTRA_DIST = make_project
|
|||
|
||||
# TODO: use libboinc for these:
|
||||
create_work_SOURCES = \
|
||||
create_work.C \
|
||||
backend_lib.C \
|
||||
process_result_template.C \
|
||||
../lib/md5_file.C \
|
||||
../lib/md5.c \
|
||||
../lib/parse.C \
|
||||
../lib/util.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
../lib/crypt.C \
|
||||
backend_lib.h
|
||||
create_work.C \
|
||||
backend_lib.C \
|
||||
process_result_template.C \
|
||||
../lib/md5_file.C \
|
||||
../lib/md5.c \
|
||||
../lib/parse.C \
|
||||
../lib/util.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
../lib/crypt.C \
|
||||
../sched/sched_config.C \
|
||||
backend_lib.h
|
||||
|
||||
|
||||
create_work_DEPENDENCIES = $(LIBRSA)
|
||||
create_work_LDADD = $(RSA_LIBS) $(MYSQL_LIBS)
|
||||
|
||||
add_SOURCES = \
|
||||
add.C \
|
||||
backend_lib.C \
|
||||
process_result_template.C \
|
||||
../lib/md5_file.C \
|
||||
../lib/md5.c \
|
||||
../lib/parse.C \
|
||||
../lib/util.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
../lib/crypt.C \
|
||||
backend_lib.h
|
||||
add.C \
|
||||
backend_lib.C \
|
||||
process_result_template.C \
|
||||
../lib/md5_file.C \
|
||||
../lib/md5.c \
|
||||
../lib/parse.C \
|
||||
../lib/util.C \
|
||||
../db/boinc_db.C \
|
||||
../db/db_base.C \
|
||||
../lib/crypt.C \
|
||||
../sched/sched_config.C \
|
||||
backend_lib.h
|
||||
|
||||
|
||||
add_DEPENDENCIES = $(LIBRSA)
|
||||
|
@ -217,7 +220,7 @@ PROGRAMS = $(bin_PROGRAMS)
|
|||
am_add_OBJECTS = add.$(OBJEXT) backend_lib.$(OBJEXT) \
|
||||
process_result_template.$(OBJEXT) md5_file.$(OBJEXT) \
|
||||
md5.$(OBJEXT) parse.$(OBJEXT) util.$(OBJEXT) boinc_db.$(OBJEXT) \
|
||||
db_base.$(OBJEXT) crypt.$(OBJEXT)
|
||||
db_base.$(OBJEXT) crypt.$(OBJEXT) sched_config.$(OBJEXT)
|
||||
add_OBJECTS = $(am_add_OBJECTS)
|
||||
add_LDFLAGS =
|
||||
am_country_select_OBJECTS = country_select.$(OBJEXT) countries.$(OBJEXT)
|
||||
|
@ -228,7 +231,7 @@ country_select_LDFLAGS =
|
|||
am_create_work_OBJECTS = create_work.$(OBJEXT) backend_lib.$(OBJEXT) \
|
||||
process_result_template.$(OBJEXT) md5_file.$(OBJEXT) \
|
||||
md5.$(OBJEXT) parse.$(OBJEXT) util.$(OBJEXT) boinc_db.$(OBJEXT) \
|
||||
db_base.$(OBJEXT) crypt.$(OBJEXT)
|
||||
db_base.$(OBJEXT) crypt.$(OBJEXT) sched_config.$(OBJEXT)
|
||||
create_work_OBJECTS = $(am_create_work_OBJECTS)
|
||||
create_work_LDFLAGS =
|
||||
|
||||
|
@ -242,7 +245,7 @@ am__depfiles_maybe = depfiles
|
|||
@AMDEP_TRUE@ ./$(DEPDIR)/db_base.Po ./$(DEPDIR)/md5.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/md5_file.Po ./$(DEPDIR)/parse.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/process_result_template.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/util.Po
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sched_config.Po ./$(DEPDIR)/util.Po
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
|
@ -297,6 +300,7 @@ util.$(OBJEXT): ../lib/util.C
|
|||
boinc_db.$(OBJEXT): ../db/boinc_db.C
|
||||
db_base.$(OBJEXT): ../db/db_base.C
|
||||
crypt.$(OBJEXT): ../lib/crypt.C
|
||||
sched_config.$(OBJEXT): ../sched/sched_config.C
|
||||
add$(EXEEXT): $(add_OBJECTS) $(add_DEPENDENCIES)
|
||||
@rm -f add$(EXEEXT)
|
||||
$(CXXLINK) $(add_LDFLAGS) $(add_OBJECTS) $(add_LDADD) $(LIBS)
|
||||
|
@ -326,6 +330,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5_file.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_result_template.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_config.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@
|
||||
|
||||
distclean-depend:
|
||||
|
@ -485,6 +490,28 @@ crypt.obj: ../lib/crypt.C
|
|||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o crypt.obj `if test -f '../lib/crypt.C'; then $(CYGPATH_W) '../lib/crypt.C'; else $(CYGPATH_W) '$(srcdir)/../lib/crypt.C'`
|
||||
|
||||
sched_config.o: ../sched/sched_config.C
|
||||
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sched_config.o -MD -MP -MF "$(DEPDIR)/sched_config.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o sched_config.o `test -f '../sched/sched_config.C' || echo '$(srcdir)/'`../sched/sched_config.C; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/sched_config.Tpo" "$(DEPDIR)/sched_config.Po"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/sched_config.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../sched/sched_config.C' object='sched_config.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/sched_config.Po' tmpdepfile='$(DEPDIR)/sched_config.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sched_config.o `test -f '../sched/sched_config.C' || echo '$(srcdir)/'`../sched/sched_config.C
|
||||
|
||||
sched_config.obj: ../sched/sched_config.C
|
||||
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sched_config.obj -MD -MP -MF "$(DEPDIR)/sched_config.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o sched_config.obj `if test -f '../sched/sched_config.C'; then $(CYGPATH_W) '../sched/sched_config.C'; else $(CYGPATH_W) '$(srcdir)/../sched/sched_config.C'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/sched_config.Tpo" "$(DEPDIR)/sched_config.Po"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/sched_config.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='../sched/sched_config.C' object='sched_config.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/sched_config.Po' tmpdepfile='$(DEPDIR)/sched_config.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sched_config.obj `if test -f '../sched/sched_config.C'; then $(CYGPATH_W) '../sched/sched_config.C'; else $(CYGPATH_W) '$(srcdir)/../sched/sched_config.C'`
|
||||
|
||||
countries.o: ../lib/countries.C
|
||||
@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT countries.o -MD -MP -MF "$(DEPDIR)/countries.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o countries.o `test -f '../lib/countries.C' || echo '$(srcdir)/'`../lib/countries.C; \
|
||||
|
|
15
tools/add.C
15
tools/add.C
|
@ -49,6 +49,7 @@
|
|||
#include <time.h>
|
||||
|
||||
#include "boinc_db.h"
|
||||
#include "sched_config.h"
|
||||
#include "backend_lib.h"
|
||||
#include "md5_file.h"
|
||||
#include "crypt.h"
|
||||
|
@ -338,6 +339,18 @@ void add_user() {
|
|||
|
||||
int main(int argc, char** argv) {
|
||||
int i, retval;
|
||||
SCHED_CONFIG config;
|
||||
|
||||
retval = config.parse_file();
|
||||
if (retval) {
|
||||
printf("no config file found\n");
|
||||
} else {
|
||||
strcpy(db_name, config.db_name);
|
||||
strcpy(db_passwd, config.db_passwd);
|
||||
strcpy(download_url, config.download_url);
|
||||
strcpy(download_dir, config.download_dir);
|
||||
sprintf(code_sign_keyfile, "%s/code_sign_private", config.key_dir);
|
||||
}
|
||||
|
||||
for (i=2; i<argc; i++) {
|
||||
next_arg:
|
||||
|
@ -407,7 +420,7 @@ int main(int argc, char** argv) {
|
|||
exit(1);
|
||||
}
|
||||
if (!strcmp(argv[1], "project")) {
|
||||
add_project();
|
||||
add_project();
|
||||
} else if (!strcmp(argv[1], "app")) {
|
||||
add_app();
|
||||
} else if (!strcmp(argv[1], "platform")) {
|
||||
|
|
|
@ -22,23 +22,23 @@
|
|||
// -wu_name name
|
||||
// -wu_template filename
|
||||
// -result_template filename
|
||||
// -db_name x
|
||||
// -db_passwd x
|
||||
// -upload_url x
|
||||
// -download_url x
|
||||
// -download_dir x
|
||||
// [ -db_name x ] // read the following from config.xml if available
|
||||
// [ -db_passwd x ]
|
||||
// [ -upload_url x ]
|
||||
// [ -download_url x ]
|
||||
// [ -download_dir x ]
|
||||
// [ -keyfile path ]
|
||||
// -rsc_fpops n
|
||||
// -rsc_iops n
|
||||
// -rsc_memory n
|
||||
// -rsc_disk n
|
||||
// -keyfile path
|
||||
// -delay_bound x
|
||||
// -min_quorum x
|
||||
// -target_nresults x
|
||||
// -max_error_results x
|
||||
// -max_total_results x
|
||||
// -max_success_results x
|
||||
// -sequence n
|
||||
// [ -min_quorum x ]
|
||||
// [ -target_nresults x ]
|
||||
// [ -max_error_results x ]
|
||||
// [ -max_total_results x ]
|
||||
// [ -max_success_results x ]
|
||||
// [ -sequence n ]
|
||||
// infile1 infile2 ...
|
||||
//
|
||||
// Create a workunit and results.
|
||||
|
@ -57,6 +57,7 @@
|
|||
#include "boinc_db.h"
|
||||
#include "crypt.h"
|
||||
#include "backend_lib.h"
|
||||
#include "sched_config.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
DB_APP app;
|
||||
|
@ -66,20 +67,39 @@ int main(int argc, char** argv) {
|
|||
char wu_template_file[256], result_template_file[256];
|
||||
char keyfile[256];
|
||||
char** infiles = NULL;
|
||||
int i, ninfiles, redundancy, sequence=0;
|
||||
int i, ninfiles, sequence=0;
|
||||
R_RSA_PRIVATE_KEY key;
|
||||
char download_dir[256], db_name[256], db_passwd[256];
|
||||
char upload_url[256], download_url[256];
|
||||
char buf[256];
|
||||
SCHED_CONFIG config;
|
||||
|
||||
strcpy(result_template_file, "");
|
||||
strcpy(app.name, "");
|
||||
strcpy(db_passwd, "");
|
||||
strcpy(keyfile, "");
|
||||
redundancy = 1;
|
||||
i = 1;
|
||||
ninfiles = 0;
|
||||
wu.clear();
|
||||
|
||||
wu.min_quorum = 2;
|
||||
wu.target_nresults = 5;
|
||||
wu.max_error_results = 10;
|
||||
wu.max_total_results = 20;
|
||||
wu.max_success_results = 10;
|
||||
|
||||
retval = config.parse_file();
|
||||
if (retval) {
|
||||
printf("No configure file found\n");
|
||||
} else {
|
||||
strcpy(db_name, config.db_name);
|
||||
strcpy(db_passwd, config.db_passwd);
|
||||
strcpy(download_url, config.download_url);
|
||||
strcpy(download_dir, config.download_dir);
|
||||
strcpy(upload_url, config.upload_url);
|
||||
sprintf(keyfile, "%s/upload_private", config.key_dir);
|
||||
}
|
||||
|
||||
while (i < argc) {
|
||||
if (!strcmp(argv[i], "-appname")) {
|
||||
strcpy(app.name, argv[++i]);
|
||||
|
|
Loading…
Reference in New Issue