1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/unix
Simon Tatham 0fe41294e6 New API for plug_closing() with a custom type enum.
Passing an operating-system-specific error code to plug_closing(),
such as errno or GetLastError(), was always a bit weird, given that it
generally had to be handled by cross-platform receiving code in
backends. I had the platform.h implementations #define any error
values that the cross-platform code would have to handle specially,
but that's still not a great system, because it also doesn't leave
freedom to invent error representations of my own that don't
correspond to any OS code. (For example, the ones I just removed from
proxy.h.)

So now, the OS error code is gone from the plug_closing API, and in
its place is a custom enumeration of closure types: normal, error, and
the special case BROKEN_PIPE which is the only OS error code we have
so far needed to handle specially. (All others just mean 'abandon the
connection and print the textual message'.)

Having already centralised the handling of OS error codes in the
previous commit, we've now got a convenient place to add any further
type codes for errors needing special handling: each of Unix
plug_closing_errno(), Windows plug_closing_system_error(), and Windows
plug_closing_winsock_error() can easily grow extra special cases if
need be, and each one will only have to live in one place.
2021-11-06 14:48:26 +00:00
..
utils Break up gtkmisc.c. 2021-04-26 18:00:01 +01:00
agent-client.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
agent-socket.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
askpass.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
cliloop.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
CMakeLists.txt Move proxy-related source files into a subdirectory. 2021-10-30 17:29:24 +01:00
columns.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
columns.h Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
config-gtk.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
config-unix.c Initial support for in-process proxy SSH connections. 2021-05-22 14:13:52 +01:00
console.c Reorganise host key checking and confirmation. 2021-10-25 18:12:17 +01:00
dialog.c Reorganise host key checking and confirmation. 2021-10-25 18:12:17 +01:00
fd-socket.c Convenience wrappers on plug_closing(). 2021-11-06 14:48:26 +00:00
gss.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
gtk-common.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
gtkcompat.h gtkcompat.h: fix GTK1 implementation of ref_sink. 2019-11-02 08:26:14 +00:00
gtkmisc.h Convert a lot of 'int' variables to 'bool'. 2018-11-03 13:45:00 +00:00
keygen-noise.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
local-proxy.c Move proxy-related source files into a subdirectory. 2021-10-30 17:29:24 +01:00
main-gtk-application.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
main-gtk-simple.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
network.c New API for plug_closing() with a custom type enum. 2021-11-06 14:48:26 +00:00
no-gtk.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
noise.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
osxlaunch.c osxlaunch: stop setting DYLD_LIBRARY_PATH. 2017-12-20 10:04:02 +00:00
pageant.c New API for plug_closing() with a custom type enum. 2021-11-06 14:48:26 +00:00
peerinfo.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
platform.h Convenience wrappers on plug_closing(). 2021-11-06 14:48:26 +00:00
plink.c Split seat_banner from seat_output. 2021-10-30 17:37:09 +01:00
printing.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
procnet.c Add a /proc/net magic authenticator. 2019-03-31 10:35:10 +01:00
psocks.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
psusan.c New API for plug_closing() with a custom type enum. 2021-11-06 14:48:26 +00:00
pterm-config-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm.bundle OS X makefile: stop depending on JHBUILD_PREFIX. 2017-11-26 11:45:48 +00:00
pterm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm.plist Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
pty.c Add memsets after allocation of all Backend implementors. 2021-10-30 17:28:28 +01:00
putty-config-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
putty-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
putty.bundle OS X makefile: stop depending on JHBUILD_PREFIX. 2017-11-26 11:45:48 +00:00
putty.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
putty.plist Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
serial.c Add memsets after allocation of all Backend implementors. 2021-10-30 17:28:28 +01:00
sftp.c Complete rework of terminal userpass input system. 2021-09-14 13:19:33 +01:00
sftpserver.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
sharing.c Pass an Interactor to new_connection(). 2021-10-30 18:19:56 +01:00
storage.c Reorganise host key checking and confirmation. 2021-10-25 18:12:17 +01:00
unicode.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
unifont.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
unifont.h Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
uppity.c New API for plug_closing() with a custom type enum. 2021-11-06 14:48:26 +00:00
uxsel.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
window.c Split seat_banner from seat_output. 2021-10-30 17:37:09 +01:00
x11.c Unix platform_make_x11_server: fix sense of error check. 2021-09-10 10:38:30 +01:00
x11misc.h Basic support for running under GDK Wayland back end. 2018-05-09 09:21:27 +01:00