mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Removing one bug, and hunting another
[originally from svn r218]
This commit is contained in:
parent
30130ec730
commit
b73241d17c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: opentpt.c,v 1.1.2.3 1999/09/01 22:24:41 ben Exp $ */
|
/* $Id: opentpt.c,v 1.1.2.4 1999/09/07 23:41:32 ben Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Ben Harris
|
* Copyright (c) 1999 Ben Harris
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -30,6 +30,7 @@
|
|||||||
#include <OpenTransport.h>
|
#include <OpenTransport.h>
|
||||||
#include <OpenTptInternet.h>
|
#include <OpenTptInternet.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -107,8 +108,10 @@ static void *otpt_open(Session *sess, char const *host, int port) {
|
|||||||
TCall remote;
|
TCall remote;
|
||||||
DNSAddress *remoteaddr;
|
DNSAddress *remoteaddr;
|
||||||
|
|
||||||
|
assert(otpt_config != kOTInvalidConfigurationPtr);
|
||||||
s = smalloc(sizeof(*s));
|
s = smalloc(sizeof(*s));
|
||||||
memset(s, 0, sizeof(*s));
|
memset(s, 0, sizeof(*s));
|
||||||
|
s->sess = sess;
|
||||||
|
|
||||||
/* Get a TCP endpoint (equiv of socket()) */
|
/* Get a TCP endpoint (equiv of socket()) */
|
||||||
s->ep = OTOpenEndpoint(OTCloneConfiguration(otpt_config), 0, NULL, &err);
|
s->ep = OTOpenEndpoint(OTCloneConfiguration(otpt_config), 0, NULL, &err);
|
||||||
@ -265,6 +268,7 @@ static pascal void otpt_notifier(void *contextPtr, OTEventCode code,
|
|||||||
* -3199.
|
* -3199.
|
||||||
*/
|
*/
|
||||||
status = OTRcvDisconnect(s->ep, &discon);
|
status = OTRcvDisconnect(s->ep, &discon);
|
||||||
|
Debugger();
|
||||||
if (cookie == NULL) /* spontaneous disconnect */
|
if (cookie == NULL) /* spontaneous disconnect */
|
||||||
switch (E2OSStatus(discon.reason)) {
|
switch (E2OSStatus(discon.reason)) {
|
||||||
case kECONNRESETErr:
|
case kECONNRESETErr:
|
||||||
|
Loading…
Reference in New Issue
Block a user