Index: client/app_start.cpp
===================================================================
--- client/app_start.cpp	(revisión: 17334)
+++ client/app_start.cpp	(copia de trabajo)
@@ -372,12 +372,12 @@
     bool high_priority = (app_version->avg_ncpus < 1);
 
     if (first_time && log_flags.task) {
-        msg_printf(result->project, MSG_INFO,
+        msg_printf(wup->project, MSG_INFO,
             "Starting %s", result->name
         );
     }
     if (log_flags.cpu_sched) {
-        msg_printf(result->project, MSG_INFO,
+        msg_printf(wup->project, MSG_INFO,
             "[cpu_sched] Starting %s%s", result->name, first_time?" (initial)":"(resume)"
         );
     }
@@ -548,7 +548,7 @@
             if (!pCEB(&environment_block, sandbox_account_service_token, FALSE)) {
                 if (log_flags.task) {
                     windows_error_string(error_msg, sizeof(error_msg));
-                    msg_printf(result->project, MSG_INFO,
+                    msg_printf(wup->project, MSG_INFO,
                         "Process environment block creation failed: %s", error_msg
                     );
                 }
@@ -579,7 +579,7 @@
             if (!pDEB(environment_block)) {
                 if (log_flags.task) {
                     windows_error_string(error_msg, sizeof(error_msg2));
-                    msg_printf(result->project, MSG_INFO,
+                    msg_printf(wup->project, MSG_INFO,
                         "Process environment block cleanup failed: %s",
                         error_msg2
                     );
@@ -681,7 +681,7 @@
     chdir(current_dir);
 
     if (log_flags.task_debug) {
-        msg_printf(0, MSG_INFO,
+        msg_printf(wup->project, MSG_INFO,
             "[task_debug] ACTIVE_TASK::start(): forked process: pid %d\n", pid
         );
     }
@@ -848,7 +848,7 @@
     }
 
     if (log_flags.task_debug) {
-        msg_printf(0, MSG_INFO,
+        msg_printf(wup->project, MSG_INFO,
             "[task_debug] ACTIVE_TASK::start(): forked process: pid %d\n", pid
         );
     }
Index: client/app_graphics.cpp
===================================================================
--- client/app_graphics.cpp	(revisión: 17334)
+++ client/app_graphics.cpp	(copia de trabajo)
@@ -73,7 +73,7 @@
     }
 
     if (log_flags.scrsave_debug) {
-        msg_printf(0, MSG_INFO,
+        msg_printf(wup->project, MSG_INFO,
             "[scrsave_debug] ACTIVE_TASK::request_graphics_mode(): requesting graphics mode %s for %s",
             xml_graphics_modes[m.mode], result->name
         );
@@ -102,7 +102,7 @@
     if (app_client_shm.shm->graphics_reply.get_msg(buf)) {
         app_client_shm.decode_graphics_msg(buf, gm);
         if (log_flags.scrsave_debug) {
-            msg_printf(0, MSG_INFO,
+            msg_printf(wup->project, MSG_INFO,
                 "[scrsave_debug] ACTIVE_TASK::check_graphics_mode_ack(): got graphics ack %s for %s, previous mode %s",
                 buf, result->name, xml_graphics_modes[graphics_mode_acked]
             );
Index: client/file_xfer.cpp
===================================================================
--- client/file_xfer.cpp	(revisión: 17334)
+++ client/file_xfer.cpp	(copia de trabajo)
@@ -203,7 +203,7 @@
         }
         iter++;
     }
-    msg_printf(NULL, MSG_INTERNAL_ERROR,
+    msg_printf(fxp->fip->project, MSG_INTERNAL_ERROR,
         "File transfer for %s not found", fxp->fip->name
     );
     return ERR_NOT_FOUND;
Index: client/cs_account.cpp
===================================================================
--- client/cs_account.cpp	(revisión: 17334)
+++ client/cs_account.cpp	(copia de trabajo)
@@ -253,7 +253,7 @@
             delete project;
         } else {
             if (lookup_project(project->master_url)) {
-                msg_printf(NULL, MSG_INFO,
+                msg_printf(project, MSG_INFO,
                     "Duplicate account file %s - ignoring", name.c_str()
                 );
                 delete project;
Index: client/cs_scheduler.cpp
===================================================================
--- client/cs_scheduler.cpp	(revisión: 17334)
+++ client/cs_scheduler.cpp	(copia de trabajo)
@@ -802,7 +802,7 @@
     //
     for (i=0; i<sr.result_acks.size(); i++) {
         if (log_flags.sched_op_debug) {
-            msg_printf(0, MSG_INFO,
+            msg_printf(project, MSG_INFO,
                 "[sched_op_debug] handle_scheduler_reply(): got ack for result %s\n",
                 sr.result_acks[i].name
             );
@@ -896,7 +896,7 @@
 
     set_client_state_dirty("handle_scheduler_reply");
     if (log_flags.state_debug) {
-        msg_printf(0, MSG_INFO,
+        msg_printf(project, MSG_INFO,
             "[state_debug] handle_scheduler_reply(): State after handle_scheduler_reply():"
         );
         print_summary();
Index: client/scheduler_op.cpp
===================================================================
--- client/scheduler_op.cpp	(revisión: 17334)
+++ client/scheduler_op.cpp	(copia de trabajo)
@@ -814,7 +814,7 @@
             continue;
         } else if (strlen(buf)>1){
             if (log_flags.unparsed_xml) {
-                msg_printf(0, MSG_INFO,
+                msg_printf(project, MSG_INFO,
                     "[unparsed_xml] SCHEDULER_REPLY::parse(): unrecognized %s\n", buf
                 );
             }
Index: client/app_control.cpp
===================================================================
--- client/app_control.cpp	(revisión: 17334)
+++ client/app_control.cpp	(copia de trabajo)
@@ -448,7 +448,7 @@
 		//
 		if (atp->process_control_queue.timeout(180)) {
             if (log_flags.task_debug) {
-                msg_printf(NULL, MSG_INFO,
+                msg_printf(atp->result->project, MSG_INFO,
                     "Restarting %s - message timeout", atp->result->name
                 );
             }
@@ -482,7 +482,7 @@
         } else {
             if (log_flags.task_debug) {
                 char errmsg[1024];
-                msg_printf(0, MSG_INFO,
+                msg_printf(atp->result->project, MSG_INFO,
                     "[task_debug] task %s GetExitCodeProcess() failed - %s GLE %d (0x%x)",
                     atp->result->name,
                     windows_format_error_string(
@@ -508,7 +508,7 @@
             // is probably a benchmark process; don't show error
             //
             if (!gstate.are_cpu_benchmarks_running() && log_flags.task_debug) {
-                msg_printf(NULL, MSG_INTERNAL_ERROR, "Process %d not found\n", pid);
+                msg_printf(atp->wup->project, MSG_INTERNAL_ERROR, "Process %d not found\n", pid);
             }
             return false;
         }
@@ -528,7 +528,7 @@
 
     retval = current_disk_usage(disk_usage);
     if (retval) {
-        msg_printf(0, MSG_INTERNAL_ERROR,
+        msg_printf(this->wup->project, MSG_INTERNAL_ERROR,
             "Can't get task disk usage: %s", boincerror(retval)
         );
     } else {
@@ -925,7 +925,7 @@
         return false;
     }
     if (log_flags.app_msg_receive) {
-        msg_printf(NULL, MSG_INFO,
+        msg_printf(this->wup->project, MSG_INFO,
             "[app_msg_receive] got msg from slot %d: %s", slot, msg_buf
         );
     }
Index: client/app.cpp
===================================================================
--- client/app.cpp	(revisión: 17334)
+++ client/app.cpp	(copia de trabajo)
@@ -239,13 +239,13 @@
         {
             retval = detach_shmem(app_client_shm.shm);
             if (retval) {
-                msg_printf(NULL, MSG_INTERNAL_ERROR,
+                msg_printf(wup->project, MSG_INTERNAL_ERROR,
                     "Couldn't detach shared memory: %s", boincerror(retval)
                 );
             }
             retval = destroy_shmem(shmem_seg_name);
             if (retval) {
-                msg_printf(NULL, MSG_INTERNAL_ERROR,
+                msg_printf(wup->project, MSG_INTERNAL_ERROR,
                     "Couldn't destroy shared memory: %s", boincerror(retval)
                 );
             }
@@ -313,7 +313,7 @@
     retval = procinfo_setup(piv);
 	if (retval) {
 		if (log_flags.mem_usage_debug) {
-			msg_printf(0, MSG_INTERNAL_ERROR,
+			msg_printf(NULL, MSG_INTERNAL_ERROR,
 				"[mem_usage_debug] procinfo_setup() returned %d", retval
 			);
 		}
@@ -689,7 +689,7 @@
         else if (parse_double(buf, "<current_cpu_time>", x)) continue;
         else {
             if (log_flags.unparsed_xml) {
-                msg_printf(0, MSG_INFO,
+                msg_printf(project, MSG_INFO,
                     "[unparsed_xml] ACTIVE_TASK::parse(): unrecognized %s\n", buf
                 );
             }
@@ -753,7 +753,7 @@
             else delete atp;
         } else {
             if (log_flags.unparsed_xml) {
-                msg_printf(0, MSG_INFO,
+                msg_printf(NULL, MSG_INFO,
                     "[unparsed_xml] ACTIVE_TASK_SET::parse(): unrecognized %s\n", buf
                 );
             }
@@ -881,7 +881,7 @@
                     fip->status = FILE_PRESENT;
                 }
             } else {
-                msg_printf(0, MSG_INTERNAL_ERROR, "Can't find uploadable file %s", p);
+                msg_printf(wup->project, MSG_INTERNAL_ERROR, "Can't find uploadable file %s", p);
             }
             sprintf(path, "%s/%s", slot_dir, buf);
             delete_project_owned_file(path, true);  // delete the link file
