adium 3343:66c25ac8eecc: Add some debug logging for message rece...

commits at adium.im commits at adium.im
Sat Sep 25 12:21:06 UTC 2010


details:	http://hg.adium.im/adium/rev/66c25ac8eecc
revision:	3343:66c25ac8eecc
author:		Zachary West <zacw at adium.im>
date:		Sat Sep 25 08:20:37 2010 -0400

Add some debug logging for message receipt. Refs #14229 if only because we need more debug logging in this path.
(transplanted from be7c1eabdec846c33dde4c1e47ba0896b06d9756)

diffs (34 lines):

diff -r 008d69381ab2 -r 66c25ac8eecc Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m	Fri Sep 24 23:24:09 2010 -0400
+++ b/Plugins/Purple Service/CBPurpleAccount.m	Sat Sep 25 08:20:37 2010 -0400
@@ -1213,6 +1213,8 @@
 
 - (void)_receivedMessage:(NSAttributedString *)attributedMessage inChat:(AIChat *)chat fromListContact:(AIListContact *)sourceContact flags:(PurpleMessageFlags)flags date:(NSDate *)date
 {
+	AILogWithSignature(@"Message: %@ inChat: %@ fromListContact: %@ flags: %d date: %@", attributedMessage, chat, sourceContact, flags, date);
+	
 	if ((flags & PURPLE_MESSAGE_DELAYED) == PURPLE_MESSAGE_DELAYED) {
 		// Display delayed messages as context.
 
diff -r 008d69381ab2 -r 66c25ac8eecc Source/AdiumOTREncryption.m
--- a/Source/AdiumOTREncryption.m	Fri Sep 24 23:24:09 2010 -0400
+++ b/Source/AdiumOTREncryption.m	Sat Sep 25 08:20:37 2010 -0400
@@ -793,13 +793,18 @@
 	if (!newMessage && !res) {
 		//Use the original mesage; this was not an OTR-related message
 		decryptedMessage = inString;
+		
+		AILogWithSignature(@"Not OTR-related message for decryption.");
 	} else if (newMessage && !res) {
 		//We decryped an OTR-encrypted message
 		decryptedMessage = [NSString stringWithUTF8String:newMessage];
 
+		AILogWithSignature(@"Decrypted an OTR message.");
 	} else /* (newMessage && res) */{
 		//This was an OTR protocol message
 		decryptedMessage = nil;
+		
+		AILogWithSignature(@"Skipping an OTR protocol message.");
 	}
 
 	if (newMessage)




More information about the commits mailing list