mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-12 21:52:07 +02:00
Support for arguments in ejabberdctl that are empty strings.
SVN Revision: 2827
This commit is contained in:
parent
71142e336d
commit
34d5d08501
|
@ -318,18 +318,19 @@ format_args(Args, ArgsFormat) ->
|
||||||
[],
|
[],
|
||||||
lists:zip(ArgsFormat, Args)).
|
lists:zip(ArgsFormat, Args)).
|
||||||
|
|
||||||
format_arg(Arg, Format) ->
|
format_arg(Arg, integer) ->
|
||||||
Parse = case Format of
|
format_arg2(Arg, "~d");
|
||||||
integer ->
|
format_arg("", string) ->
|
||||||
"~d";
|
"";
|
||||||
string ->
|
format_arg(Arg, string) ->
|
||||||
NumChars = integer_to_list(string:len(Arg)),
|
NumChars = integer_to_list(string:len(Arg)),
|
||||||
"~" ++ NumChars ++ "c"
|
Parse = "~" ++ NumChars ++ "c",
|
||||||
end,
|
format_arg2(Arg, Parse).
|
||||||
|
|
||||||
|
format_arg2(Arg, Parse)->
|
||||||
{ok, [Arg2], _RemainingArguments} = io_lib:fread(Parse, Arg),
|
{ok, [Arg2], _RemainingArguments} = io_lib:fread(Parse, Arg),
|
||||||
Arg2.
|
Arg2.
|
||||||
|
|
||||||
|
|
||||||
%%-----------------------------
|
%%-----------------------------
|
||||||
%% Format result
|
%% Format result
|
||||||
%%-----------------------------
|
%%-----------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user