/*
- * $Id: comm.cc,v 1.164 1997/06/18 00:19:52 wessels Exp $
+ * $Id: comm.cc,v 1.165 1997/06/18 01:43:42 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
int fd2;
if (++cs->tries == 4)
return 0;
+ if (!cbdataValid(cs->data))
+ return 0;
fd2 = socket(AF_INET, SOCK_STREAM, 0);
if (fd2 < 0) {
debug(5, 0) ("commRetryConnect: socket: %s\n", xstrerror());
/*
- * $Id: ftp.cc,v 1.122 1997/06/16 22:01:45 wessels Exp $
+ * $Id: ftp.cc,v 1.123 1997/06/18 01:43:42 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
safe_free(ftpState->ctrl.last_message);
safe_free(ftpState->title_url);
safe_free(ftpState->filepath);
- xfree(ftpState);
+ cbdataFree(ftpState);
}
static void
FtpStateData *ftpState = xcalloc(1, sizeof(FtpStateData));
char *response;
int fd;
+ cbdataAdd(ftpState);
debug(9, 3) ("FtpStart: '%s'\n", entry->url);
storeLockObject(entry);
ftpState->entry = entry;
/*
- * $Id: gopher.cc,v 1.84 1997/06/04 06:15:56 wessels Exp $
+ * $Id: gopher.cc,v 1.85 1997/06/18 01:43:43 wessels Exp $
*
* DEBUG: section 10 Gopher
* AUTHOR: Harvest Derived
storeUnlockObject(gopherState->entry);
}
put_free_4k_page(gopherState->buf);
- xfree(gopherState);
+ gopherState->buf = NULL;
+ cbdataFree(gopherState);
}
CreateGopherStateData(void)
{
GopherStateData *gd = xcalloc(1, sizeof(GopherStateData));
+ cbdataAdd(gd);
gd->buf = get_free_4k_page();
return (gd);
}
/*
- * $Id: http.cc,v 1.171 1997/06/18 00:19:53 wessels Exp $
+ * $Id: http.cc,v 1.172 1997/06/18 01:43:44 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
}
requestUnlink(httpState->request);
requestUnlink(httpState->orig_request);
- xfree(httpState);
+ httpState->request = NULL;
+ httpState->orig_request = NULL;
+ cbdataFree(httpState);
}
int
}
storeLockObject(entry);
httpState = xcalloc(1, sizeof(HttpStateData));
+ cbdataAdd(httpState);
httpState->entry = entry;
request = get_free_request_t();
httpState->request = requestLink(request);
}
storeLockObject(entry);
httpState = xcalloc(1, sizeof(HttpStateData));
+ cbdataAdd(httpState);
httpState->entry = entry;
httpState->request = requestLink(request);
httpState->fd = fd;
/*
- * $Id: ssl.cc,v 1.54 1997/06/04 06:16:09 wessels Exp $
+ * $Id: ssl.cc,v 1.55 1997/06/18 01:43:45 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
safe_free(sslState->client.buf);
xfree(sslState->url);
requestUnlink(sslState->request);
- safe_free(sslState);
+ sslState->request = NULL;
+ cbdataFree(sslState);
}
/* Read from server side and queue it for writing to the client */
return;
}
sslState = xcalloc(1, sizeof(SslStateData));
+ cbdataAdd(sslState);
sslState->url = xstrdup(url);
sslState->request = requestLink(request);
sslState->timeout = Config.Timeout.read;
/*
- * $Id: tunnel.cc,v 1.54 1997/06/04 06:16:09 wessels Exp $
+ * $Id: tunnel.cc,v 1.55 1997/06/18 01:43:45 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
safe_free(sslState->client.buf);
xfree(sslState->url);
requestUnlink(sslState->request);
- safe_free(sslState);
+ sslState->request = NULL;
+ cbdataFree(sslState);
}
/* Read from server side and queue it for writing to the client */
return;
}
sslState = xcalloc(1, sizeof(SslStateData));
+ cbdataAdd(sslState);
sslState->url = xstrdup(url);
sslState->request = requestLink(request);
sslState->timeout = Config.Timeout.read;
/*
- * $Id: wais.cc,v 1.76 1997/06/04 06:16:17 wessels Exp $
+ * $Id: wais.cc,v 1.77 1997/06/18 01:43:46 wessels Exp $
*
* DEBUG: section 24 WAIS Relay
* AUTHOR: Harvest Derived
return;
storeUnregisterAbort(waisState->entry);
storeUnlockObject(waisState->entry);
- xfree(waisState);
+ cbdataFree(waisState);
}
/* This will be called when socket lifetime is expired. */
return;
}
waisState = xcalloc(1, sizeof(WaisStateData));
+ cbdataAdd(waisState);
waisState->method = method;
waisState->relayhost = Config.Wais.relayHost;
waisState->relayport = Config.Wais.relayPort;