From 308df6837504b56c8c6fa414d05d285388f20b56 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Wed, 10 Feb 2010 13:29:27 +0000 Subject: [PATCH] bugfix: only handle log output from our mote + added support for debug log interface --- .../se/sics/cooja/interfaces/Mote2MoteRelations.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/cooja/java/se/sics/cooja/interfaces/Mote2MoteRelations.java b/tools/cooja/java/se/sics/cooja/interfaces/Mote2MoteRelations.java index 8aac51a94..412423b12 100644 --- a/tools/cooja/java/se/sics/cooja/interfaces/Mote2MoteRelations.java +++ b/tools/cooja/java/se/sics/cooja/interfaces/Mote2MoteRelations.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: Mote2MoteRelations.java,v 1.5 2010/02/09 22:14:23 fros4943 Exp $ + * $Id: Mote2MoteRelations.java,v 1.6 2010/02/10 13:29:27 fros4943 Exp $ */ package se.sics.cooja.interfaces; @@ -106,6 +106,9 @@ public class Mote2MoteRelations extends MoteInterface { gui.removeMoteRelation(Mote2MoteRelations.this.mote, mote); } public void newLogOutput(LogOutputEvent ev) { + if (ev.getMote() != Mote2MoteRelations.this.mote) { + return; + } handleNewLog(ev.msg); } public void removedLogOutput(LogOutputEvent ev) { @@ -131,6 +134,10 @@ public class Mote2MoteRelations extends MoteInterface { return; } + if (msg.startsWith("DEBUG: ")) { + msg = msg.substring("DEBUG: ".length()); + } + if (!msg.startsWith("#L ")) { return; }