changeset 7466:fa0324675ed9

[gaim-migrate @ 8079] This might fix the "user info for null unavailable," or whatever. Let me know when it doesn't. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 09 Nov 2003 07:58:23 +0000
parents dedbfdc7ce65
children f9ed27be344e
files plugins/spellchk.c src/protocols/oscar/aim.h src/protocols/oscar/conn.c src/protocols/oscar/locate.c
diffstat 4 files changed, 30 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/spellchk.c	Sun Nov 09 06:12:06 2003 +0000
+++ b/plugins/spellchk.c	Sun Nov 09 07:58:23 2003 +0000
@@ -97,7 +97,7 @@
 	const char * const defaultconf = "BAD r\nGOOD are\n\n"
 			"BAD u\nGOOD you\n\n"
 			"BAD teh\nGOOD the\n\n";
-	char *buf, *ibuf;
+	gchar *buf, *ibuf;
 	char name[82];
 	char cmd[256];
 	int pnt = 0;
@@ -105,7 +105,7 @@
 
 	model = gtk_list_store_new((gint)N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
 
-	buf = g_build_filename(gaim_home_dir(), ".gaim", "dict", NULL);
+	buf = g_build_filename(gaim_user_dir(), "dict", NULL);
 	g_file_get_contents(buf, &ibuf, &size, NULL);
 	free(buf);
 	if(!ibuf) {
--- a/src/protocols/oscar/aim.h	Sun Nov 09 06:12:06 2003 +0000
+++ b/src/protocols/oscar/aim.h	Sun Nov 09 07:58:23 2003 +0000
@@ -454,7 +454,8 @@
 
 	struct {
 		struct aim_userinfo_s *userinfo;
-		struct userinfo_node *request_queue;
+		struct userinfo_node *torequest;
+		struct userinfo_node *requested;
 		int waiting_for_response;
 	} locate;
 
--- a/src/protocols/oscar/conn.c	Sun Nov 09 06:12:06 2003 +0000
+++ b/src/protocols/oscar/conn.c	Sun Nov 09 07:58:23 2003 +0000
@@ -191,11 +191,9 @@
 }
 
 /**
- * aim_connrst - Clears out connection list, killing remaining connections.
- * @sess: Session to be cleared
+ * Clears out connection list, killing remaining connections.
  *
- * Clears out the connection list and kills any connections left.
- *
+ * @param sess Session to be cleared
  */
 static void aim_connrst(aim_session_t *sess)
 {
@@ -217,11 +215,10 @@
 }
 
 /**
- * aim_conn_init - Reset a connection to default values.
- * @deadconn: Connection to be reset
- *
+ * Reset a connection to default values.
  * Initializes and/or resets a connection structure.
  *
+ * @param deadconn Connection to be reset
  */
 static void aim_conn_init(aim_conn_t *deadconn)
 {
@@ -871,20 +868,16 @@
 	sess->queue_incoming = NULL;
 	aim_initsnachash(sess);
 	sess->msgcookies = NULL;
-	sess->icq_info = NULL;
-	sess->oft_info = NULL;
-	sess->emailinfo = NULL;
-	sess->locate.userinfo = NULL;
-	sess->locate.request_queue = NULL;
-	sess->locate.waiting_for_response = FALSE;
-	sess->snacid_next = 0x00000001;
-
 	sess->nonblocking = nonblocking;
 	sess->debug = debuglevel;
 	sess->debugcb = defaultdebugcb;
+	sess->modlistv = NULL;
+	sess->snacid_next = 0x00000001;
 
-	sess->modlistv = NULL;
-
+	sess->locate.userinfo = NULL;
+	sess->locate.torequest = NULL;
+	sess->locate.requested = NULL;
+	sess->locate.waiting_for_response = FALSE;
 	sess->ssi.received_data = 0;
 	sess->ssi.numitems = 0;
 	sess->ssi.official = NULL;
@@ -892,8 +885,10 @@
 	sess->ssi.pending = NULL;
 	sess->ssi.timestamp = (time_t)0;
 	sess->ssi.waiting_for_ack = 0;
-
+	sess->icq_info = NULL;
 	sess->authinfo = NULL;
+	sess->emailinfo = NULL;
+	sess->oft_info = NULL;
 
 	/*
 	 * This must always be set.  Default to the queue-based
@@ -901,7 +896,6 @@
 	 */
 	aim_tx_setenqueue(sess, AIM_TX_QUEUED, NULL);
 
-
 	/*
 	 * Register all the modules for this session...
 	 */
--- a/src/protocols/oscar/locate.c	Sun Nov 09 06:12:06 2003 +0000
+++ b/src/protocols/oscar/locate.c	Sun Nov 09 07:58:23 2003 +0000
@@ -237,7 +237,7 @@
 }
 
 static void aim_locate_dorequest(aim_session_t *sess) {
-	struct userinfo_node *cur = sess->locate.request_queue;
+	struct userinfo_node *cur = sess->locate.torequest;
 
 	if (cur == NULL)
 		return;
@@ -247,6 +247,11 @@
 
 	sess->locate.waiting_for_response = TRUE;
 	aim_locate_getinfoshort(sess, cur->sn, 0x00000003);
+
+	/* Move this node to the "requested" queue */
+	sess->locate.torequest = cur->next;
+	cur->next = sess->locate.requested;
+	sess->locate.requested = cur;
 }
 
 /**
@@ -262,15 +267,15 @@
 	struct userinfo_node *cur, *del;
 	int was_explicit = TRUE;
 
-	while ((sess->locate.request_queue != NULL) && (aim_sncmp(sn, sess->locate.request_queue->sn) == 0)) {
-		del = sess->locate.request_queue;
-		sess->locate.request_queue = del->next;
+	while ((sess->locate.requested != NULL) && (aim_sncmp(sn, sess->locate.requested->sn) == 0)) {
+		del = sess->locate.requested;
+		sess->locate.requested = del->next;
 		was_explicit = FALSE;
 		free(del->sn);
 		free(del);
 	}
 
-	cur = sess->locate.request_queue;
+	cur = sess->locate.requested;
 	while ((cur != NULL) && (cur->next != NULL)) {
 		if (aim_sncmp(sn, cur->next->sn) == 0) {
 			del = cur->next;
@@ -294,7 +299,7 @@
 	struct userinfo_node *cur;
 
 	/* Make sure we aren't already requesting info for this buddy */
-	cur = sess->locate.request_queue;
+	cur = sess->locate.torequest;
 	while (cur != NULL) {
 		if (aim_sncmp(sn, cur->sn) == 0)
 			return;
@@ -304,8 +309,8 @@
 	/* Add a new node to our request queue */
 	cur = (struct userinfo_node *)malloc(sizeof(struct userinfo_node));
 	cur->sn = strdup(sn);
-	cur->next = sess->locate.request_queue;
-	sess->locate.request_queue = cur;
+	cur->next = sess->locate.torequest;
+	sess->locate.torequest = cur;
 
 	/* Actually request some info up in this piece */
 	aim_locate_dorequest(sess);