Index: etc/c2s.xml.dist.in
--- etc/c2s.xml.dist.in.orig	2009-06-30 11:38:16 +0200
+++ etc/c2s.xml.dist.in	2009-06-30 20:45:22 +0200
@@ -50,18 +50,16 @@
   </router>
 
   <!-- Log configuration - type is "syslog", "file" or "stdout" -->
-  <log type='syslog'>
+  <log type='file'>
     <!-- If logging to syslog, this is the log ident -->
-    <ident>jabberd/c2s</ident>
+    <!-- <ident>jabberd/c2s</ident> -->
 
     <!-- If logging to syslog, this is the log facility
          (local0 - local7)                        [default: local3] -->
-    <facility>local3</facility>
+    <!-- <facility>local3</facility> -->
 
     <!-- If logging to file, this is the filename of the logfile -->
-    <!--
     <file>@localstatedir@/jabberd/log/c2s.log</file>
-    -->
   </log>
 
   <!-- Local network configuration -->
@@ -137,7 +135,7 @@
     <id password-change='true' /> -->
 
     <!-- IP address to bind to (default: 0.0.0.0) -->
-    <ip>0.0.0.0</ip>
+    <ip>127.0.0.1</ip>
 
     <!-- Port to bind to, or 0 to disable unencrypted access to the
          server (default: 5222) -->
@@ -331,7 +329,7 @@
     <path>@pkglibdir@</path>
 
     <!-- Backend module to use -->
-    <module>sqlite</module>
+    <module>db</module>
 
     <!-- Available authentication mechanisms -->
     <mechanisms>
Index: etc/router.xml.dist.in
--- etc/router.xml.dist.in.orig	2009-06-30 11:38:16 +0200
+++ etc/router.xml.dist.in	2009-06-30 20:45:06 +0200
@@ -8,24 +8,22 @@
   <pidfile>@localstatedir@/jabberd/pid/router.pid</pidfile>
 
   <!-- Log configuration - type is "syslog", "file" or "stdout" -->
-  <log type='syslog'>
+  <log type='file'>
     <!-- If logging to syslog, this is the log ident -->
-    <ident>jabberd/router</ident>
+    <!-- <ident>jabberd/router</ident> -->
 
     <!-- If logging to syslog, this is the log facility
          (local0 - local7)                        [default: local3] -->
-    <facility>local3</facility>
+    <!-- <facility>local3</facility> -->
 
     <!-- If logging to file, this is the filename of the logfile -->
-    <!--
     <file>@localstatedir@/jabberd/log/router.log</file>
-    -->
   </log>
 
   <!-- Local network configuration -->
   <local>
     <!-- IP address to bind to (default: 0.0.0.0) -->
-    <ip>0.0.0.0</ip>
+    <ip>127.0.0.1</ip>
 
     <!-- Port to bind to (default: 5347) -->
     <port>5347</port>
Index: etc/s2s.xml.dist.in
--- etc/s2s.xml.dist.in.orig	2009-06-30 11:38:16 +0200
+++ etc/s2s.xml.dist.in	2009-06-30 20:45:06 +0200
@@ -60,25 +60,23 @@
   </router>
 
   <!-- Log configuration - type is "syslog", "file" or "stdout" -->
-  <log type='syslog'>
+  <log type='file'>
     <!-- If logging to syslog, this is the log ident -->
-    <ident>jabberd/s2s</ident>
+    <!-- <ident>jabberd/s2s</ident> -->
 
     <!-- If logging to syslog, this is the log facility
          (local0 - local7)                        [default: local3] -->
-    <facility>local3</facility>
+    <!-- <facility>local3</facility> -->
 
     <!-- if logging to file, this is the filename of the logfile -->
-    <!--
     <file>@localstatedir@/jabberd/log/s2s.log</file>
-    -->
   </log>
 
   <!-- Local network configuration -->
   <local>
     <!-- IP and port to listen for incoming s2s connections on
                                            (default: 0.0.0.0, 5269) -->
-    <ip>0.0.0.0</ip>
+    <ip>127.0.0.1</ip>
     <port>5269</port>
 
     <!-- Multihomed machines (with more than one interface and IP address)
Index: etc/sm.xml.dist.in
--- etc/sm.xml.dist.in.orig	2009-06-30 11:38:16 +0200
+++ etc/sm.xml.dist.in	2009-06-30 20:45:36 +0200
@@ -50,13 +50,13 @@
   </router>
 
   <!-- Log configuration - type is "syslog", "file" or "stdout" -->
-  <log type='syslog'>
+  <log type='file'>
     <!-- If logging to syslog, this is the log ident -->
-    <ident>jabberd/sm</ident>
+    <!-- <ident>jabberd/sm</ident> -->
 
     <!-- If logging to syslog, this is the log facility
          (local0 - local7)                        [default: local3] -->
-    <facility>local3</facility>
+    <!-- <facility>local3</facility> -->
 
     <!-- If logging to file, this is the filename of the logfile -->
     <!--
@@ -85,7 +85,7 @@
     <path>@pkglibdir@</path>
 
     <!-- By default, we use the SQLite driver for all storage -->
-    <driver>sqlite</driver>
+    <driver>db</driver>
 
     <!-- Its also possible to explicitly list alternate drivers for
          specific data types. -->
Index: sm/mod_iq_time.c
--- sm/mod_iq_time.c.orig	2009-06-30 11:38:15 +0200
+++ sm/mod_iq_time.c	2009-06-30 20:45:06 +0200
@@ -39,6 +39,7 @@
 static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt)
 {
     time_t t;
+    time_t tzone;
     struct tm *tm;
     char buf[64];
     char *c;
@@ -78,7 +79,8 @@
     datetime_out(t, dt_DATETIME, buf, 64);
     nad_insert_elem(pkt->nad, 2, NAD_ENS(pkt->nad, 1), "utc", buf);
 #ifdef HAVE_TZSET
-    snprintf(buf, 64, "%+03d:%02d", -((int)timezone)/(60*60), -((int)timezone)%(60*60));
+    tzone = (time_t)((long)mktime(gmtime(&t)) - (long)t);
+    snprintf(buf, 64, "%+03d:%02d", (int) -tzone/(60*60), (int) -tzone%(60*60));
 #else
     snprintf(buf, 64, "%+03d:%02d", (int) tm->tm_gmtoff/(60*60), (int) tm->tm_gmtoff%(60*60));
 #endif
Index: sm/mod_roster.c
--- sm/mod_roster.c.orig	2009-06-30 11:38:15 +0200
+++ sm/mod_roster.c	2009-06-30 20:45:06 +0200
@@ -635,6 +635,9 @@
     if(user->sessions == NULL)
         return mod_PASS;
 
+    /* We have to free old packet - Lemming's memory leak fix */
+    pkt_free(pkt);
+
     /* build a new packet to push out to everyone */
     pkt = pkt_create(user->sm, "iq", "set", NULL, NULL);
     pkt_id_new(pkt);
Index: util/util.h
--- util/util.h.orig	2009-06-30 11:38:16 +0200
+++ util/util.h	2009-06-30 20:45:06 +0200
@@ -30,6 +30,8 @@
 #include <time.h>
 #include <errno.h>
 #include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
 
 #include <expat.h>
 
