jabberd/jabberd.patch

changeset 689
9fe04d4d4e5a
parent 540
6becb64fe77d
child 693
165d980aa5f1
equal deleted inserted replaced
4:c338a50544c7 5:d8716d296f76
1 diff -Nau etc/c2s.xml.dist.in.orig etc/c2s.xml.dist.in
1 Index: etc/c2s.xml.dist.in 2 Index: etc/c2s.xml.dist.in
2 --- etc/c2s.xml.dist.in.orig 2009-06-30 11:38:16 +0200 3 --- etc/c2s.xml.dist.in.orig 2012-05-22 22:27:51.000000000 +0200
3 +++ etc/c2s.xml.dist.in 2009-06-30 20:45:22 +0200 4 +++ etc/c2s.xml.dist.in 2012-08-27 13:44:20.119445160 +0200
4 @@ -50,18 +50,16 @@ 5 @@ -50,13 +50,13 @@
5 </router> 6 </router>
6 7
7 <!-- Log configuration - type is "syslog", "file" or "stdout" --> 8 <!-- Log configuration - type is "syslog", "file" or "stdout" -->
8 - <log type='syslog'> 9 - <log type='syslog'>
9 + <log type='file'> 10 + <log type='file'>
15 (local0 - local7) [default: local3] --> 16 (local0 - local7) [default: local3] -->
16 - <facility>local3</facility> 17 - <facility>local3</facility>
17 + <!-- <facility>local3</facility> --> 18 + <!-- <facility>local3</facility> -->
18 19
19 <!-- If logging to file, this is the filename of the logfile --> 20 <!-- If logging to file, this is the filename of the logfile -->
20 - <!-- 21 <!--
21 <file>@localstatedir@/jabberd/log/c2s.log</file> 22 @@ -154,7 +154,7 @@
22 - --> 23 <id password-change='mu' /> -->
23 </log>
24
25 <!-- Local network configuration -->
26 @@ -137,7 +135,7 @@
27 <id password-change='true' /> -->
28 24
29 <!-- IP address to bind to (default: 0.0.0.0) --> 25 <!-- IP address to bind to (default: 0.0.0.0) -->
30 - <ip>0.0.0.0</ip> 26 - <ip>0.0.0.0</ip>
31 + <ip>127.0.0.1</ip> 27 + <ip>127.0.0.1</ip>
32 28
33 <!-- Port to bind to, or 0 to disable unencrypted access to the 29 <!-- Port to bind to, or 0 to disable unencrypted access to the
34 server (default: 5222) --> 30 server (default: 5222) -->
35 @@ -331,7 +329,7 @@ 31 @@ -370,7 +370,7 @@
36 <path>@pkglibdir@</path> 32 <path>@pkglibdir@</path>
37 33
38 <!-- Backend module to use --> 34 <!-- Backend module to use -->
39 - <module>sqlite</module> 35 - <module>sqlite</module>
40 + <module>db</module> 36 + <module>db</module>
41 37
42 <!-- Available authentication mechanisms --> 38 <!-- Available authentication mechanisms -->
43 <mechanisms> 39 <mechanisms>
40 diff -Nau etc/router.xml.dist.in.orig etc/router.xml.dist.in
44 Index: etc/router.xml.dist.in 41 Index: etc/router.xml.dist.in
45 --- etc/router.xml.dist.in.orig 2009-06-30 11:38:16 +0200 42 --- etc/router.xml.dist.in.orig 2012-05-04 18:24:36.000000000 +0200
46 +++ etc/router.xml.dist.in 2009-06-30 20:45:06 +0200 43 +++ etc/router.xml.dist.in 2012-08-27 13:47:20.357743449 +0200
47 @@ -8,24 +8,22 @@ 44 @@ -8,13 +8,13 @@
48 <pidfile>@localstatedir@/jabberd/pid/router.pid</pidfile> 45 <pidfile>@localstatedir@/@package@/pid/router.pid</pidfile>
49 46
50 <!-- Log configuration - type is "syslog", "file" or "stdout" --> 47 <!-- Log configuration - type is "syslog", "file" or "stdout" -->
51 - <log type='syslog'> 48 - <log type='syslog'>
52 + <log type='file'> 49 + <log type='file'>
53 <!-- If logging to syslog, this is the log ident --> 50 <!-- If logging to syslog, this is the log ident -->
58 (local0 - local7) [default: local3] --> 55 (local0 - local7) [default: local3] -->
59 - <facility>local3</facility> 56 - <facility>local3</facility>
60 + <!-- <facility>local3</facility> --> 57 + <!-- <facility>local3</facility> -->
61 58
62 <!-- If logging to file, this is the filename of the logfile --> 59 <!-- If logging to file, this is the filename of the logfile -->
63 - <!-- 60 <!--
64 <file>@localstatedir@/jabberd/log/router.log</file> 61 @@ -30,7 +30,7 @@
65 - -->
66 </log>
67
68 <!-- Local network configuration --> 62 <!-- Local network configuration -->
69 <local> 63 <local>
70 <!-- IP address to bind to (default: 0.0.0.0) --> 64 <!-- IP address to bind to (default: 0.0.0.0) -->
71 - <ip>0.0.0.0</ip> 65 - <ip>0.0.0.0</ip>
72 + <ip>127.0.0.1</ip> 66 + <ip>127.0.0.1</ip>
73 67
74 <!-- Port to bind to (default: 5347) --> 68 <!-- Port to bind to (default: 5347) -->
75 <port>5347</port> 69 <port>5347</port>
70 diff -Nau etc/s2s.xml.dist.in.orig etc/s2s.xml.dist.in
76 Index: etc/s2s.xml.dist.in 71 Index: etc/s2s.xml.dist.in
77 --- etc/s2s.xml.dist.in.orig 2009-06-30 11:38:16 +0200 72 --- etc/s2s.xml.dist.in.orig 2012-08-06 20:18:46.000000000 +0200
78 +++ etc/s2s.xml.dist.in 2009-06-30 20:45:06 +0200 73 +++ etc/s2s.xml.dist.in 2012-08-27 13:45:50.771011934 +0200
79 @@ -60,25 +60,23 @@ 74 @@ -60,13 +60,13 @@
80 </router> 75 </router>
81 76
82 <!-- Log configuration - type is "syslog", "file" or "stdout" --> 77 <!-- Log configuration - type is "syslog", "file" or "stdout" -->
83 - <log type='syslog'> 78 - <log type='syslog'>
84 + <log type='file'> 79 + <log type='file'>
90 (local0 - local7) [default: local3] --> 85 (local0 - local7) [default: local3] -->
91 - <facility>local3</facility> 86 - <facility>local3</facility>
92 + <!-- <facility>local3</facility> --> 87 + <!-- <facility>local3</facility> -->
93 88
94 <!-- if logging to file, this is the filename of the logfile --> 89 <!-- if logging to file, this is the filename of the logfile -->
95 - <!-- 90 <!--
96 <file>@localstatedir@/jabberd/log/s2s.log</file> 91 @@ -83,7 +83,7 @@
97 - -->
98 </log>
99
100 <!-- Local network configuration -->
101 <local> 92 <local>
102 <!-- IP and port to listen for incoming s2s connections on 93 <!-- IP and port to listen for incoming s2s connections on
103 (default: 0.0.0.0, 5269) --> 94 (default: 0.0.0.0, 5269) -->
104 - <ip>0.0.0.0</ip> 95 - <ip>0.0.0.0</ip>
105 + <ip>127.0.0.1</ip> 96 + <ip>127.0.0.1</ip>
106 <port>5269</port> 97 <port>5269</port>
107 98
108 <!-- Multihomed machines (with more than one interface and IP address) 99 <!-- Multihomed machines (with more than one interface and IP address)
100 diff -Nau etc/sm.xml.dist.in.orig etc/sm.xml.dist.in
109 Index: etc/sm.xml.dist.in 101 Index: etc/sm.xml.dist.in
110 --- etc/sm.xml.dist.in.orig 2009-06-30 11:38:16 +0200 102 --- etc/sm.xml.dist.in.orig 2012-05-04 18:24:36.000000000 +0200
111 +++ etc/sm.xml.dist.in 2009-06-30 20:45:36 +0200 103 +++ etc/sm.xml.dist.in 2012-08-27 13:41:59.772838992 +0200
112 @@ -50,13 +50,13 @@ 104 @@ -50,13 +50,13 @@
113 </router> 105 </router>
114 106
115 <!-- Log configuration - type is "syslog", "file" or "stdout" --> 107 <!-- Log configuration - type is "syslog", "file" or "stdout" -->
116 - <log type='syslog'> 108 - <log type='syslog'>
124 - <facility>local3</facility> 116 - <facility>local3</facility>
125 + <!-- <facility>local3</facility> --> 117 + <!-- <facility>local3</facility> -->
126 118
127 <!-- If logging to file, this is the filename of the logfile --> 119 <!-- If logging to file, this is the filename of the logfile -->
128 <!-- 120 <!--
129 @@ -85,7 +85,7 @@ 121 @@ -90,7 +90,7 @@
130 <path>@pkglibdir@</path> 122 <path>@pkglibdir@</path>
131 123
132 <!-- By default, we use the SQLite driver for all storage --> 124 <!-- By default, we use the SQLite driver for all storage -->
133 - <driver>sqlite</driver> 125 - <driver>sqlite</driver>
134 + <driver>db</driver> 126 + <driver>db</driver>
135 127
136 <!-- Its also possible to explicitly list alternate drivers for 128 <!-- Its also possible to explicitly list alternate drivers for
137 specific data types. --> 129 specific data types. -->
130 diff -Nau sm/mod_iq_time.c.orig sm/mod_iq_time.c
138 Index: sm/mod_iq_time.c 131 Index: sm/mod_iq_time.c
139 --- sm/mod_iq_time.c.orig 2009-06-30 11:38:15 +0200 132 --- sm/mod_iq_time.c.orig 2011-10-22 21:56:00.000000000 +0200
140 +++ sm/mod_iq_time.c 2009-06-30 20:45:06 +0200 133 +++ sm/mod_iq_time.c 2012-08-27 13:41:59.773059371 +0200
141 @@ -39,6 +39,7 @@ 134 @@ -39,6 +39,7 @@
142 static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt) 135 static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt)
143 { 136 {
144 time_t t; 137 time_t t;
145 + time_t tzone; 138 + time_t tzone;
154 + tzone = (time_t)((long)mktime(gmtime(&t)) - (long)t); 147 + tzone = (time_t)((long)mktime(gmtime(&t)) - (long)t);
155 + snprintf(buf, 64, "%+03d:%02d", (int) -tzone/(60*60), (int) -tzone%(60*60)); 148 + snprintf(buf, 64, "%+03d:%02d", (int) -tzone/(60*60), (int) -tzone%(60*60));
156 #else 149 #else
157 snprintf(buf, 64, "%+03d:%02d", (int) tm->tm_gmtoff/(60*60), (int) tm->tm_gmtoff%(60*60)); 150 snprintf(buf, 64, "%+03d:%02d", (int) tm->tm_gmtoff/(60*60), (int) tm->tm_gmtoff%(60*60));
158 #endif 151 #endif
152 diff -Nau sm/mod_roster.c.orig sm/mod_roster.c
159 Index: sm/mod_roster.c 153 Index: sm/mod_roster.c
160 --- sm/mod_roster.c.orig 2009-06-30 11:38:15 +0200 154 --- sm/mod_roster.c.orig 2012-02-12 22:36:18.000000000 +0100
161 +++ sm/mod_roster.c 2009-06-30 20:45:06 +0200 155 +++ sm/mod_roster.c 2012-08-27 13:41:59.773438877 +0200
162 @@ -635,6 +635,9 @@ 156 @@ -717,6 +717,9 @@
163 if(user->sessions == NULL) 157 if(user->sessions == NULL)
164 return mod_PASS; 158 return mod_PASS;
165 159
166 + /* We have to free old packet - Lemming's memory leak fix */ 160 + /* We have to free old packet - Lemming's memory leak fix */
167 + pkt_free(pkt); 161 + pkt_free(pkt);
168 + 162 +
169 /* build a new packet to push out to everyone */ 163 /* build a new packet to push out to everyone */
170 pkt = pkt_create(user->sm, "iq", "set", NULL, NULL); 164 pkt = pkt_create(user->sm, "iq", "set", NULL, NULL);
171 pkt_id_new(pkt); 165 pkt_id_new(pkt);
166 diff -Nau util/util.h.orig util/util.h
172 Index: util/util.h 167 Index: util/util.h
173 --- util/util.h.orig 2009-06-30 11:38:16 +0200 168 --- util/util.h.orig 2012-08-22 08:03:58.000000000 +0200
174 +++ util/util.h 2009-06-30 20:45:06 +0200 169 +++ util/util.h 2012-08-27 13:41:59.773719964 +0200
175 @@ -30,6 +30,8 @@ 170 @@ -30,6 +30,8 @@
176 #include <time.h> 171 #include <time.h>
177 #include <errno.h> 172 #include <errno.h>
178 #include <assert.h> 173 #include <assert.h>
179 +#include <sys/types.h> 174 +#include <sys/types.h>

mercurial