aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2019-06-12 11:59:22 +0200
committerHans Bolinder <[email protected]>2019-08-20 09:33:26 +0200
commitfcb69bc48b69fd73f0838309652a176c56d61f8f (patch)
tree0e044b38fd79b034587b1c411348ac3a24c07263
parent6987b6fcea8e3627382cb498ab888dde95726f19 (diff)
downloadotp-fcb69bc48b69fd73f0838309652a176c56d61f8f.tar.gz
otp-fcb69bc48b69fd73f0838309652a176c56d61f8f.tar.bz2
otp-fcb69bc48b69fd73f0838309652a176c56d61f8f.zip
snmp: Update old format I/O-request
-rw-r--r--lib/snmp/src/compile/snmpc_misc.erl5
-rw-r--r--lib/snmp/src/misc/snmp_conf.erl3
-rw-r--r--lib/snmp/src/misc/snmp_config.erl3
3 files changed, 7 insertions, 4 deletions
diff --git a/lib/snmp/src/compile/snmpc_misc.erl b/lib/snmp/src/compile/snmpc_misc.erl
index 312074f2e7..d0fee418e1 100644
--- a/lib/snmp/src/compile/snmpc_misc.erl
+++ b/lib/snmp/src/compile/snmpc_misc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2016. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2019. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -156,7 +156,8 @@ loop(Fd, Res, Func, StartLine, File) ->
%% io:read modified to give us line numbers.
%%-----------------------------------------------------------------
read(Io, Prompt, StartLine) ->
- case io:request(Io, {get_until, Prompt, erl_scan, tokens, [StartLine]}) of
+ Enc = latin1,
+ case io:request(Io, {get_until, Enc, Prompt, erl_scan, tokens, [StartLine]}) of
{ok, Toks, EndLine} ->
case erl_parse:parse_term(Toks) of
{ok, Term} ->
diff --git a/lib/snmp/src/misc/snmp_conf.erl b/lib/snmp/src/misc/snmp_conf.erl
index d73291764d..e8a541f490 100644
--- a/lib/snmp/src/misc/snmp_conf.erl
+++ b/lib/snmp/src/misc/snmp_conf.erl
@@ -257,7 +257,8 @@ open_file(File) ->
end.
do_read(Io, Prompt, StartLine) ->
- case io:request(Io, {get_until,Prompt,erl_scan,tokens,[StartLine]}) of
+ Enc = latin1,
+ case io:request(Io, {get_until,Enc,Prompt,erl_scan,tokens,[StartLine]}) of
{ok, Toks, EndLine} ->
case erl_parse:parse_term(Toks) of
{ok, Term} ->
diff --git a/lib/snmp/src/misc/snmp_config.erl b/lib/snmp/src/misc/snmp_config.erl
index 26e85897f4..da2c1721f9 100644
--- a/lib/snmp/src/misc/snmp_config.erl
+++ b/lib/snmp/src/misc/snmp_config.erl
@@ -2738,7 +2738,8 @@ read_lines(Fd, Acc, StartLine) ->
end.
read_and_parse_term(Fd, StartLine) ->
- case io:request(Fd, {get_until, "", erl_scan, tokens, [StartLine]}) of
+ Enc = latin1,
+ case io:request(Fd, {get_until, Enc, "", erl_scan, tokens, [StartLine]}) of
{ok, Tokens, EndLine} ->
case erl_parse:parse_term(Tokens) of
{ok, Term} ->