+
+/**
+ * aim_tx_cleanqueue - get rid of packets waiting for tx on a dying conn
+ * @sess: session
+ * @conn: connection that's dying
+ *
+ * for now this simply marks all packets as sent and lets them
+ * disappear without warning.
+ *
+ * doesn't respect command_tx_struct locks.
+ */
+
+faim_export int aim_tx_cleanqueue(struct aim_session_t *sess, struct aim_conn_t *conn)
+{
+ struct command_tx_struct *cur = NULL;
+
+ if(!sess || !conn)
+ return -1;
+
+ /* we don't respect locks here */
+ for(cur = sess->queue_outgoing; cur; cur = cur->next)
+ if(cur->conn == conn)
+ cur->sent = 1;
+
+ return 0;
+}
+
+