Set the "we support SMS!" ICBM flag. This causes buddies with mobile

Tue, 14 Jul 2009 07:06:22 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Tue, 14 Jul 2009 07:06:22 +0000
changeset 27784
1d2485951c7b
parent 27783
902f03a8f3db
child 27785
dea7fbe0a233

Set the "we support SMS!" ICBM flag. This causes buddies with mobile
forwarding to show up online and allows us to IM them. It's a bit
weird that an ICBM flag affects the presence that gets sent to us.

I also cleaned up these flags a little and added a #define for each
value.

libpurple/protocols/oscar/family_icbm.c file | annotate | diff | comparison | revisions
libpurple/protocols/oscar/oscar.h file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/oscar/family_icbm.c	Tue Jul 14 01:28:16 2009 +0000
+++ b/libpurple/protocols/oscar/family_icbm.c	Tue Jul 14 07:06:22 2009 +0000
@@ -221,7 +221,11 @@
 	params.maxrecverwarn = byte_stream_get16(bs);
 	params.minmsginterval = byte_stream_get32(bs);
 
-	params.flags = 0x0000000b | AIM_IMPARAM_FLAG_SUPPORT_OFFLINEMSGS;
+	params.flags = AIM_IMPARAM_FLAG_CHANNEL_MSGS_ALLOWED
+			| AIM_IMPARAM_FLAG_MISSED_CALLS_ENABLED
+			| AIM_IMPARAM_FLAG_EVENTS_ALLOWED
+			| AIM_IMPARAM_FLAG_SMS_SUPPORTED
+			| AIM_IMPARAM_FLAG_OFFLINE_MSGS_ALLOWED;
 	params.maxmsglen = 8000;
 	params.minmsginterval = 0;
 
--- a/libpurple/protocols/oscar/oscar.h	Tue Jul 14 01:28:16 2009 +0000
+++ b/libpurple/protocols/oscar/oscar.h	Tue Jul 14 07:06:22 2009 +0000
@@ -732,23 +732,27 @@
 #define AIM_TRANSFER_DENY_DECLINE	0x0001
 #define AIM_TRANSFER_DENY_NOTACCEPTING	0x0002
 
-#define AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED       0x00000001
-#define AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED    0x00000002
-#define AIM_IMPARAM_FLAG_SUPPORT_OFFLINEMSGS    0x00000100
+#define AIM_IMPARAM_FLAG_CHANNEL_MSGS_ALLOWED   0x00000001
+#define AIM_IMPARAM_FLAG_MISSED_CALLS_ENABLED   0x00000002
+#define AIM_IMPARAM_FLAG_EVENTS_ALLOWED         0x00000008
+#define AIM_IMPARAM_FLAG_SMS_SUPPORTED          0x00000010
+#define AIM_IMPARAM_FLAG_OFFLINE_MSGS_ALLOWED   0x00000100
 
 /* This is what the server will give you if you don't set them yourself. */
+/* This is probably out of date. */
 #define AIM_IMPARAM_DEFAULTS { \
 	0, \
-	AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \
+	AIM_IMPARAM_FLAG_CHANNEL_MSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSED_CALLS_ENABLED, \
 	512, /* !! Note how small this is. */ \
 	(99.9)*10, (99.9)*10, \
 	1000 /* !! And how large this is. */ \
 }
 
 /* This is what most AIM versions use. */
+/* This is probably out of date. */
 #define AIM_IMPARAM_REASONABLE { \
 	0, \
-	AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \
+	AIM_IMPARAM_FLAG_CHANNEL_MSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSED_CALLS_ENABLED, \
 	8000, \
 	(99.9)*10, (99.9)*10, \
 	0 \

mercurial