]> git.pond.sub.org Git - empserver/commitdiff
Fix recipient thread in output journal
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 17 Mar 2009 19:19:49 +0000 (20:19 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 26 Jan 2010 21:49:51 +0000 (22:49 +0100)
Output journaling was cherry-picked from Hvy Metal II.  However, how
threads are identified in the journal changed since then.
journal_output_1() needs updating for that.

src/lib/subs/journal.c

index e5354402090d2b2b684747006878031409979193..78f1b49dd567570941572890ae56479c73764c58 100644 (file)
@@ -201,16 +201,12 @@ journal_output(struct player *pl, int id, char *output)
     }
 }
 
-void
+static void
 journal_output_1(struct player *pl, int id,
                 char *buf1, char *buf2, int buf2prec)
 {
-    if (pl && pl->state == PS_PLAYING)
-       journal_entry("output %d %d %s%.*s",
-                     pl->cnum, id, buf1, buf2prec, buf2);
-    else
-       journal_entry("output %p %d %s%.*s",
-                     pl, id, buf1, buf2prec, buf2);
+    journal_entry("output %s %d %s%.*s",
+                 empth_name(empth_self()), id, buf1, buf2prec, buf2);
 }
 
 void