mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Implement Simon's suggestion of moving DEFAULT_PROTOCOL into a per-backend-
link-module const variable `be_default_protocol' which suggests a sensible default to the front end (which can ignore it). (DEFAULT_PORT is replaced by a lookup in the backend[] table.) Still not pretty, but it does mean that the recent fix for `ssh-default' doesn't break PuTTYtel. [originally from svn r2613]
This commit is contained in:
15
mac/mac.c
15
mac/mac.c
@ -1,4 +1,4 @@
|
||||
/* $Id: mac.c,v 1.29 2003/01/14 19:42:00 ben Exp $ */
|
||||
/* $Id: mac.c,v 1.30 2003/01/15 20:47:50 jacob Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1999 Ben Harris
|
||||
* All rights reserved.
|
||||
@ -200,8 +200,17 @@ static void mac_startup(void) {
|
||||
windows.about = NULL;
|
||||
windows.licence = NULL;
|
||||
|
||||
default_protocol = DEFAULT_PROTOCOL;
|
||||
default_port = DEFAULT_PORT;
|
||||
default_protocol = be_default_protocol;
|
||||
/* Find the appropriate default port. */
|
||||
{
|
||||
default_port = 0; /* illegal */
|
||||
int i;
|
||||
for (i = 0; backends[i].backend != NULL; i++)
|
||||
if (backends[i].protocol == default_protocol) {
|
||||
default_port = backends[i].backend->default_port;
|
||||
break;
|
||||
}
|
||||
}
|
||||
flags = FLAG_INTERACTIVE;
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user