soc.2009.transport: b65961a2: Don't send Error or Invalid messages to ...

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Mon Jul 13 05:03:34 EDT 2009


-----------------------------------------------------------------
Revision: b65961a221d5504f62df33d0d92884a94faf2110
Ancestor: f1cd596ea3739b552aee12738c3d24f32312e6e5
Author: hanzz at soc.pidgin.im
Date: 2009-07-13T08:56:00
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/b65961a221d5504f62df33d0d92884a94faf2110

Modified files:
        CMakeLists.txt main.cpp

ChangeLog: 

Don't send Error or Invalid messages to legacy network

-------------- next part --------------
============================================================
--- CMakeLists.txt	2894bb61d0b14dbee5a2f84165e2d40a4b4c9097
+++ CMakeLists.txt	8372f21cf74bede1ad78d84681b5984e8f6aecc7
@@ -42,14 +42,15 @@
 
 include_directories("/usr/include/mysql++")
 include_directories("/usr/include/mysql")
+include_directories("/usr/local/include/libpurple")
 
-if(PURPLE_FOUND)
-	message(STATUS "PURPLE found OK")
-	include_directories(${PURPLE_INCLUDE_DIRS})
-	message(STATUS ${PURPLE_LIBRARIES})
-else(PURPLE_FOUND)
-	message(FATAL_ERROR "No PURPLE")
-endif(PURPLE_FOUND)
+#if(PURPLE_FOUND)
+#	message(STATUS "PURPLE found OK")
+#	include_directories(${PURPLE_INCLUDE_DIRS})
+#	message(STATUS ${PURPLE_LIBRARIES})
+#else(PURPLE_FOUND)
+#	message(FATAL_ERROR "No PURPLE")
+#endif(PURPLE_FOUND)
 
 if(GLIB2_FOUND)
 	message(STATUS "GLIB2 found OK")
@@ -157,7 +158,7 @@
 
 FIND_LIBRARY(MYSQL_LIBRARY NAMES mysqlpp)
 
-target_link_libraries(hiicq ${GLOOX_LIBRARIES} ${MYSQL_LIBRARY} ${PURPLE_LIBRARIES} ${GLIB2_LIBRARIES} ${GETTEXTPO_LIBRARY} -export-dynamic)
+target_link_libraries(hiicq ${GLOOX_LIBRARIES} ${MYSQL_LIBRARY} -lpurple ${GLIB2_LIBRARIES} ${GETTEXTPO_LIBRARY} -export-dynamic)
 
 # install(FILES
 # 	${CMAKE_CURRENT_SOURCE_DIR}/data/LICENSE.txt
============================================================
--- main.cpp	9a9276b0b0c7489c39317f35c3374c1fc28bcfc6
+++ main.cpp	bd672fa58b48f8538800362ffd0131484996c85b
@@ -1310,6 +1310,8 @@ void GlooxMessageHandler::handleMessage 
 void GlooxMessageHandler::handleMessage (const Message &msg, MessageSession *session) {
 	if (msg.from().bare() == msg.to().bare())
 		return;
+	if (msg.subtype() == Message::Error || msg.subtype() == Message::Invalid)
+		return;
 	User *user;
 	if (protocol()->isMUC(NULL, msg.to().bare())) {
 		std::string server = msg.to().username().substr(msg.to().username().find("%") + 1, msg.to().username().length() - msg.to().username().find("%"));


More information about the Commits mailing list