]> andersk Git - libfaim.git/commitdiff
- Sun Oct 14 19:45:54 PDT 2001 master origin
authormid <mid>
Mon, 15 Oct 2001 02:53:11 +0000 (02:53 +0000)
committermid <mid>
Mon, 15 Oct 2001 02:53:11 +0000 (02:53 +0000)
  - Fix aim_icq_setstatus
  - Minor touchups
  - Parse 1/f (selfinfo)
  - Add ICQ status defines

CHANGES
include/aim.h
src/im.c
src/login.c
src/misc.c

diff --git a/CHANGES b/CHANGES
index 1ccb4ddfdea22b43d2ac664157bd4027b4d897ca..50b247659af318c64dd2962f180949ea1930ff0f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,12 @@
 
 No release numbers
 ------------------
+ - Sun Oct 14 19:45:54 PDT 2001
+  - Fix aim_icq_setstatus
+  - Minor touchups
+  - Parse 1/f (selfinfo)
+  - Add ICQ status defines
+
  - Wed Oct  3 11:07:22 PDT 2001
   - Fix awful bug in ft listenestablish.
   - struct aim_userinfo_s becomes aim_userinfo_t.
index 100e0b43602b2f768bc3cb9e34a0e706e9845dbf..5153ae9b8cdd4eef1380a3aee49a1ce68e5fb373 100644 (file)
@@ -372,6 +372,15 @@ typedef struct aim_session_s {
 #define AIM_SESS_FLAGS_XORLOGIN        0x00000002
 #define AIM_SESS_FLAGS_NONBLOCKCONNECT 0x00000004
 
+/* Valid for calling aim_icq_setstatus() and for aim_userinfo_t->icqinfo.status */
+#define AIM_ICQ_STATE_ONLINE    0x0000
+#define AIM_ICQ_STATE_AWAY      0x0001
+#define AIM_ICQ_STATE_DND       0x0002
+#define AIM_ICQ_STATE_NA        0x0004
+#define AIM_ICQ_STATE_OCCUPIED  0x0010
+#define AIM_ICQ_STATE_CHAT      0x0020
+#define AIM_ICQ_STATE_INVISIBLE 0x0100
+
 /*
  * AIM User Info, Standard Form.
  */
@@ -567,7 +576,7 @@ faim_export int aim_bos_reqlocaterights(aim_session_t *, aim_conn_t *);
 faim_export int aim_setversions(aim_session_t *sess, aim_conn_t *conn);
 faim_export int aim_setdirectoryinfo(aim_session_t *sess, aim_conn_t *conn, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, fu16_t privacy);
 faim_export int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, fu16_t privacy);
-faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t status);
+faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status);
 
 faim_export struct aim_fileheader_t *aim_getlisting(aim_session_t *sess, FILE *);
 
index b47b14c66fcb39ff8a9b31c13ce931db96e0eecf..747c773fbd42206ccda2b610af29073b4a38e10a 100644 (file)
--- a/src/im.c
+++ b/src/im.c
@@ -1382,14 +1382,6 @@ static int incomingim(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, a
         */
        channel = aimbs_get16(bs);
 
-       /*
-        * Technically Channel 3 in chat could be done here too.
-        */
-       if ((channel != 0x01) && (channel != 0x02)) {
-               faimdprintf(sess, 0, "icbm: ICBM received on an unsupported channel.  Ignoring.\n (chan = %04x)", channel);
-               return 0;
-       }
-
        /*
         * Extract the standard user info block.
         *
@@ -1434,6 +1426,9 @@ static int incomingim(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, a
                 * Free up the TLV chain.
                 */
                aim_freetlvchain(&tlvlist);
+       } else {
+               faimdprintf(sess, 0, "icbm: ICBM received on an unsupported channel.  Ignoring.\n (chan = %04x)", channel);
+               return 0;
        }
 
        return ret;
index ba4bed7c670c43542bb94877eee82d978a3863ee..fa702b44a27c1eadda156c5418abce827c13c63f 100644 (file)
@@ -602,13 +602,15 @@ static int ratechange(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, a
        return 0;
 }
 
-/* XXX parse this */
 static int selfinfo(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
 {
        aim_rxcallback_t userfunc;
+       aim_userinfo_t userinfo;
+
+       aim_extractuserinfo(sess, bs, &userinfo);
 
        if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
-               return userfunc(sess, rx);
+               return userfunc(sess, rx, &userinfo);
 
        return 0;
 }
index acc65be1f7ec3e9d6af7e867b3925a4b03ec0007..c1d8d8fcf0a58c61bff848ce227225e7d4bbf1a6 100644 (file)
@@ -642,7 +642,7 @@ faim_export int aim_setuserinterests(aim_session_t *sess, aim_conn_t *conn, cons
        return 0;
 }
 
-faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t status)
+faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu16_t status)
 {
        aim_frame_t *fr;
        aim_snacid_t snacid;
@@ -651,7 +651,7 @@ faim_export int aim_icq_setstatus(aim_session_t *sess, aim_conn_t *conn, fu32_t
 
        data = 0x00030000 | status; /* yay for error checking ;^) */
 
-       if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 4)))
+       if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 8)))
                return -ENOMEM;
 
        snacid = aim_cachesnac(sess, 0x0001, 0x001e, 0x0000, NULL, 0);
This page took 0.111292 seconds and 5 git commands to generate.