aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Perot2014-07-17 15:51:18 (EDT)
committerMatthew Khouzam2014-07-21 09:34:13 (EDT)
commit7289805fcdaed17df4440bcffad08abac6870bbe (patch)
tree3d25f60b0dfd954f8ac65abcc549ee17f3f48edb
parent476a3d01ddf1c685400ceb54c585859ddc7a5ff7 (diff)
downloadorg.eclipse.linuxtools-7289805fcdaed17df4440bcffad08abac6870bbe.zip
org.eclipse.linuxtools-7289805fcdaed17df4440bcffad08abac6870bbe.tar.gz
org.eclipse.linuxtools-7289805fcdaed17df4440bcffad08abac6870bbe.tar.bz2
tmf: clean up pcap.corerefs/changes/84/30084/3
Change-Id: I5167232dc80effbe762825daa5fac28a27c3549d Signed-off-by: Vincent Perot <vincent.perot@ericsson.com> Reviewed-on: https://git.eclipse.org/r/30084 Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Tested-by: Hudson CI
-rw-r--r--lttng/org.eclipse.linuxtools.pcap.core/META-INF/MANIFEST.MF2
-rw-r--r--lttng/org.eclipse.linuxtools.pcap.core/pom.xml4
-rw-r--r--lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/protocol/tcp/TCPPacket.java9
-rw-r--r--lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/trace/PcapFile.java3
4 files changed, 6 insertions, 12 deletions
diff --git a/lttng/org.eclipse.linuxtools.pcap.core/META-INF/MANIFEST.MF b/lttng/org.eclipse.linuxtools.pcap.core/META-INF/MANIFEST.MF
index 66f9735..c28b84b 100644
--- a/lttng/org.eclipse.linuxtools.pcap.core/META-INF/MANIFEST.MF
+++ b/lttng/org.eclipse.linuxtools.pcap.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.0.0.qualifier
+Bundle-Version: 3.1.0.qualifier
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.linuxtools.pcap.core;singleton:=true
Bundle-Activator: org.eclipse.linuxtools.internal.pcap.core.Activator
diff --git a/lttng/org.eclipse.linuxtools.pcap.core/pom.xml b/lttng/org.eclipse.linuxtools.pcap.core/pom.xml
index 0aad5da..e64b177 100644
--- a/lttng/org.eclipse.linuxtools.pcap.core/pom.xml
+++ b/lttng/org.eclipse.linuxtools.pcap.core/pom.xml
@@ -14,11 +14,11 @@
<parent>
<artifactId>linuxtools-lttng-parent</artifactId>
<groupId>org.eclipse.linuxtools.lttng</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.linuxtools.pcap.core</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<name>Linux Tools Pcap Parser Core Plug-in</name>
diff --git a/lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/protocol/tcp/TCPPacket.java b/lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/protocol/tcp/TCPPacket.java
index c57baf9..0ae9d0f 100644
--- a/lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/protocol/tcp/TCPPacket.java
+++ b/lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/protocol/tcp/TCPPacket.java
@@ -484,13 +484,8 @@ public class TCPPacket extends Packet {
.append(fAcknowledgmentNumber);
}
- final ByteBuffer payload = fPayload;
- if (payload != null) {
- sb.append(" Len=") //$NON-NLS-1$
- .append(payload.array().length);
- } else {
- sb.append(" Len=0"); //$NON-NLS-1$
- }
+ sb.append(" Len=") //$NON-NLS-1$
+ .append((fDataOffset * TCPValues.BLOCK_SIZE));
String string = sb.toString();
if (string == null) {
diff --git a/lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/trace/PcapFile.java b/lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/trace/PcapFile.java
index 9cb97f9..30e688d 100644
--- a/lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/trace/PcapFile.java
+++ b/lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/trace/PcapFile.java
@@ -82,7 +82,7 @@ public class PcapFile implements Closeable {
}
if (!pcapFile.canRead()) {
- throw new IOException("File is not readable."); //$NON-NLS-1$
+ throw new BadPcapFileException("File is not readable."); //$NON-NLS-1$
}
// File is not empty. Try to open.
@@ -110,7 +110,6 @@ public class PcapFile implements Closeable {
case PcapFileValues.MAGIC_BIG_ENDIAN_MICRO: // file is big endian
fByteOrder = be;
fTimestampPrecision = PcapTimestampScale.MICROSECOND;
- System.out.println();
break;
case PcapFileValues.MAGIC_LITTLE_ENDIAN_MICRO: // file is little endian
fByteOrder = le;