1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00
Commit Graph

1521 Commits

Author SHA1 Message Date
Simon Tatham
527c081a2e Oops - put the right `void *' in back->reconfig.
[originally from svn r2579]
2003-01-13 18:03:55 +00:00
Owen Dunn
011542a9d5 Make ^/ do the same as ^_ (wish control-slash)
[originally from svn r2576]
2003-01-13 15:06:56 +00:00
Ben Harris
0e52f05217 Set the window title to the canonical host name when we connect.
[originally from svn r2574]
2003-01-12 16:25:58 +00:00
Ben Harris
b4d37df579 Consequences of Simon's recent deglobalisation changes.
[originally from svn r2573]
2003-01-12 16:11:27 +00:00
Ben Harris
6fbf5d8540 When receiving data, only pass up to the backend as much as we received.
[originally from svn r2572]
2003-01-12 15:46:33 +00:00
Simon Tatham
4ec4de4f8b Ahem. Doing loads of stuff to inst->cfg would probably be best done
_after_ allocating inst. Oops.

[originally from svn r2571]
2003-01-12 15:45:29 +00:00
Ben Harris
282aee7545 Make this compile again.
[originally from svn r2570]
2003-01-12 15:42:24 +00:00
Simon Tatham
d119b784f8 Ahem. Global replace of cfg' with inst->cfg' is all very well, but
let's try to make sure it doesn't happen inside any strings! The
-cfg option for cursor foreground colour nearly had a nasty accident
there.

[originally from svn r2569]
2003-01-12 15:36:05 +00:00
Simon Tatham
6af1a9e4e9 Having laid all the groundwork, we can now remove the global `cfg'
completely from putty.h. It's now static in each of the command-line
front ends, shared only between window.c and windlg.c in PuTTY
proper (I've tested this by doing #define cfg cfgsillyname in those
two files only, and it still links so nobody else is using that
symbol!), and part of the `inst' structure in pterm. I think that
only leaves the Unicode module as the last stubborn holdout in the
anti-global-variables campaign.

[originally from svn r2568]
2003-01-12 15:32:31 +00:00
Simon Tatham
952857fca3 proxy.c now no longer refers to `cfg'. Instead, each of the three
proxy-indirection network functions (name_lookup, new_connection,
new_listener) takes a `const Config *' as an argument, and extracts
enough information from it before returning to handle that
particular network operation in accordance with the proxy settings
it specifies. This involved {win,ux}net.c due to a `const'
repercussion.

[originally from svn r2567]
2003-01-12 15:26:10 +00:00
Simon Tatham
2d469ba497 The logging module now contains a local copy of cfg too.
[originally from svn r2566]
2003-01-12 15:10:27 +00:00
Simon Tatham
ac2367bc72 The Unicode module no longer depends on `cfg', since it gets the
relevant bits of it passed in to init_ucs(). (Actually I pass in all
of it in the Windows version, since it's a bit hairy in there.)

[originally from svn r2565]
2003-01-12 14:59:54 +00:00
Simon Tatham
5ecbac2441 There's no real need for portfwd.c to reference `cfg' directly, when
it only needs one item from it and that can easily be passed in from
the call site in ssh.c.

[originally from svn r2564]
2003-01-12 14:56:19 +00:00
Simon Tatham
6a2c0436de printer_start_job shouldn't need to refer to cfg.printer, since it's
getting the printer name passed in anyway! Oops.

[originally from svn r2563]
2003-01-12 14:50:34 +00:00
Simon Tatham
520f716dec Just like under Windows, cleanup_exit() shouldn't need to check
before calling random_save_seed().

[originally from svn r2562]
2003-01-12 14:49:44 +00:00
Simon Tatham
f49c8c5a07 The back ends now contain their own copies of the Config structure,
and have a function to pass in a new one. (Well, actually several
back ends don't actually bother to do this because they need nothing
out of Config after the initial setup phase, but they could if they
wanted to.)

[originally from svn r2561]
2003-01-12 14:48:29 +00:00
Ben Harris
cf2bcad348 Call ot_poll as appropriate.
Also use cleanup_exit() in preference to exit() so that MacTCP gets shut down
even on unclean exits.

[originally from svn r2560]
2003-01-12 14:45:33 +00:00
Ben Harris
80c29aa16f Don't fatalbox() unconditionally when opening a connection, since that makes
it a little difficult to do anything.

[originally from svn r2559]
2003-01-12 14:44:12 +00:00
Simon Tatham
f35cbdce44 Forgot to match the cmdline changes in the Unix port.
[originally from svn r2558]
2003-01-12 14:37:26 +00:00
Simon Tatham
10eb26a7dd term->cfg is now a full copy of the Config structure, not a pointer;
and term_reconfig() now passes in a new structure which is copied
over the top. This means that the old and new structures can be
compared, and the _current_ as well as default states of auto wrap
mode, DEC origin mode, BCE, blinking text and character classes can
be conveniently reconfigured in mid-session without requiring a
terminal reset.

[originally from svn r2557]
2003-01-12 14:30:02 +00:00
Ben Harris
c81fa2ff24 COmpiling _before_ committing is usually a good idea.
[originally from svn r2556]
2003-01-12 14:23:00 +00:00
Simon Tatham
5738dc219b The command-line routines now take a pointer to `cfg' as an
argument, so they don't depend on it being a global any more.

[originally from svn r2555]
2003-01-12 14:17:03 +00:00
Simon Tatham
fee1624c69 Support for XDM-AUTHORIZATION-1 at the SSH server end, making use of
the remote IP/port data provided by the server for forwarded
connections. Disabled by default, since it's incompatible with SSH2,
probably incompatible with some X clients, and tickles a bug in
at least one version of OpenSSH.

[originally from svn r2554]
2003-01-12 14:11:38 +00:00
Ben Harris
05ae857752 Correct code to insert into a doubly-linked list.
[originally from svn r2553]
2003-01-12 13:50:04 +00:00
Simon Tatham
1b5cb7adf6 Each platform's implementation of askappend() is no longer required
to consult cfg.logxfovr, because it gets done once in logging.c.
askappend() is now called only when a question _really_ needs to be
asked of the user. Also in this checkin, cleanup_exit() in console.c
no longer consults cfg.protocol to decide whether to save the random
seed, because random_save_seed() can make that decision for itself
and do it better.

[originally from svn r2552]
2003-01-12 13:44:35 +00:00
Ben Harris
eaff09160a Cute though DNSAddresses are, they're a poor match for the model the
rest of PuTTY has of DNS resolution, so I've replaced them with something
more conventional.  Sorry.

The new code has the advantage of working, of course.

[originally from svn r2551]
2003-01-12 13:06:59 +00:00
Ben Harris
f3eff8b5de Use memset() rather than OTMemzero(), and hence remove the need to weak link
against OTUtilityLib.

[originally from svn r2550]
2003-01-12 01:37:24 +00:00
Ben Harris
5d90fd4d1d Remove code for splatting test data into new terminals, since we can do
that over real network connections now.

[originally from svn r2549]
2003-01-12 01:25:34 +00:00
Ben Harris
139271a71a Change error handling to store the error number rather than the string,
and to convert to a string only on demand.  This makes it possible to have
the string contain the error number if we don't recognise it.

[originally from svn r2548]
2003-01-12 01:24:03 +00:00
Ben Harris
f9300b0011 Initial import of Owen's OpenTransport interface. It doesn't work yet, but
it does compile and link.

[originally from svn r2547]
2003-01-11 23:33:57 +00:00
Ben Harris
4818639014 Add an indirection layer between mtcpnet.c and the rest of PuTTY so that
we can have runtime switching between MacTCP and OpenTransport, and so
that we can cope if there's no TCP/IP stack available at all (albeit with
very little functionality at present).

[originally from svn r2546]
2003-01-11 19:43:59 +00:00
Ben Harris
2506a26ab4 Calling plug_closing() is highly likely to result in a call to sk_close(),
so arrange that mactcp_poll() can cope with that and not access freed memory
when it happens.

[originally from svn r2545]
2003-01-11 17:36:24 +00:00
Ben Harris
cd79a89c11 When polling MacTCP connections, check the connection state and if the far
end has sent a FIN pass that up to the plug.
TODO: handle less graceful connection closures.

[originally from svn r2544]
2003-01-11 17:31:59 +00:00
Ben Harris
3aec19fa72 Move the prototype for platform_get_x11_auth() from x11fwd.c to ssh.h so that
it can be checked against the implementation.

[originally from svn r2542]
2003-01-11 14:20:00 +00:00
Ben Harris
8adae8f2ff Add a cast for a char * vs unsigned char * conflict.
[originally from svn r2541]
2003-01-11 14:08:46 +00:00
Ben Harris
0ea918fb3a const fallout from Simon's X forwarding changes.
[originally from svn r2540]
2003-01-11 14:08:07 +00:00
Simon Tatham
ee54789b25 Yet _another_ `received data for nonexistent channel' bug. This time
it was because we received WINDOW_ADJUST on a channel we'd already
sent CLOSE on, and reflexively attempted to continue sending the
buffered data in response. Should now be fixed.

[originally from svn r2539]
2003-01-11 10:05:29 +00:00
Simon Tatham
fda9983243 Hack around an oddity in X display names and xauth.
[originally from svn r2538]
2003-01-11 09:46:50 +00:00
Simon Tatham
87f9446a26 Support XDM-AUTHORIZATION-1 for connecting to local X servers. If
we're going to be a security program, we can at least make a token
effort to use the most secure local X auth available! And I'm still
half-tempted to see if I can support it for remote X servers too...

[originally from svn r2537]
2003-01-11 09:31:54 +00:00
Simon Tatham
86977efa81 Introduce framework for authenticating with the local X server.
Windows and Mac backends have acquired auth-finding functions which
do nothing; Unix backend has acquired one which actually works, so
Plink can now do X forwarding believably.
(This checkin stretches into some unlikely parts of the code because
there have been one or two knock-on effects involving `const'. Bah.)

[originally from svn r2536]
2003-01-10 18:33:35 +00:00
Ben Harris
2e8b94c8d4 Ask for a meaningful subject line on messages.
[originally from svn r2532]
2003-01-10 15:23:01 +00:00
Ben Harris
0d8ee2458a Implement get_window_title().
[originally from svn r2525]
2003-01-09 23:29:22 +00:00
Ben Harris
c342678579 Forcibly close any TCP connections that are still open when PuTTY exits.
This saves leaving them lying around to crash the machine later.

[originally from svn r2524]
2003-01-09 23:04:34 +00:00
Ben Harris
34a96d4924 Use c2pstrcpy() rather than silly sprintf() tricks.
[originally from svn r2523]
2003-01-09 22:51:41 +00:00
Ben Harris
76a43ad512 c2pstr() is deprecated. Use c2pstrcpy() instead.
[originally from svn r2522]
2003-01-09 22:45:48 +00:00
Ben Harris
79cbd905e7 Take advantage of having control over the default font to do the job properly:
ask the system script what it's preferred monospaced font is, and use that
if possible.  Failing, that, try the Roman script system, and if that fails,
fall back to Monaco 9.

[originally from svn r2521]
2003-01-09 22:39:47 +00:00
Ben Harris
627566b1f6 Set PuTTY's canBackground flag so that it receives CPU time (to process
incoming data) while in the background.

[originally from svn r2520]
2003-01-09 19:27:29 +00:00
Ben Harris
f11987f988 Install a notification procedure (ASR) on each TCP connection that wakes
PuTTY up when something happens.  This should allow it to receive data without
having to poll for it continuously.

[originally from svn r2519]
2003-01-09 19:26:39 +00:00
Simon Tatham
1604a192fe Remove the diagnostic added in rev 1.42 [r2288]; apparently it's all
true and WinSock _does_ occasionally send us netevent messages with
no socket for no reason. Ignore them when they appear.

[originally from svn r2518]
[r2288 == 3bb2e4568c]
2003-01-09 19:26:12 +00:00
Ben Harris
cdec9c7870 Switching from -opt space to -opt time on 68K Macs only loses us about 2K
of disc space, and we need all the speed we can get, so do that.

[originally from svn r2517]
2003-01-09 19:24:02 +00:00