Mercurial > pidgin.yaz
diff libfaim/conn.c @ 1649:3fe5799b7823
[gaim-migrate @ 1659]
Update libfaim.
committer: Tailor Script <tailor@pidgin.im>
author | Adam Fritzler <mid@auk.cx> |
---|---|
date | Tue, 27 Mar 2001 00:51:09 +0000 |
parents | ec31e23aadc7 |
children | 109cacf1ff97 |
line wrap: on
line diff
--- a/libfaim/conn.c Mon Mar 26 10:29:06 2001 +0000 +++ b/libfaim/conn.c Tue Mar 27 00:51:09 2001 +0000 @@ -722,6 +722,11 @@ return; } +static void defaultdebugcb(struct aim_session_t *sess, int level, const char *format, va_list va) +{ + vfprintf(stderr, format, va); +} + /** * aim_session_init - Initializes a session structure * @sess: Session to initialize @@ -747,8 +752,10 @@ sess->snac_nextid = 0x00000001; sess->flags = 0; - sess->debug = 0; - sess->debugcb = NULL; + sess->debug = debuglevel; + sess->debugcb = defaultdebugcb; + + sess->modlistv = NULL; /* * Default to SNAC login unless XORLOGIN is explicitly set. @@ -763,6 +770,39 @@ */ aim_tx_setenqueue(sess, AIM_TX_QUEUED, NULL); + + /* + * Register all the modules for this session... + */ + aim__registermodule(sess, misc_modfirst); /* load the catch-all first */ + aim__registermodule(sess, buddylist_modfirst); + aim__registermodule(sess, admin_modfirst); + aim__registermodule(sess, bos_modfirst); + aim__registermodule(sess, search_modfirst); + aim__registermodule(sess, stats_modfirst); + aim__registermodule(sess, auth_modfirst); + aim__registermodule(sess, msg_modfirst); + aim__registermodule(sess, chatnav_modfirst); + aim__registermodule(sess, chat_modfirst); + aim__registermodule(sess, locate_modfirst); + aim__registermodule(sess, general_modfirst); + + return; +} + +/** + * aim_session_kill - Deallocate a session + * @sess: Session to kill + * + * + */ +faim_export void aim_session_kill(struct aim_session_t *sess) +{ + + aim_logoff(sess); + + aim__shutdownmodules(sess); + return; }