768f3e9
diff --git kopete/protocols/bonjour/bonjourcontactconnection.cpp kopete/protocols/bonjour/bonjourcontactconnection.cpp
768f3e9
index 0a925b4..c126011 100644
768f3e9
--- kopete/protocols/bonjour/bonjourcontactconnection.cpp
768f3e9
+++ kopete/protocols/bonjour/bonjourcontactconnection.cpp
768f3e9
@@ -56,9 +56,10 @@ void BonjourContactConnection::setSocket(QTcpSocket *aSocket)
768f3e9
 }
768f3e9
 
768f3e9
 BonjourContactConnection::BonjourContactConnection(QTcpSocket *aSocket, 
768f3e9
-		QObject *parent) : QObject(parent), connectionState(BonjourConnectionNewIncoming), socket(aSocket), parser(),
768f3e9
+		QObject *parent) : QObject(parent), connectionState(BonjourConnectionNewIncoming), parser(),
768f3e9
 					local(), remote()
768f3e9
 {
768f3e9
+	setSocket(aSocket);
768f3e9
 }
768f3e9
 
768f3e9
 BonjourContactConnection::BonjourContactConnection(const QHostAddress &address, short int port,
768f3e9
@@ -188,6 +189,14 @@ void BonjourContactConnection::dataInSocket()
768f3e9
 			getStreamTag(token);
768f3e9
 			break;
768f3e9
 	}
768f3e9
+
768f3e9
+	if (moreTokensAvailable())
768f3e9
+		dataInSocket();
768f3e9
+}
768f3e9
+
768f3e9
+bool BonjourContactConnection::moreTokensAvailable()
768f3e9
+{
768f3e9
+	return ! parser.atEnd();
768f3e9
 }
768f3e9
 
768f3e9
 void BonjourContactConnection::getStreamTag(BonjourXmlToken &token)
768f3e9
diff --git kopete/protocols/bonjour/bonjourcontactconnection.h kopete/protocols/bonjour/bonjourcontactconnection.h
768f3e9
index c0d347a..6c06300 100644
768f3e9
--- kopete/protocols/bonjour/bonjourcontactconnection.h
768f3e9
+++ kopete/protocols/bonjour/bonjourcontactconnection.h
768f3e9
@@ -80,6 +80,9 @@ class BonjourContactConnection : public QObject {
768f3e9
 	// Set the Socket
768f3e9
 	void setSocket(QTcpSocket *socket);
768f3e9
 
768f3e9
+	// Determine if there is more data available
768f3e9
+	bool moreTokensAvailable();
768f3e9
+
768f3e9
 	/**
768f3e9
 	 * @brief Description of A Token
768f3e9
 	 *