diff -Nau etc/c2s.xml.dist.in.orig etc/c2s.xml.dist.in
Index: etc/c2s.xml.dist.in
--- etc/c2s.xml.dist.in.orig	2012-05-22 22:27:51.000000000 +0200
+++ etc/c2s.xml.dist.in	2012-08-27 13:44:20.119445160 +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@/@package@/log/c2s.log</file>
-    -->
 
     <!-- Filename of the debug logfile -->
     <!--
@@ -154,7 +152,7 @@
     <id password-change='mu' /> -->
 
     <!-- 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) -->
diff -Nau etc/router.xml.dist.in.orig etc/router.xml.dist.in
Index: etc/router.xml.dist.in
--- etc/router.xml.dist.in.orig	2012-05-04 18:24:36.000000000 +0200
+++ etc/router.xml.dist.in	2012-08-27 13:47:20.357743449 +0200
@@ -8,18 +8,16 @@
   <pidfile>@localstatedir@/@package@/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@/@package@/log/router.log</file>
-    -->
 
     <!-- Filename of the debug logfile -->
     <!--
@@ -30,7 +28,7 @@
   <!-- 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>
diff -Nau etc/s2s.xml.dist.in.orig etc/s2s.xml.dist.in
Index: etc/s2s.xml.dist.in
--- etc/s2s.xml.dist.in.orig	2012-08-06 20:18:46.000000000 +0200
+++ etc/s2s.xml.dist.in	2012-08-27 13:45:50.771011934 +0200
@@ -60,18 +60,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/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@/@package@/log/s2s.log</file>
-    -->
 
     <!-- Filename of the debug logfile -->
     <!--
@@ -83,7 +81,7 @@
   <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)
diff -Nau etc/sm.xml.dist.in.orig etc/sm.xml.dist.in
Index: etc/sm.xml.dist.in
--- etc/sm.xml.dist.in.orig	2012-05-04 18:24:36.000000000 +0200
+++ etc/sm.xml.dist.in	2012-08-27 13:41:59.772838992 +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 -->
     <!--
diff -Nau sm/mod_iq_time.c.orig sm/mod_iq_time.c
Index: sm/mod_iq_time.c
--- sm/mod_iq_time.c.orig	2011-10-22 21:56:00.000000000 +0200
+++ sm/mod_iq_time.c	2012-08-27 13:41:59.773059371 +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
diff -Nau sm/mod_roster.c.orig sm/mod_roster.c
Index: sm/mod_roster.c
--- sm/mod_roster.c.orig	2012-02-12 22:36:18.000000000 +0100
+++ sm/mod_roster.c	2012-08-27 13:41:59.773438877 +0200
@@ -717,6 +717,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);
diff -Nau tools/jabberd.in.orig tools/jabberd.in
Index: tools/jabberd.in
--- tools/jabberd.in.orig	2012-02-12 22:38:25.000000000 +0100
+++ tools/jabberd.in	2012-09-16 11:21:49.325189601 +0200
@@ -65,7 +65,7 @@
 
 
 #-----------------------------------------------------------------------------
-# Setup the jobs: router, sm, c2s, s2s
+# Setup the jobs: router, sm, c2s, s2s, mu-conference
 #-----------------------------------------------------------------------------
 $jobs{jabberd}->{prefix}  = "JBRD";
 
@@ -85,12 +85,17 @@
 $jobs{s2s}->{config} = "$config_dir/s2s.xml";
 $jobs{s2s}->{prefix} = "S2S";
 
+$jobs{muc}->{cmd} = "$Bin/mu-conference";
+$jobs{muc}->{config} = "$config_dir/muc.xml";
+$jobs{muc}->{prefix} = "MUC";
+
 if ($config eq "internal")
 {
     $programs[0] = ["router"];
     $programs[1] = ["sm"];
     $programs[2] = ["c2s"];
     $programs[3] = ["s2s"];
+    $programs[4] = ["muc"];
 }
 else
 {
diff -Nau util/util.h.orig util/util.h
Index: util/util.h
--- util/util.h.orig	2012-08-22 08:03:58.000000000 +0200
+++ util/util.h	2012-08-27 13:41:59.773719964 +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>
 
diff -Nau mu-conference-0.8.81/src/main.c.orig mu-conference-0.8.81/src/main.c
Index: mu-conference-0.8.81/src/main.c
--- mu-conference-0.8.81/src/main.c.orig	2013-07-01 00:12:58.147291969 +0200
+++ mu-conference-0.8.81/src/main.c	2013-06-30 23:15:28.653657696 +0200
@@ -51,7 +51,7 @@
 
   jcr = (jcr_instance)calloc(1, sizeof(_jcr_instance));
 
-  g_thread_init(NULL);
+  g_thread_init_glib(NULL);
   fprintf(stderr, "%s -- %s\n%s\n\n", _JCOMP_NAME, _JCOMP_VERS, _JCOMP_COPY);
 
   while ((c = getopt(argc, argv, "Bshd:c:")) != EOF)
diff -Nau mu-conference-0.8.81/src/jcomp/jcr_deliver.c.orig mu-conference-0.8.81/src/jcomp/jcr_deliver.c
Index: mu-conference-0.8.81/src/jcomp/jcr_deliver.c
--- mu-conference-0.8.81/src/jcomp/jcr_deliver.c.orig	2013-06-14 21:42:45.000000000 +0200
+++ mu-conference-0.8.81/src/jcomp/jcr_deliver.c	2013-07-01 03:13:46.888580626 +0200
@@ -33,11 +33,11 @@
     sleep(1);
   }
 
-  g_async_queue_push(jcr->dqueue, d);
   log_debug(JDBG, "queued %lu bytes now %lu msgs : >>> %s <<<",
 	    strlen(xmlnode2str(d->x)),
 	    g_async_queue_length(jcr->dqueue),
 	    xmlnode2str(d->x));
+  g_async_queue_push(jcr->dqueue, d);
 }
 
 void jcr_queue_deliver(void *a) {
