aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeorge Politis <gp@jitsi.org>2015-11-04 10:58:55 -0600
committerGeorge Politis <gp@jitsi.org>2015-11-04 10:58:55 -0600
commit29b76949a23563951f51ad4076ca473edabe09c7 (patch)
treeec0d981cba7a3638e1ae73e7832e7f85ea4b641d /src
parentf5dc6edede237288d6b09dddcabd1ed47f55c8c2 (diff)
parent2f3adb9281dbd5fe1be91fc9151d2612c37f7441 (diff)
downloadjitsi-29b76949a23563951f51ad4076ca473edabe09c7.zip
jitsi-29b76949a23563951f51ad4076ca473edabe09c7.tar.gz
jitsi-29b76949a23563951f51ad4076ca473edabe09c7.tar.bz2
Merge pull request #171 from gpolitis/packet-debugging
Implements arbitrary packet logging configuration.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/packetlogging/PacketLoggingConfigurationImpl.java4
-rw-r--r--src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingConfigurationImpl.java b/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingConfigurationImpl.java
index b26b11a..978c74c 100644
--- a/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingConfigurationImpl.java
+++ b/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingConfigurationImpl.java
@@ -60,6 +60,10 @@ public class PacketLoggingConfigurationImpl
configService.getBoolean(
PACKET_LOGGING_ICE4J_ENABLED_PROPERTY_NAME,
isIce4JLoggingEnabled()));
+ super.setArbitraryLoggingEnabled(
+ configService.getBoolean(
+ PACKET_LOGGING_ARBITRARY_ENABLED_PROPERTY_NAME,
+ isArbitraryLoggingEnabled()));
super.setLimit(
configService.getLong(
PACKET_LOGGING_FILE_SIZE_PROPERTY_NAME,
diff --git a/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java b/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
index 788e8db..1954f99 100644
--- a/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
@@ -20,6 +20,7 @@ package net.java.sip.communicator.impl.packetlogging;
import java.io.*;
import java.util.*;
+import com.google.common.collect.*;
import net.java.sip.communicator.util.*;
import org.jitsi.service.fileaccess.*;
@@ -321,6 +322,8 @@ public class PacketLoggingServiceImpl
return cfg.isRTPLoggingEnabled();
case ICE4J:
return cfg.isIce4JLoggingEnabled();
+ case ARBITRARY:
+ return cfg.isArbitraryLoggingEnabled();
default:
/*
* It may seem like it was unnecessary to invoke
@@ -767,7 +770,7 @@ public class PacketLoggingServiceImpl
/**
* List of packets queued to be written in the file.
*/
- private final List<Packet> pktsToSave = new ArrayList<Packet>();
+ private final Queue<Packet> pktsToSave = EvictingQueue.create(10);
/**
* Initializes a new <tt>SaverThread</tt>.
@@ -803,7 +806,7 @@ public class PacketLoggingServiceImpl
continue;
}
- pktToSave = pktsToSave.remove(0);
+ pktToSave = pktsToSave.poll();
}
if(pktToSave != null)