From 2eff54f57a62cad78aea6a982df8c7854b3a8cc2 Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Fri, 10 Jun 2005 18:00:54 +0000 Subject: Fix three small bugs in current version: - files/boinc.sh was missing the "shutdown" rcorder tag - files/patch-api-boinc_api.C fixes bug with CPU Time not showing in boincmgr - files/patch-clientgui-ViewWork.cpp fixes bug with Progress not showing in boincmgr - also some minor changes to Makefile and pkg-plist for consistency with the other boinc ports PR: ports/82054 Submitted by: J.R. Oldroyd (maintainer) --- net/boinc-client/files/boinc.sh.in | 2 +- net/boinc-client/files/patch-api-boinc_api.C | 59 ++++++++++++++++++++++ .../files/patch-clientgui-ViewWork.cpp | 11 ++++ 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 net/boinc-client/files/patch-api-boinc_api.C create mode 100644 net/boinc-client/files/patch-clientgui-ViewWork.cpp (limited to 'net/boinc-client/files') diff --git a/net/boinc-client/files/boinc.sh.in b/net/boinc-client/files/boinc.sh.in index 81fe8fc5460b..4c87c3e7c7f8 100644 --- a/net/boinc-client/files/boinc.sh.in +++ b/net/boinc-client/files/boinc.sh.in @@ -4,7 +4,7 @@ # PROVIDE: boinc # REQUIRE: LOGIN -# KEYWORD: FreeBSD +# KEYWORD: FreeBSD shutdown . %%RC_SUBR%% diff --git a/net/boinc-client/files/patch-api-boinc_api.C b/net/boinc-client/files/patch-api-boinc_api.C new file mode 100644 index 000000000000..da4f179c703c --- /dev/null +++ b/net/boinc-client/files/patch-api-boinc_api.C @@ -0,0 +1,59 @@ +--- api/boinc_api.C.orig Mon May 23 03:50:50 2005 ++++ api/boinc_api.C Wed Jun 8 16:52:34 2005 +@@ -59,7 +59,7 @@ + + #ifndef _WIN32 + static pthread_t timer_thread_handle; +-static pthread_t worker_thread; ++static void * timer_thread(); + static struct rusage worker_thread_ru; + #endif + +@@ -534,14 +534,6 @@ + } + } + +-#ifndef _WIN32 +-static void timer_signal_handler(int) { +- if (pthread_equal(pthread_self(), worker_thread)) { +- getrusage(RUSAGE_SELF, &worker_thread_ru); +- } +-} +- +-#endif + + #ifdef _WIN32 + static void CALLBACK worker_timer( +@@ -619,6 +611,7 @@ + while(1) { + usleep((useconds_t)(TIMER_PERIOD*1000000)); + worker_timer(0); ++ getrusage(RUSAGE_SELF, &worker_thread_ru); + } + /*NOTREACHED*/ + } +@@ -659,24 +652,6 @@ + retval = pthread_create(&timer_thread_handle, NULL, timer_thread, NULL); + if (retval) { + perror("set_worker_timer(): pthread_create(): %d"); +- } +- worker_thread = pthread_self(); +- +- struct sigaction sa; +- itimerval value; +- sa.sa_handler = timer_signal_handler; +- sa.sa_flags = SA_RESTART; +- retval = sigaction(SIGALRM, &sa, NULL); +- if (retval) { +- perror("boinc set_worker_timer() sigaction"); +- return retval; +- } +- value.it_value.tv_sec = TIMER_PERIOD; +- value.it_value.tv_usec = 0; +- value.it_interval = value.it_value; +- retval = setitimer(ITIMER_REAL, &value, NULL); +- if (retval) { +- perror("boinc set_worker_timer() setitimer"); + } + #endif + return retval; diff --git a/net/boinc-client/files/patch-clientgui-ViewWork.cpp b/net/boinc-client/files/patch-clientgui-ViewWork.cpp new file mode 100644 index 000000000000..d44e95d9a4d7 --- /dev/null +++ b/net/boinc-client/files/patch-clientgui-ViewWork.cpp @@ -0,0 +1,11 @@ +--- clientgui/ViewWork.cpp.orig Sun May 29 03:12:00 2005 ++++ clientgui/ViewWork.cpp Wed Jun 8 15:30:28 2005 +@@ -569,7 +569,7 @@ + strBuffer.Clear(); + + RESULT* rp = pDoc->result(item); +- if (rp->active_task) { ++ if (! rp->active_task) { + if(rp->state < RESULT_COMPUTE_ERROR) + strBuffer.Printf(wxT("%.2f%%"), 0.0); + else -- cgit v1.2.3