@@ -148,9 +148,6 @@ static void handle_get_project_status(GUI_RPC_CONN& grc) {
148148}
149149
150150static void handle_get_disk_usage (GUI_RPC_CONN & grc) {
151- double size, boinc_non_project, d_allowed;
152- // double boinc_total;
153-
154151 grc.mfout .printf (" <disk_usage_summary>\n " );
155152 int retval = get_filesystem_info (
156153 gstate.host_info .d_total , gstate.host_info .d_free
@@ -161,27 +158,6 @@ static void handle_get_disk_usage(GUI_RPC_CONN& grc) {
161158 );
162159 }
163160
164- dir_size_alloc (" ." , boinc_non_project, false );
165- dir_size_alloc (" locale" , size, false );
166- boinc_non_project += size;
167- #ifdef __APPLE__
168- if (gstate.launched_by_manager ) {
169- // If launched by Manager, get Manager's size on disk
170- char path[MAXPATHLEN ];
171- double manager_size = 0.0 ;
172- OSStatus err = noErr;
173-
174- retval = proc_pidpath (getppid (), path, sizeof (path));
175- if (retval <= 0 ) {
176- err = fnfErr;
177- }
178- if (!err) {
179- dir_size_alloc (path, manager_size, true );
180- boinc_non_project += manager_size;
181- }
182- }
183- #endif
184- // boinc_total = boinc_non_project;
185161 gstate.get_disk_usages ();
186162 for (PROJECT * p: gstate.projects ) {
187163 grc.mfout .printf (
@@ -191,17 +167,16 @@ static void handle_get_disk_usage(GUI_RPC_CONN& grc) {
191167 " </project>\n " ,
192168 p->master_url , p->disk_usage
193169 );
194- // boinc_total += p->disk_usage;
195170 }
196- d_allowed = gstate.allowed_disk_usage (gstate.total_disk_usage );
171+ double d_allowed = gstate.allowed_disk_usage (gstate.total_disk_usage );
197172 grc.mfout .printf (
198173 " <d_total>%f</d_total>\n "
199174 " <d_free>%f</d_free>\n "
200175 " <d_boinc>%f</d_boinc>\n "
201176 " <d_allowed>%f</d_allowed>\n " ,
202177 gstate.host_info .d_total ,
203178 gstate.host_info .d_free ,
204- boinc_non_project ,
179+ gstate. client_disk_usage ,
205180 d_allowed
206181 );
207182 grc.mfout .printf (" </disk_usage_summary>\n " );
0 commit comments