adium-1.4 3069:be7c1eabdec8: Add some debug logging for message ...

commits at adium.im commits at adium.im
Sat Sep 25 12:20:46 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/be7c1eabdec8
revision:	3069:be7c1eabdec8
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.

diffs (34 lines):

diff -r f0ecbebd73c4 -r be7c1eabdec8 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
@@ -1200,6 +1200,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 f0ecbebd73c4 -r be7c1eabdec8 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
@@ -788,13 +788,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