Update of /cvsroot/gaim/gaim/src/protocols/oscar
In directory usw-pr-cvs1:/tmp/cvs-serv29852
Modified Files:
aim.h ft.c info.c
Log Message:
sync
Index: aim.h
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/aim.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- aim.h 2001/12/10 06:13:18 1.26
+++ aim.h 2001/12/22 04:02:28 1.27
@@ -857,6 +857,7 @@
#define AIM_GETINFO_GENERALINFO 0x00001
#define AIM_GETINFO_AWAYMESSAGE 0x00003
+#define AIM_GETINFO_CAPABILITIES 0x0004
struct aim_invite_priv {
char *sn;
Index: ft.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/ft.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ft.c 2001/12/04 08:04:21 1.10
+++ ft.c 2001/12/22 04:02:29 1.11
@@ -4,6 +4,7 @@
*/
#define FAIM_INTERNAL
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
Index: info.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/info.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- info.c 2001/12/10 00:48:27 1.9
+++ info.c 2001/12/22 04:02:29 1.10
@@ -23,9 +23,6 @@
if (!sess || !conn || !sn)
return -EINVAL;
- if ((infotype != AIM_GETINFO_GENERALINFO) && (infotype != AIM_GETINFO_AWAYMESSAGE))
- return -EINVAL;
-
if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 12+1+strlen(sn))))
return -ENOMEM;
@@ -601,7 +598,8 @@
inforeq = (struct aim_priv_inforeq *)origsnac->data;
if ((inforeq->infotype != AIM_GETINFO_GENERALINFO) &&
- (inforeq->infotype != AIM_GETINFO_AWAYMESSAGE)) {
+ (inforeq->infotype != AIM_GETINFO_AWAYMESSAGE) &&
+ (inforeq->infotype != AIM_GETINFO_CAPABILITIES)) {
faimdprintf(sess, 0, "parse_userinfo_middle: unknown infotype in request! (0x%04x)\n", inforeq->infotype);
return 0;
}
@@ -614,18 +612,30 @@
* Depending on what informational text was requested, different
* TLVs will appear here.
*
- * Profile will be 1 and 2, away message will be 3 and 4.
+ * Profile will be 1 and 2, away message will be 3 and 4, caps
+ * will be 5.
*/
- if (aim_gettlv(tlvlist, 0x0001, 1)) {
+ if (inforeq->infotype == AIM_GETINFO_GENERALINFO) {
text_encoding = aim_gettlv_str(tlvlist, 0x0001, 1);
text = aim_gettlv_str(tlvlist, 0x0002, 1);
- } else if (aim_gettlv(tlvlist, 0x0003, 1)) {
+ } else if (inforeq->infotype == AIM_GETINFO_AWAYMESSAGE) {
text_encoding = aim_gettlv_str(tlvlist, 0x0003, 1);
text = aim_gettlv_str(tlvlist, 0x0004, 1);
+ } else if (inforeq->infotype == AIM_GETINFO_CAPABILITIES) {
+ aim_tlv_t *ct;
+
+ if ((ct = aim_gettlv(tlvlist, 0x0005, 1))) {
+ aim_bstream_t cbs;
+
+ aim_bstream_init(&cbs, ct->value, ct->length);
+
+ userinfo.capabilities = aim_getcap(sess, &cbs, ct->length);
+ userinfo.capspresent = 1;
+ }
}
if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
- ret = userfunc(sess, rx, &userinfo, text_encoding, text, inforeq->infotype);
+ ret = userfunc(sess, rx, &userinfo, inforeq->infotype, text_encoding, text);
free(text_encoding);
free(text);
|