* 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)
{
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;
{
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);
* 2 Advisory upgrade
* 3 System bulletin
* 4 Nothing's wrong ("top o the world" -- normal)
+ * 5 Lets-break-something.
*
*/
id = aimbs_get16(bs);
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;
}
/*