Sourceware Bugzilla – Attachment 2231 Details for
Bug 5735
testCoreThenRunCommand(frysk.hpd.TestCoreCommand) test fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Synchronize access to output buffer patch
messages.patch (text/plain), 2.11 KB, created by
Phil Muldoon
on 2008-02-06 12:09:07 UTC
(
hide
)
Description:
Synchronize access to output buffer patch
Filename:
MIME Type:
Creator:
Phil Muldoon
Created:
2008-02-06 12:09:07 UTC
Size:
2.11 KB
patch
obsolete
>diff --git a/frysk-core/frysk/hpd/CLI.java b/frysk-core/frysk/hpd/CLI.java >index c08fb3d..61f5033 100644 >--- a/frysk-core/frysk/hpd/CLI.java >+++ b/frysk-core/frysk/hpd/CLI.java >@@ -313,7 +313,9 @@ public class CLI { > } > > void addMessage(Message msg) { >- messages.add(msg); >+ synchronized (messages) { >+ messages.add(msg); >+ } > } > > void addMessage(String msg, int type) { >@@ -321,20 +323,22 @@ public class CLI { > } > > private void flushMessages() { >- for (Iterator iter = messages.iterator(); iter.hasNext();) { >- Message tempmsg = (Message) iter.next(); >- String prefix = null; >- if (tempmsg.getType() == Message.TYPE_DBG_ERROR) >- prefix = "Internal debugger error: "; >- else if (tempmsg.getType() == Message.TYPE_ERROR) >- prefix = "Error: "; >- else if (tempmsg.getType() == Message.TYPE_WARNING) >- prefix = "Warning: "; >- if (prefix != null) >- outWriter.print(prefix); >- outWriter.println(tempmsg.getMessage()); >- iter.remove(); >- } >+ synchronized (messages) { >+ for (Iterator iter = messages.iterator(); iter.hasNext();) { >+ Message tempmsg = (Message) iter.next(); >+ String prefix = null; >+ if (tempmsg.getType() == Message.TYPE_DBG_ERROR) >+ prefix = "Internal debugger error: "; >+ else if (tempmsg.getType() == Message.TYPE_ERROR) >+ prefix = "Error: "; >+ else if (tempmsg.getType() == Message.TYPE_WARNING) >+ prefix = "Warning: "; >+ if (prefix != null) >+ outWriter.print(prefix); >+ outWriter.println(tempmsg.getMessage()); >+ iter.remove(); >+ } >+ } > } > > PTSet createSet(String set) { >diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog >index cb14df0..ba4301b 100644 >--- a/frysk-core/frysk/hpd/ChangeLog >+++ b/frysk-core/frysk/hpd/ChangeLog >@@ -1,3 +1,8 @@ >+2008-02-06 Phil Muldoon <pmuldoon@redhat.com> >+ >+ * CLI.java (addMessage): Synchronize on message. >+ (flushMessages): Ditto. >+ > 2008-02-05 Andrew Cagney <cagney@redhat.com> > > * GenerateCoreCommand.java: Update; corefiles moved to
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 5735
: 2231