Removed an assert and changed it so BOINC_UPLOAD_DIR AND BOINC_KEY_DIR are defined at compile time

svn path=/trunk/boinc/; revision=190
This commit is contained in:
Barry Luong 2002-07-12 19:19:31 +00:00
parent ce23e8adda
commit 127d6a02f7
2 changed files with 3 additions and 3 deletions

View File

@ -12,6 +12,7 @@ CFLAGS = -g -Wall @DEFS@ \
-DBOINC_DB_NAME=\"$(BOINC_DB_NAME)\" \
-DBOINC_KEY=$(BOINC_KEY) \
-DBOINC_KEY_DIR=\"$(BOINC_KEY_DIR)\" \
-DBOINC_UPLOAD_DIR=\"$(BOINC_UPLOAD_DIR)\" \
-DBOINC_USER=\"$(BOINC_USER)\" \
-I/usr/local/mysql/include \
-I@top_srcdir@/RSAEuro/source \

View File

@ -58,7 +58,6 @@ int FILE_INFO::parse(FILE* in) {
}
int print_status(int status, char* message) {
assert(message!=NULL);
printf("Content-type: text/plain\n\n<status>%d</status>\n", status);
if (message) printf("<error>%s</error>\n", message);
#if 0
@ -154,7 +153,7 @@ int handle_request(FILE* in, R_RSA_PUBLIC_KEY& key) {
return -1;
}
sprintf(path, "%s/%s", getenv("BOINC_UPLOAD_DIR"), file_info.name);
sprintf(path, "%s/%s", BOINC_UPLOAD_DIR, file_info.name);
retval = copy_socket_to_file(in, path, offset, nbytes);
break;
}
@ -166,7 +165,7 @@ int get_key(R_RSA_PUBLIC_KEY& key) {
FILE* f;
int retval;
char buf[256];
sprintf(buf, "%s/upload_public", getenv("BOINC_KEY_DIR"));
sprintf(buf, "%s/upload_public", BOINC_KEY_DIR);
f = fopen(buf, "r");
if (!f) return -1;
retval = scan_key_hex(f, (KEY*)&key, sizeof(key));