soc.2009.transport: cc6f4260: Fixed discoinfohandler

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Thu Jun 4 09:06:12 EDT 2009


-----------------------------------------------------------------
Revision: cc6f4260630e2c685ba168c7c05a5f02805db4b4
Ancestor: f953bf7976f4a38ccf522bef66329e5ed635bee2
Author: hanzz at soc.pidgin.im
Date: 2009-06-04T11:41:26
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/cc6f4260630e2c685ba168c7c05a5f02805db4b4

Modified files:
        CMakeLists.txt cmake_modules/purpleConfig.cmake
        discoinfohandler.cpp main.cpp vcardhandler.cpp

ChangeLog: 

Fixed discoinfohandler

-------------- next part --------------
============================================================
--- CMakeLists.txt	81807ec3cb46f2ab7c1fff0da6cefbbf171e5d68
+++ CMakeLists.txt	2264023d914ec1f31267c310e4d9fad4341c754d
@@ -46,7 +46,7 @@
 if(PURPLE_FOUND)
 	message(STATUS "PURPLE found OK")
 	include_directories(${PURPLE_INCLUDE_DIRS})
-	message(STATUS ${PURPLE_INCLUDE_DIRS})
+	message(STATUS ${PURPLE_LIBRARIES})
 else(PURPLE_FOUND)
 	message(FATAL_ERROR "No PURPLE")
 endif(PURPLE_FOUND)
============================================================
--- cmake_modules/purpleConfig.cmake	0469300e5a0ee2b97410b11a1660325e04fc2181
+++ cmake_modules/purpleConfig.cmake	35508debe92a57ce67a22b8d85876bc6ca41db62
@@ -1,6 +1,6 @@
-INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(PURPLE purple)
-
+# INCLUDE(FindPkgConfig)
+# PKG_CHECK_MODULES(PURPLE purple)
+FIND_LIBRARY(PURPLE_LIBRARY NAMES purple)
 # IF(PURPLE_FOUND)
 # 	SET(PURPLE_INCLUDE_DIRS
 # 		${PURPLE_INCLUDE_DIRS}
============================================================
--- discoinfohandler.cpp	bf62dc3c4a4bbc54606c6478261adaf6d918dd9b
+++ discoinfohandler.cpp	38511f5dddcdc14f9911febf17150b29d0fb4cc5
@@ -63,27 +63,27 @@ bool GlooxDiscoInfoHandler::handleIq (co
 		Tag *query = stanza.tag()->findChildWithAttrib("xmlns","http://jabber.org/protocol/disco#info");
 		if (query!=NULL){
 			IQ _s(IQ::Result, stanza.from(), stanza.id());
-			std::string from;
-			from.append(stanza.to().full());
-			_s.setFrom(from);
+			_s.setFrom(stanza.to().full());
+			Tag *s = _s.tag();
+			Tag *query2 = new Tag("query");
+			query2->setXmlns("http://jabber.org/protocol/disco#info");
+			query2->addAttribute("node",query->findAttribute("node"));
 			
-			Tag *s = _s.tag();
-			s->setXmlns("http://jabber.org/protocol/disco#info");
-			s->addAttribute("node",query->findAttribute("node"));
 			Tag *t;
 			t = new Tag("identity");
 			t->addAttribute("category","gateway");
 			t->addAttribute("name","High Flyer Transport");
 			t->addAttribute("type",p->protocol()->gatewayIdentity());
-			s->findChild("query")->addChild(t);
+			query2->addChild(t);
 
 			std::list<std::string> features = p->protocol()->transportFeatures();
 			for(std::list<std::string>::iterator it = features.begin(); it != features.end(); it++) {
 				t = new Tag("feature");
 				t->addAttribute("var",*it);
-				s->findChild("query")->addChild(t);
+				query2->addChild(t);
 			}
 
+			s->addChild(query2);
 			p->j->send( s );
 
 			return true;
============================================================
--- main.cpp	b5fa6afd3406bb39cc4eb9681ca7ff7fb3c0ece6
+++ main.cpp	5f10813cc57bf714e62aacbb5af18b261e685554
@@ -30,6 +30,7 @@
 #include "protocols/icq.h"
 #include "protocols/facebook.h"
 #include "protocols/gg.h"
+#include "blistsaving.h"
 
 #include <gloox/tlsbase.h>
 #include <gloox/compressionbase.h>
@@ -1142,7 +1143,7 @@ bool GlooxMessageHandler::initPurple(){
 		}
 		
 		purple_set_blist(purple_blist_new());
-		purple_blist_load();
+// 		purple_blist_load();
 		
 		purple_signal_connect(purple_conversations_get_handle(), "received-im-msg", &conversation_handle, PURPLE_CALLBACK(newMessageReceived), NULL);
 		purple_signal_connect(purple_conversations_get_handle(), "buddy-typing", &conversation_handle, PURPLE_CALLBACK(buddyTyping), NULL);
============================================================
--- vcardhandler.cpp	c3ea021735cc157973fd26bbd04d14bda66b8a5a
+++ vcardhandler.cpp	f0b141a97d9598e6e0f18d5a1db74a110d85ec40
@@ -174,7 +174,7 @@ void GlooxVCardHandler::userInfoArrived(
 			vcardEntry = (PurpleNotifyUserInfoEntry *)(vcardEntries->data);
 			if (purple_notify_user_info_entry_get_label(vcardEntry) && purple_notify_user_info_entry_get_value(vcardEntry)){
 				label=(std::string)purple_notify_user_info_entry_get_label(vcardEntry);
-				Log().Get("vcard label") << label << " " << (std::string)purple_notify_user_info_entry_get_value(vcardEntry);
+				Log().Get("vcard label") << label << " => " << (std::string)purple_notify_user_info_entry_get_value(vcardEntry);
 				if (label=="First Name"){
 					N->addChild( new Tag("GIVEN", (std::string)purple_notify_user_info_entry_get_value(vcardEntry)));
 					firstName = (std::string)purple_notify_user_info_entry_get_value(vcardEntry);


More information about the Commits mailing list