Ticket #1122: ConstantsForHeaderFiles.patch
File ConstantsForHeaderFiles.patch, 7.6 KB (added by , 13 years ago) |
---|
-
db/boinc_db.h
old new 49 49 // Dummy name for file xfers 50 50 #define FILE_MOVER "move_file" 51 51 52 #define BOINC_NAME_LENGTH 256 53 52 54 struct BEST_APP_VERSION; 53 55 54 56 // A compilation target, i.e. a architecture/OS combination. … … 57 59 struct PLATFORM { 58 60 int id; 59 61 int create_time; 60 char name[ 256]; // i.e. "sparc-sun-solaris"61 char user_friendly_name[ 256]; // i.e. "SPARC Solaris 2.8"62 char name[BOINC_NAME_LENGTH]; // i.e. "sparc-sun-solaris" 63 char user_friendly_name[BOINC_NAME_LENGTH]; // i.e. "SPARC Solaris 2.8" 62 64 int deprecated; 63 65 void clear(); 64 66 }; … … 68 70 struct APP { 69 71 int id; 70 72 int create_time; 71 char name[ 256];// application name, preferably short72 int min_version; // don't use app versions before this73 char name[BOINC_NAME_LENGTH]; // application name, preferably short 74 int min_version; // don't use app versions before this 73 75 bool deprecated; 74 char user_friendly_name[ 256];76 char user_friendly_name[BOINC_NAME_LENGTH]; 75 77 int homogeneous_redundancy; 76 78 double weight; // tells the feeder what fraction of results 77 79 // should come from this app … … 153 155 struct USER { 154 156 int id; 155 157 int create_time; 156 char email_addr[ 256];157 char name[ 256];158 char authenticator[ 256];159 char country[ 256];160 char postal_code[ 256];158 char email_addr[BOINC_NAME_LENGTH]; 159 char name[BOINC_NAME_LENGTH]; 160 char authenticator[BOINC_NAME_LENGTH]; 161 char country[BOINC_NAME_LENGTH]; 162 char postal_code[BOINC_NAME_LENGTH]; 161 163 double total_credit; 162 164 double expavg_credit; // credit per second, recent average 163 165 double expavg_time; // when the above was computed … … 179 181 // ... 180 182 // </project_preferences> 181 183 int teamid; // team ID if any 182 char venue[ 256];// home/work/school (default)183 char url[ 256];// user's web page if any184 char venue[BOINC_NAME_LENGTH]; // home/work/school (default) 185 char url[BOINC_NAME_LENGTH]; // user's web page if any 184 186 bool send_email; 185 187 bool show_hosts; 186 188 int posts; // number of messages posted (redundant) … … 193 195 int seti_nresults; // number of WUs completed 194 196 int seti_last_result_time; // time of last result (UNIX) 195 197 double seti_total_cpu; // number of CPU seconds 196 char signature[ 256];198 char signature[BOINC_NAME_LENGTH]; 197 199 // deprecated as of 9/2004 - may be used as temp 198 200 bool has_profile; 199 201 char cross_project_id[256]; … … 217 219 struct TEAM { 218 220 int id; 219 221 int create_time; 220 int userid; // User ID of team founder221 char name[ 256];222 char name_lc[ 256];// Team name in lowercase (used for searching)223 char url[ 256];224 int type; // Team type (see above)225 char name_html[ 256];222 int userid; // User ID of team founder 223 char name[BOINC_NAME_LENGTH]; 224 char name_lc[BOINC_NAME_LENGTH]; // Team name in lowercase (used for searching) 225 char url[BOINC_NAME_LENGTH]; 226 int type; // Team type (see above) 227 char name_html[BOINC_NAME_LENGTH]; 226 228 char description[BLOB_SIZE]; 227 int nusers; // UNDEFINED BY DEFAULT228 char country[ 256];229 int nusers; // UNDEFINED BY DEFAULT 230 char country[BOINC_NAME_LENGTH]; 229 231 double total_credit; 230 232 double expavg_credit; 231 233 double expavg_time; … … 256 258 // all remaining items are assigned by the client 257 259 int timezone; // local STANDARD time at host - UTC time 258 260 // (in seconds) 259 char domain_name[ 256];261 char domain_name[BOINC_NAME_LENGTH]; 260 262 char serialnum[256]; // textual description of coprocessors 261 263 char last_ip_addr[256]; // internal IP address as of last RPC 262 264 int nsame_ip_addr; // # of RPCs with same IP address … … 268 270 double duration_correction_factor; 269 271 270 272 int p_ncpus; // Number of CPUs on host 271 char p_vendor[ 256]; // Vendor name of CPU272 char p_model[ 256]; // Model of CPU273 char p_vendor[BOINC_NAME_LENGTH]; // Vendor name of CPU 274 char p_model[BOINC_NAME_LENGTH]; // Model of CPU 273 275 double p_fpops; // measured floating point ops/sec of CPU 274 276 double p_iops; // measured integer ops/sec of CPU 275 277 double p_membw; // measured memory bandwidth (bytes/sec) of CPU 276 278 // The above are per CPU, not total 277 279 278 char os_name[ 256]; // Name of operating system279 char os_version[ 256]; // Version of operating system280 char os_name[BOINC_NAME_LENGTH]; // Name of operating system 281 char os_version[BOINC_NAME_LENGTH]; // Version of operating system 280 282 281 283 double m_nbytes; // Size of memory in bytes 282 284 double m_cache; // Size of CPU cache in bytes (L1 or L2?) … … 314 316 double credit_per_cpu_sec; 315 317 // deprecated 316 318 317 char venue[ 256]; // home/work/school319 char venue[BOINC_NAME_LENGTH]; // home/work/school 318 320 int nresults_today; // results sent since midnight 319 321 double avg_turnaround; // recent average result turnaround time 320 322 char host_cpid[256]; // host cross-project ID … … 376 378 int id; 377 379 int create_time; 378 380 int appid; // associated app 379 char name[ 256];381 char name[BOINC_NAME_LENGTH]; 380 382 char xml_doc[BLOB_SIZE]; 381 383 int batch; 382 384 // projects can use this for any of several purposes: … … 435 437 // which version this job is committed to (0 if none) 436 438 437 439 // the following not used in the DB 438 char app_name[ 256];440 char app_name[BOINC_NAME_LENGTH]; 439 441 void clear(); 440 442 }; 441 443 … … 518 520 int report_deadline; // deadline for receiving result 519 521 int sent_time; // when result was sent to host 520 522 int received_time; // when result was received from host 521 char name[ 256];523 char name[BOINC_NAME_LENGTH]; 522 524 double cpu_time; // CPU time used to complete result 523 525 char xml_doc_in[BLOB_SIZE]; // descriptions of output files 524 526 char xml_doc_out[BLOB_SIZE]; // MD5s of output files … … 590 592 591 593 struct TRANSITIONER_ITEM { 592 594 int id; // WARNING: this is the WU ID 593 char name[ 256];595 char name[BOINC_NAME_LENGTH]; 594 596 int appid; 595 597 int min_quorum; 596 598 bool need_validate; … … 609 611 int batch; 610 612 int app_version_id; 611 613 int res_id; // This is the RESULT ID 612 char res_name[ 256];614 char res_name[BOINC_NAME_LENGTH]; 613 615 int res_report_deadline; 614 616 int res_server_state; 615 617 int res_outcome; … … 882 884 // messages if the result is no longer needed. 883 885 // 884 886 struct IN_PROGRESS_RESULT { 885 char result_name[ 256];887 char result_name[BOINC_NAME_LENGTH]; 886 888 int assimilate_state; 887 889 int error_mask; 888 890 int server_state; … … 901 903 // into single SQL queries. 902 904 903 905 struct SCHED_RESULT_ITEM { 904 char queried_name[ 256]; // name as reported by client906 char queried_name[BOINC_NAME_LENGTH]; // name as reported by client 905 907 int id; 906 char name[ 256];908 char name[BOINC_NAME_LENGTH]; 907 909 int workunitid; 908 910 int appid; 909 911 int server_state;