]> andersk Git - libfaim.git/commitdiff
- Preserve subtype and priv after aim_conn_close
authormid <mid>
Tue, 8 Aug 2000 04:32:38 +0000 (04:32 +0000)
committermid <mid>
Tue, 8 Aug 2000 04:32:38 +0000 (04:32 +0000)
CHANGES
aim_conn.c

diff --git a/CHANGES b/CHANGES
index f6d3f7848dd1038cd078dd2944b4a1919d44527e..2ae595f3cba7afcf0e62962546b1ebcbd7650f9b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
 
 No release numbers
 ------------------
+ - Tue Aug  8 04:25:35 UTC 2000
+   - Preserve subtype and priv after aim_conn_close
+
  - Tue Aug  8 04:15:47 UTC 2000
    - Fixed double-calling of faim_mutex_init
    - conn->type preserved after aim_conn_close
index 5eb568df0a8f09c0f647d505e844e4a22638f72c..a815e332aa621bbafc234e7c8254fcb80746ed8e 100644 (file)
@@ -61,6 +61,7 @@ static void aim_conn_init(struct aim_conn_t *deadconn)
     return;
 
   deadconn->fd = -1;
+  deadconn->subtype = -1;
   deadconn->type = -1;
   deadconn->seqnum = 0;
   deadconn->lastactivity = 0;
@@ -110,21 +111,30 @@ void aim_conn_kill(struct aim_session_t *sess, struct aim_conn_t **deadconn)
 
 void aim_conn_close(struct aim_conn_t *deadconn)
 {
-  int typesav = -1;
+  int typesav = -1, subtypesav = -1;
+  void *privsav = NULL;
 
   faim_mutex_destroy(&deadconn->active);
   faim_mutex_destroy(&deadconn->seqnum_lock);
   if (deadconn->fd >= 3)
     close(deadconn->fd);
-  typesav = deadconn->type;
   if (deadconn->handlerlist)
     aim_clearhandlers(deadconn);
-  if (deadconn->priv)
+
+  typesav = deadconn->type;
+  subtypesav = deadconn->subtype;
+
+  if (deadconn->priv && (deadconn->type != AIM_CONN_TYPE_RENDEZVOUS)) {
     free(deadconn->priv);
-  
+    deadconn->priv = NULL;
+  }
+  privsav = deadconn->priv;
+
   aim_conn_init(deadconn);
 
   deadconn->type = typesav;
+  deadconn->subtype = subtypesav;
+  deadconn->priv = privsav;
 
   return;
 }
This page took 0.150943 seconds and 5 git commands to generate.