Changeset - f15f56504ff4
[Not reviewed]
0 1 0
Jan Kaluza - 10 years ago 2016-02-08 12:41:08
jkaluza@redhat.com
Swiften backend: Do not need registration for swiften backend
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/swiften/main.cpp
Show inline comments
 
@@ -102,24 +102,25 @@ class SwiftenPlugin : public NetworkPlugin, Swift::XMPPParserClient {
 

	
 
		// NetworkPlugin uses this method to send the data to networkplugin server
 
		void sendData(const std::string &string) {
 
			m_conn->write(Swift::createSafeByteArray(string));
 
		}
 

	
 
		// This method has to call handleDataRead with all received data from network plugin server
 
		void _handleDataRead(boost::shared_ptr<Swift::SafeByteArray> data) {
 
			if (m_firstPing) {
 
				m_firstPing = false;
 
				NetworkPlugin::PluginConfig cfg;
 
				cfg.setRawXML(true);
 
				cfg.setNeedRegistration(false);
 
				sendConfig(cfg);
 
			}
 
			std::string d(data->begin(), data->end());
 
			handleDataRead(d);
 
		}
 

	
 
		void handleStreamStart(const Swift::ProtocolHeader&) {}
 
#if HAVE_SWIFTEN_3
 
		void handleElement(boost::shared_ptr<Swift::ToplevelElement> element) {
 
#else
 
		void handleElement(boost::shared_ptr<Swift::Element> element) {
 
#endif
0 comments (0 inline, 0 general)