aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/jabber.h
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-02-03 13:54:19 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2008-02-03 13:54:19 +0000
commit979cfb448cc233e29ceb6cd43f99fb4104728be6 (patch)
treec4135c30ef7e8b85101e7d350d9a12b8b8fb49a5 /protocols/jabber/jabber.h
parent0fbda19314c806e3e677847f3c977eb5a1bc2b61 (diff)
Saner garbage collection of cached packets in the Jabber module. Now
cached packets are removed after about ten minues instead of something between one and two minutes. Closes one issue in #354.
Diffstat (limited to 'protocols/jabber/jabber.h')
-rw-r--r--protocols/jabber/jabber.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h
index cf0f8e6a..5132d45f 100644
--- a/protocols/jabber/jabber.h
+++ b/protocols/jabber/jabber.h
@@ -94,6 +94,7 @@ typedef xt_status (*jabber_cache_event) ( struct im_connection *ic, struct xt_no
struct jabber_cache_entry
{
+ time_t saved_at;
struct xt_node *node;
jabber_cache_event func;
};
@@ -140,6 +141,10 @@ struct jabber_chat
#define JABBER_PACKET_ID "BeeP"
#define JABBER_CACHED_ID "BeeC"
+/* The number of seconds to keep cached packets before garbage collecting
+ them. This gc is done on every keepalive (every minute). */
+#define JABBER_CACHE_MAX_AGE 600
+
/* RFC 392[01] stuff */
#define XMLNS_TLS "urn:ietf:params:xml:ns:xmpp-tls"
#define XMLNS_SASL "urn:ietf:params:xml:ns:xmpp-sasl"