/*
- * $Id: cache_cf.cc,v 1.264 1998/03/27 18:41:13 wessels Exp $
+ * $Id: cache_cf.cc,v 1.265 1998/03/28 05:26:08 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
int i;
ushortlist *u;
const char *me = null_string; /* XXX */
+ char *t;
p = xcalloc(1, sizeof(peer));
p->http_port = CACHE_HTTP_PORT;
p->icp_port = CACHE_ICP_PORT;
p->type = parseNeighborType(token);
GetInteger(i);
p->http_port = (u_short) i;
- GetInteger(i);
- p->icp_port = (u_short) i;
+ if ((token = strtok(NULL, w_space)) == NULL)
+ self_destruct();
+ if (NULL == (t = strchr(token, '/')))
+ p->icp_port = atoi(token);
+ else if (0 == strcmp(t, "/icp"))
+ p->icp_port = atoi(token);
+ else if (0 == strcmp(t, "/htcp"))
+ p->htcp_port = atoi(token);
+ else
+ self_destruct();
if (strcmp(p->host, me) == 0) {
for (u = Config.Port.http; u; u = u->next) {
if (p->http_port != u->i)