Accept "yes" or "true" in wsf launcher option boolean values.

Set socket_error when network occurs in `read_to_managed_pointer_noexception`.
This commit is contained in:
2016-10-14 13:10:44 +02:00
parent d4ec640ac8
commit 1161e541fa
3 changed files with 8 additions and 2 deletions

View File

@@ -37,7 +37,9 @@ feature -- Input
-- No exception raised!
do
read_to_managed_pointer_noexception (socket_buffer, 0, character_8_bytes)
if bytes_read /= character_8_bytes then
if was_error then
-- Socket error already set.
elseif bytes_read /= character_8_bytes then
socket_error := "Peer closed connection"
else
last_character := socket_buffer.read_character (0)
@@ -145,6 +147,8 @@ feature {NONE} -- Input
l_last_read := c_read_stream_noexception (descriptor, nb_bytes - l_read, p + start_pos + l_read)
if l_last_read >= 0 then
l_read := l_read + l_last_read
else
socket_error := "Network error!"
end
end
bytes_read := l_read

View File

@@ -134,6 +134,8 @@ feature {NONE} -- Input
l_last_read := l_ssl.read (p + start_pos + l_read, nb_bytes - l_read)
if l_last_read >= 0 then
l_read := l_read + l_last_read
else
socket_error := "Secure network error!"
end
end
bytes_read := l_read

View File

@@ -163,7 +163,7 @@ feature -- Helpers
Result := b
else
s := opt.out
Result := s.is_case_insensitive_equal ("true")
Result := s.is_case_insensitive_equal ("true") or s.is_case_insensitive_equal ("yes")
end
end
end