mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
fix getting ServerHost from Host due to binary portage (EJAB-1638)
This commit is contained in:
parent
c8cba04f05
commit
58e769d68f
@ -4872,10 +4872,9 @@ transaction_retry(Host, Fun, Trans, Count) ->
|
|||||||
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
odbc_conn({_U, Host, _R})->
|
odbc_conn({_U, Host, _R})-> Host;
|
||||||
Host;
|
odbc_conn(<<$., Host/binary>>) -> Host;
|
||||||
odbc_conn(Host) ->
|
odbc_conn(<<_, Host/binary>>) -> odbc_conn(Host).
|
||||||
lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".".
|
|
||||||
|
|
||||||
%% escape value for database storage
|
%% escape value for database storage
|
||||||
escape({_U, _H, _R}=JID)->
|
escape({_U, _H, _R}=JID)->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--- mod_pubsub.erl 2013-06-06 11:08:12.333599362 +0200
|
--- 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 @@
|
@@ -43,7 +43,7 @@
|
||||||
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
|
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
|
||||||
%%% XEP-0060 section 12.18.
|
%%% XEP-0060 section 12.18.
|
||||||
@ -1179,14 +1179,13 @@
|
|||||||
{'EXIT', Reason} ->
|
{'EXIT', Reason} ->
|
||||||
?ERROR_MSG("transaction return internal error: ~p~n",
|
?ERROR_MSG("transaction return internal error: ~p~n",
|
||||||
[{'EXIT', Reason}]),
|
[{'EXIT', Reason}]),
|
||||||
@@ -5213,6 +4872,17 @@
|
@@ -5213,6 +4872,16 @@
|
||||||
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
+odbc_conn({_U, Host, _R})->
|
+odbc_conn({_U, Host, _R})-> Host;
|
||||||
+ Host;
|
+odbc_conn(<<$., Host/binary>>) -> Host;
|
||||||
+odbc_conn(Host) ->
|
+odbc_conn(<<_, Host/binary>>) -> odbc_conn(Host).
|
||||||
+ lists:dropwhile(fun(A) -> A/=$. end, Host) -- ".".
|
|
||||||
+
|
+
|
||||||
+%% escape value for database storage
|
+%% escape value for database storage
|
||||||
+escape({_U, _H, _R}=JID)->
|
+escape({_U, _H, _R}=JID)->
|
||||||
|
Loading…
Reference in New Issue
Block a user