aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2013-06-06 11:32:52 +0200
committerChristophe Romain <christophe.romain@process-one.net>2013-06-06 11:32:52 +0200
commit58e769d68f691fe1171667523aad5c90382865b8 (patch)
treea31a2f940f9d240e2955ee81222ef754cf7fba2f /src
parentaccess_createnode acl also applies to auto created nodes ported to pubsub_odbc (diff)
fix getting ServerHost from Host due to binary portage (EJAB-1638)
Diffstat (limited to 'src')
-rw-r--r--src/mod_pubsub/mod_pubsub_odbc.erl7
-rw-r--r--src/mod_pubsub/pubsub_odbc.patch11
2 files changed, 8 insertions, 10 deletions
diff --git a/src/mod_pubsub/mod_pubsub_odbc.erl b/src/mod_pubsub/mod_pubsub_odbc.erl
index d803395d0..51b411dc0 100644
--- a/src/mod_pubsub/mod_pubsub_odbc.erl
+++ b/src/mod_pubsub/mod_pubsub_odbc.erl
@@ -4872,10 +4872,9 @@ transaction_retry(Host, Fun, Trans, Count) ->
{error, ?ERR_INTERNAL_SERVER_ERROR}
end.
-odbc_conn({_U, Host, _R})->
- Host;
-odbc_conn(Host) ->
- lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".".
+odbc_conn({_U, Host, _R})-> Host;
+odbc_conn(<<$., Host/binary>>) -> Host;
+odbc_conn(<<_, Host/binary>>) -> odbc_conn(Host).
%% escape value for database storage
escape({_U, _H, _R}=JID)->
diff --git a/src/mod_pubsub/pubsub_odbc.patch b/src/mod_pubsub/pubsub_odbc.patch
index d6385dce7..fdde477c0 100644
--- a/src/mod_pubsub/pubsub_odbc.patch
+++ b/src/mod_pubsub/pubsub_odbc.patch
@@ -1,5 +1,5 @@
--- mod_pubsub.erl 2013-06-06 11:08:12.333599362 +0200
-+++ mod_pubsub_odbc.erl 2013-06-06 11:09:59.073591158 +0200
++++ mod_pubsub_odbc.erl 2013-06-06 11:31:06.640173557 +0200
@@ -43,7 +43,7 @@
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
%%% XEP-0060 section 12.18.
@@ -1179,14 +1179,13 @@
{'EXIT', Reason} ->
?ERROR_MSG("transaction return internal error: ~p~n",
[{'EXIT', Reason}]),
-@@ -5213,6 +4872,17 @@
+@@ -5213,6 +4872,16 @@
{error, ?ERR_INTERNAL_SERVER_ERROR}
end.
-+odbc_conn({_U, Host, _R})->
-+ Host;
-+odbc_conn(Host) ->
-+ lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".".
++odbc_conn({_U, Host, _R})-> Host;
++odbc_conn(<<$., Host/binary>>) -> Host;
++odbc_conn(<<_, Host/binary>>) -> odbc_conn(Host).
+
+%% escape value for database storage
+escape({_U, _H, _R}=JID)->