+#if 0 /* debugging feature */
+faim_internal int aim_dumpcookie(struct aim_msgcookie_t *cookie)
+{
+ if(!cookie)
+ return -1;
+ printf("\tCookie at %p: %d/%s with %p, next %p\n", cookie, cookie->type, cookie->cookie, cookie->data, cookie->next);
+ return 0;
+}
+#endif
+
+/**
+ * aim_cookie_free - free an aim_msgcookie_t struct
+ * @sess: session to remove the cookie from
+ * @cookiep: the address of a pointer to the cookie struct to remove
+ *
+ * this function removes the cookie *cookie from teh list of cookies
+ * in sess, and then frees all memory associated with it. including
+ * its data! if you want to use the private data after calling this,
+ * make sure you copy it first.
+ *
+ * returns -1 on error, 0 on success.
+ *
+ */
+
+faim_internal int aim_cookie_free(struct aim_session_t *sess,
+ struct aim_msgcookie_t *cookie)
+{