mirror of https://github.com/BOINC/boinc.git
Merge branch 'master' of github.com:BOINC/boinc
This commit is contained in:
commit
e30de9c2dd
|
@ -29,6 +29,7 @@
|
|||
#include "BOINCBaseWizard.h"
|
||||
#include "WizardAttach.h"
|
||||
#include "sg_ProjectPanel.h"
|
||||
#include "str_replace.h"
|
||||
#if TESTBIGICONPOPUP
|
||||
#include "test/sah_40.xpm"
|
||||
#include "test/einstein_icon.xpm"
|
||||
|
@ -250,8 +251,7 @@ void CSimpleProjectPanel::UpdateInterface() {
|
|||
char* ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(n))->project_url;
|
||||
if (strcmp(m_CurrentSelectedProjectURL, ctrl_url)) {
|
||||
b_needMenuRebuild = true;
|
||||
strncpy(m_CurrentSelectedProjectURL, ctrl_url, sizeof(m_CurrentSelectedProjectURL));
|
||||
m_CurrentSelectedProjectURL[sizeof(m_CurrentSelectedProjectURL)-1] = '\0';
|
||||
strlcpy(m_CurrentSelectedProjectURL, ctrl_url, sizeof(m_CurrentSelectedProjectURL));
|
||||
}
|
||||
|
||||
PROJECT* project = pDoc->state.lookup_project(ctrl_url);
|
||||
|
@ -459,8 +459,7 @@ void CSimpleProjectPanel::UpdateProjectList() {
|
|||
}
|
||||
#endif
|
||||
selData = new ProjectSelectionData;
|
||||
strncpy(selData->project_url, project->master_url, sizeof(selData->project_url));
|
||||
selData->project_url[sizeof(selData->project_url)-1] = '\0';
|
||||
strlcpy(selData->project_url, project->master_url, sizeof(selData->project_url));
|
||||
selData->project_files_downloaded_time = project->project_files_downloaded_time;
|
||||
wxBitmap* projectBM = GetProjectSpecificBitmap(selData->project_url);
|
||||
#if SORTPROJECTLIST
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "sg_TaskPanel.h"
|
||||
#include "boinc_api.h"
|
||||
#include "filesys.h"
|
||||
#include "str_replace.h"
|
||||
|
||||
|
||||
#define SORTTASKLIST 1 /* TRUE to sort task selection control alphabetically */
|
||||
|
@ -1012,10 +1013,8 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
|
|||
|
||||
selData = new TaskSelectionData;
|
||||
selData->result = result;
|
||||
strncpy(selData->result_name, result->name, sizeof(selData->result_name));
|
||||
selData->result_name[sizeof(selData->result_name)-1] = '\0';
|
||||
strncpy(selData->project_url, result->project_url, sizeof(selData->project_url));
|
||||
selData->project_url[sizeof(selData->project_url)-1] = '\0';
|
||||
strlcpy(selData->result_name, result->name, sizeof(selData->result_name));
|
||||
strlcpy(selData->project_url, result->project_url, sizeof(selData->project_url));
|
||||
selData->dotColor = -1;
|
||||
FindSlideShowFiles(selData);
|
||||
project = pDoc->state.lookup_project(result->project_url);
|
||||
|
|
|
@ -505,6 +505,7 @@ FILE* boinc_fopen(const char* path, const char* mode) {
|
|||
}
|
||||
if (f) {
|
||||
if (-1 == fcntl(fileno(f), F_SETFD, FD_CLOEXEC)) {
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -541,6 +541,8 @@ const char* boincerror(int which_error) {
|
|||
case ERR_STATFS: return "statfs() failed";
|
||||
case ERR_PIPE: return "pipe() failed";
|
||||
case ERR_NEED_HTTPS: return "HTTPS needed";
|
||||
case ERR_CHMOD : return "chmod() failed";
|
||||
case ERR_STAT : return "stat() failed";
|
||||
case HTTP_STATUS_NOT_FOUND: return "HTTP file not found";
|
||||
case HTTP_STATUS_PROXY_AUTH_REQ: return "HTTP proxy authentication failure";
|
||||
case HTTP_STATUS_RANGE_REQUEST_ERROR: return "HTTP range request error";
|
||||
|
|
|
@ -3862,7 +3862,7 @@
|
|||
DD9843DD09920F220090855B /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
GCC_ENABLE_OBJC_GC = supported;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
|
@ -4034,7 +4034,7 @@
|
|||
DD9E2362091CBDAE0048316E /* Development */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
CLANG_ENABLE_OBJC_ARC = NO;
|
||||
GCC_ENABLE_OBJC_GC = supported;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
|
|
|
@ -307,7 +307,7 @@ int FloppyIO::receive(string * ansBuffer) {
|
|||
|
||||
// Copy input data to string object
|
||||
*ansBuffer = dataToReceive;
|
||||
dataToReceive = NULL;
|
||||
delete[] dataToReceive;
|
||||
return (int)ansBuffer->length();
|
||||
|
||||
}
|
||||
|
|
|
@ -161,26 +161,35 @@ namespace FloppyIONS {
|
|||
|
||||
int code;
|
||||
std::string message;
|
||||
std::string full_message;
|
||||
|
||||
// Default constructor/destructor
|
||||
FloppyIOException() { this->code=0; this->message=""; };
|
||||
FloppyIOException() {
|
||||
init(0, "");
|
||||
};
|
||||
virtual ~FloppyIOException() throw() { };
|
||||
|
||||
// Get description
|
||||
virtual const char* what() const throw() {
|
||||
static std::ostringstream oss (std::ostringstream::out);
|
||||
oss << this->message << ". Error code = " << this->code;
|
||||
std::string tmp = oss.str();
|
||||
return tmp.c_str();
|
||||
return full_message.c_str();
|
||||
}
|
||||
|
||||
// Change the message and return my instance
|
||||
// (Used for singleton format)
|
||||
FloppyIOException * set(int _code, std::string _message) {
|
||||
this->code = _code;
|
||||
this->message = _message;
|
||||
init(_code, _message);
|
||||
return this;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void init(int _code, std::string _message) {
|
||||
code = _code;
|
||||
message = _message;
|
||||
std::stringstream ss;
|
||||
ss << _message << ". Error code = " << _code;
|
||||
full_message = ss.str();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue