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
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.
*/
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;
}
fd_set fds, wfds;
struct timeval tv;
int res, error = ETIMEDOUT;
- rxcallback_t userfunc;
+ aim_rxcallback_t userfunc;
if (!conn || (conn->fd == -1))
return -1;