mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
o In store_last_info/4, fix a bug where the status was not converted to
list before calling ejabberd_odbc:escape/1. o In get_last_info/2, fix a bug where the status was returned as a list instead of a binary. SVN Revision: 1690
This commit is contained in:
parent
0313adaec6
commit
7088ba88a9
@ -1,3 +1,11 @@
|
|||||||
|
2008-10-31 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||||
|
|
||||||
|
* src/mod_last_odbc.erl (store_last_info/4): Fix a bug where the
|
||||||
|
status was not converted to list before calling
|
||||||
|
ejabberd_odbc:escape/1.
|
||||||
|
(get_last_info/2): Fix a bug where the status was returned as a list
|
||||||
|
instead of a binary.
|
||||||
|
|
||||||
2008-10-20 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
2008-10-20 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||||
|
|
||||||
* src/mod_irc/mod_irc.erl, src/mod_irc/mod_irc_connection.erl: Convert
|
* src/mod_irc/mod_irc.erl, src/mod_irc/mod_irc_connection.erl: Convert
|
||||||
|
@ -135,7 +135,7 @@ store_last_info(User, Server, TimeStamp, Status) ->
|
|||||||
LServer = exmpp_stringprep:nameprep(Server),
|
LServer = exmpp_stringprep:nameprep(Server),
|
||||||
Username = ejabberd_odbc:escape(LUser),
|
Username = ejabberd_odbc:escape(LUser),
|
||||||
Seconds = ejabberd_odbc:escape(integer_to_list(TimeStamp)),
|
Seconds = ejabberd_odbc:escape(integer_to_list(TimeStamp)),
|
||||||
State = ejabberd_odbc:escape(Status),
|
State = ejabberd_odbc:escape(binary_to_list(Status)),
|
||||||
odbc_queries:set_last_t(LServer, Username, Seconds, State)
|
odbc_queries:set_last_t(LServer, Username, Seconds, State)
|
||||||
catch
|
catch
|
||||||
_ ->
|
_ ->
|
||||||
@ -151,7 +151,7 @@ get_last_info(LUser, LServer) ->
|
|||||||
{selected, ["seconds","state"], [{STimeStamp, Status}]} ->
|
{selected, ["seconds","state"], [{STimeStamp, Status}]} ->
|
||||||
case catch list_to_integer(STimeStamp) of
|
case catch list_to_integer(STimeStamp) of
|
||||||
TimeStamp when is_integer(TimeStamp) ->
|
TimeStamp when is_integer(TimeStamp) ->
|
||||||
{ok, TimeStamp, Status};
|
{ok, TimeStamp, list_to_binary(Status)};
|
||||||
_ ->
|
_ ->
|
||||||
not_found
|
not_found
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user