]> andersk Git - libfaim.git/blobdiff - src/login.c
- Wed Oct 3 11:07:22 PDT 2001
[libfaim.git] / src / login.c
index 4cce808a4ba51ab721491dbd970db7fa872cbe69..ba4bed7c670c43542bb94877eee82d978a3863ee 100644 (file)
@@ -82,7 +82,6 @@ static int goddamnicq(aim_session_t *sess, aim_conn_t *conn, const char *sn)
  * valid, a 0017/0007 comes back, which is the signal to send it the main 
  * login command (0017/0002). 
  *
- * XXX make ICQ logins work again. 
  */
 faim_export int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const char *sn)
 {
@@ -93,7 +92,7 @@ faim_export int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const c
        if (!sess || !conn || !sn)
                return -EINVAL;
 
-       if ((sn[0] >= '0') || (sn[0] <= '9'))
+       if ((sn[0] >= '0') && (sn[0] <= '9'))
                return goddamnicq(sess, conn, sn);
 
        sess->flags |= AIM_SESS_FLAGS_SNACLOGIN;
@@ -618,9 +617,9 @@ static int evilnotify(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, a
 {
        aim_rxcallback_t userfunc;
        fu16_t newevil;
-       struct aim_userinfo_s userinfo;
+       aim_userinfo_t userinfo;
 
-       memset(&userinfo, 0, sizeof(struct aim_userinfo_s));
+       memset(&userinfo, 0, sizeof(aim_userinfo_t));
        
        newevil = aimbs_get16(bs);
 
@@ -757,6 +756,7 @@ static int motd(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_mod
         *   2 Advisory upgrade
         *   3 System bulletin
         *   4 Nothing's wrong ("top o the world" -- normal)
+        *   5 Lets-break-something. 
         *
         */
        id = aimbs_get16(bs);
@@ -783,16 +783,17 @@ static int hostversions(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx,
        aim_rxcallback_t userfunc;
        int vercount;
        fu8_t *versions;
+       int ret = 0;
 
        vercount = aim_bstream_empty(bs)/4;
        versions = aimbs_getraw(bs, aim_bstream_empty(bs));
 
        if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
-               return userfunc(sess, rx, vercount, versions);
+               ret = userfunc(sess, rx, vercount, versions);
 
        free(versions);
 
-       return 0;
+       return ret;
 }
 
 /*
This page took 0.047811 seconds and 4 git commands to generate.