jabberd.patch 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. Index: configure
  2. --- configure.orig 2007-09-23 16:18:12 +0200
  3. +++ configure 2007-09-24 08:00:08 +0200
  4. @@ -30157,7 +30157,7 @@
  5. fi
  6. if test "x-$enable_mysql" = "x-yes" ; then
  7. - for i in /usr /usr/local /usr/local/mysql ; do
  8. + for i in /openpkg-dev ; do
  9. for j in include include/mysql "" ; do
  10. if test -r "$i/$j/mysql.h" ; then
  11. MYSQL_INCLUDE=$i/$j
  12. @@ -30175,7 +30175,7 @@
  13. echo $ECHO_N "(cached) $ECHO_C" >&6
  14. else
  15. ac_check_lib_save_LIBS=$LIBS
  16. -LIBS="-lmysqlclient $LIBS"
  17. +LIBS="-L$MYSQL_LIBDIR -lmysqlclient $LIBS"
  18. cat >conftest.$ac_ext <<_ACEOF
  19. /* confdefs.h. */
  20. _ACEOF
  21. Index: etc/c2s.xml.dist.in
  22. --- etc/c2s.xml.dist.in.orig 2007-09-21 10:54:46 +0200
  23. +++ etc/c2s.xml.dist.in 2007-09-24 08:00:08 +0200
  24. @@ -51,18 +51,16 @@
  25. </router>
  26. <!-- Log configuration - type is "syslog", "file" or "stdout" -->
  27. - <log type='syslog'>
  28. + <log type='file'>
  29. <!-- If logging to syslog, this is the log ident -->
  30. - <ident>jabberd/c2s</ident>
  31. + <!-- <ident>jabberd/c2s</ident> -->
  32. <!-- If logging to syslog, this is the log facility
  33. (local0 - local7) [default: local3] -->
  34. - <facility>local3</facility>
  35. + <!-- <facility>local3</facility> -->
  36. <!-- If logging to file, this is the filename of the logfile -->
  37. - <!--
  38. <file>@localstatedir@/jabberd/log/c2s.log</file>
  39. - -->
  40. </log>
  41. <!-- Local network configuration -->
  42. @@ -129,7 +127,7 @@
  43. <id password-change='true' /> -->
  44. <!-- IP address to bind to (default: 0.0.0.0) -->
  45. - <ip>0.0.0.0</ip>
  46. + <ip>127.0.0.1</ip>
  47. <!-- Port to bind to, or 0 to disable unencrypted access to the
  48. server (default: 5222) -->
  49. @@ -282,7 +280,7 @@
  50. <path>@pkglibdir@</path>
  51. <!-- Backend module to use -->
  52. - <module>mysql</module>
  53. + <module>db</module>
  54. <!-- Available authentication mechanisms -->
  55. <mechanisms>
  56. Index: etc/resolver.xml.dist.in
  57. --- etc/resolver.xml.dist.in.orig 2007-04-09 16:19:52 +0200
  58. +++ etc/resolver.xml.dist.in 2007-09-24 08:00:08 +0200
  59. @@ -51,18 +51,16 @@
  60. </router>
  61. <!-- Log configuration - type is "syslog", "file" or "stdout" -->
  62. - <log type='syslog'>
  63. + <log type='file'>
  64. <!-- If logging to syslog, this is the log ident -->
  65. - <ident>jabberd/resolver</ident>
  66. + <!-- <ident>jabberd/resolver</ident> -->
  67. <!-- If logging to syslog, this is the log facility
  68. (local0 - local7) [default: local3] -->
  69. - <facility>local3</facility>
  70. + <!-- <facility>local3</facility> -->
  71. <!-- If logging to file, this is the filename of the logfile -->
  72. - <!--
  73. <file>@localstatedir@/jabberd/log/resolver.log</file>
  74. - -->
  75. </log>
  76. <!-- SRV records will be resolved in the following order. The first
  77. Index: etc/router.xml.dist.in
  78. --- etc/router.xml.dist.in.orig 2007-04-09 16:19:52 +0200
  79. +++ etc/router.xml.dist.in 2007-09-24 08:00:08 +0200
  80. @@ -9,24 +9,22 @@
  81. <pidfile>@localstatedir@/jabberd/pid/router.pid</pidfile>
  82. <!-- Log configuration - type is "syslog", "file" or "stdout" -->
  83. - <log type='syslog'>
  84. + <log type='file'>
  85. <!-- If logging to syslog, this is the log ident -->
  86. - <ident>jabberd/router</ident>
  87. + <!-- <ident>jabberd/router</ident> -->
  88. <!-- If logging to syslog, this is the log facility
  89. (local0 - local7) [default: local3] -->
  90. - <facility>local3</facility>
  91. + <!-- <facility>local3</facility> -->
  92. <!-- If logging to file, this is the filename of the logfile -->
  93. - <!--
  94. <file>@localstatedir@/jabberd/log/router.log</file>
  95. - -->
  96. </log>
  97. <!-- Local network configuration -->
  98. <local>
  99. <!-- IP address to bind to (default: 0.0.0.0) -->
  100. - <ip>0.0.0.0</ip>
  101. + <ip>127.0.0.1</ip>
  102. <!-- Port to bind to (default: 5347) -->
  103. <port>5347</port>
  104. Index: etc/s2s.xml.dist.in
  105. --- etc/s2s.xml.dist.in.orig 2007-08-31 02:24:28 +0200
  106. +++ etc/s2s.xml.dist.in 2007-09-24 08:00:08 +0200
  107. @@ -61,25 +61,23 @@
  108. </router>
  109. <!-- Log configuration - type is "syslog", "file" or "stdout" -->
  110. - <log type='syslog'>
  111. + <log type='file'>
  112. <!-- If logging to syslog, this is the log ident -->
  113. - <ident>jabberd/s2s</ident>
  114. + <!-- <ident>jabberd/s2s</ident> -->
  115. <!-- If logging to syslog, this is the log facility
  116. (local0 - local7) [default: local3] -->
  117. - <facility>local3</facility>
  118. + <!-- <facility>local3</facility> -->
  119. <!-- if logging to file, this is the filename of the logfile -->
  120. - <!--
  121. <file>@localstatedir@/jabberd/log/s2s.log</file>
  122. - -->
  123. </log>
  124. <!-- Local network configuration -->
  125. <local>
  126. <!-- IP and port to listen for incoming s2s connections on
  127. (default: 0.0.0.0, 5269) -->
  128. - <ip>0.0.0.0</ip>
  129. + <ip>127.0.0.1</ip>
  130. <port>5269</port>
  131. <!-- Helper DNS resolver component - if this component is not
  132. Index: etc/sm.xml.dist.in
  133. --- etc/sm.xml.dist.in.orig 2007-09-07 18:18:44 +0200
  134. +++ etc/sm.xml.dist.in 2007-09-24 08:00:08 +0200
  135. @@ -54,13 +54,13 @@
  136. </router>
  137. <!-- Log configuration - type is "syslog", "file" or "stdout" -->
  138. - <log type='syslog'>
  139. + <log type='file'>
  140. <!-- If logging to syslog, this is the log ident -->
  141. - <ident>jabberd/sm</ident>
  142. + <!-- <ident>jabberd/sm</ident> -->
  143. <!-- If logging to syslog, this is the log facility
  144. (local0 - local7) [default: local3] -->
  145. - <facility>local3</facility>
  146. + <!-- <facility>local3</facility> -->
  147. <!-- If logging to file, this is the filename of the logfile -->
  148. <!--
  149. @@ -74,7 +74,7 @@
  150. <path>@pkglibdir@</path>
  151. <!-- By default, we use the MySQL driver for all storage -->
  152. - <driver>mysql</driver>
  153. + <driver>db</driver>
  154. <!-- Its also possible to explicitly list alternate drivers for
  155. specific data types. -->
  156. Index: sm/mod_iq_time.c
  157. --- sm/mod_iq_time.c.orig 2007-09-05 17:05:29 +0200
  158. +++ sm/mod_iq_time.c 2007-09-24 08:08:40 +0200
  159. @@ -39,6 +39,7 @@
  160. static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt)
  161. {
  162. time_t t;
  163. + time_t tzone;
  164. struct tm *tm;
  165. char buf[64];
  166. char *c;
  167. @@ -78,7 +79,8 @@
  168. datetime_out(t, dt_DATETIME, buf, 64);
  169. nad_insert_elem(pkt->nad, 2, NAD_ENS(pkt->nad, 1), "utc", buf);
  170. - snprintf(buf, 64, "%+03d:%02d", (int) -timezone/(60*60), (int) -timezone%(60*60));
  171. + tzone = (time_t)((long)mktime(gmtime(&t)) - (long)t);
  172. + snprintf(buf, 64, "%+03d:%02d", (int) -tzone/(60*60), (int) -tzone%(60*60));
  173. nad_insert_elem(pkt->nad, 2, NAD_ENS(pkt->nad, 1), "tzo", buf);
  174. #ifdef ENABLE_SUPERSEDED
  175. Index: sm/mod_roster.c
  176. --- sm/mod_roster.c.orig 2007-09-05 11:35:42 +0200
  177. +++ sm/mod_roster.c 2007-09-24 08:00:08 +0200
  178. @@ -642,6 +642,9 @@
  179. if(user->sessions == NULL)
  180. return mod_PASS;
  181. + /* We have to free old packet - Lemming's memory leak fix */
  182. + pkt_free(pkt);
  183. +
  184. /* build a new packet to push out to everyone */
  185. pkt = pkt_create(user->sm, "iq", "set", NULL, NULL);
  186. pkt_id_new(pkt);
  187. Index: util/util.h
  188. --- util/util.h.orig 2007-09-21 02:33:08 +0200
  189. +++ util/util.h 2007-09-24 08:00:08 +0200
  190. @@ -30,6 +30,8 @@
  191. #include <time.h>
  192. #include <errno.h>
  193. #include <assert.h>
  194. +#include <sys/types.h>
  195. +#include <sys/socket.h>
  196. #include <expat.h>