Fix copyright line.
[jFCPlib.git] / src / net / pterodactylus / fcp / FcpConnection.java
index a80c610..b7129b7 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * jSite2 - FpcConnection.java -
- * Copyright © 2008 David Roden
+ * jFCPlib - FpcConnection.java - Copyright © 2008 David Roden
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -309,6 +308,8 @@ public class FcpConnection implements Closeable {
                        fcpListenerManager.fireReceivedNodeHello(new NodeHello(fcpMessage));
                } else if ("CloseConnectionDuplicateClientName".equals(messageName)) {
                        fcpListenerManager.fireReceivedCloseConnectionDuplicateClientName(new CloseConnectionDuplicateClientName(fcpMessage));
+               } else if ("ReceivedBookmarkFeed".equals(messageName)) {
+                       fcpListenerManager.fireReceivedBookmarkFeed(new ReceivedBookmarkFeed(fcpMessage));
                } else {
                        fcpListenerManager.fireMessageReceived(fcpMessage);
                }
@@ -337,8 +338,8 @@ public class FcpConnection implements Closeable {
        //
 
        /**
-        * Incremets the counter in {@link #incomingMessageStatistics} by <cod>1</code>
-        * for the given message name.
+        * Incremets the counter in {@link #incomingMessageStatistics} by
+        * <cod>1</code> for the given message name.
         *
         * @param name
         *            The name of the message to count
@@ -359,7 +360,7 @@ public class FcpConnection implements Closeable {
         *            The length of the stream
         * @return The limited input stream
         */
-       private LimitedInputStream getInputStream(long dataLength) {
+       private synchronized LimitedInputStream getInputStream(long dataLength) {
                if (dataLength <= 0) {
                        return new LimitedInputStream(null, 0);
                }
@@ -482,7 +483,7 @@ public class FcpConnection implements Closeable {
                 * @throws IOException
                 *             if an I/O error occurs
                 */
-               public void consume() throws IOException {
+               public synchronized void consume() throws IOException {
                        while (remaining > 0) {
                                skip(remaining);
                        }