aboutsummaryrefslogtreecommitdiff
path: root/src/inetd-bi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inetd-bi.c')
-rw-r--r--src/inetd-bi.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/inetd-bi.c b/src/inetd-bi.c
index 60e6fb5..30423de 100644
--- a/src/inetd-bi.c
+++ b/src/inetd-bi.c
@@ -21,7 +21,7 @@
/* Echo protocol, RFC 862 */
static void
-echo_stream (int fd)
+echo_stream (int fd, struct component const *comp)
{
int rc;
char buffer[INTBUFSIZE];
@@ -32,7 +32,7 @@ echo_stream (int fd)
}
static void
-echo_dg (int fd)
+echo_dg (int fd, struct component const *comp)
{
int rc;
char buffer[INTBUFSIZE];
@@ -47,7 +47,7 @@ echo_dg (int fd)
/* Discard protocol, RFC 863 */
static void
-discard_stream (int fd)
+discard_stream (int fd, struct component const *comp)
{
int rc;
char buffer[INTBUFSIZE];
@@ -62,7 +62,7 @@ discard_stream (int fd)
}
static void
-discard_dg (int fd)
+discard_dg (int fd, struct component const *comp)
{
char buffer[INTBUFSIZE];
read (fd, buffer, sizeof buffer);
@@ -90,14 +90,14 @@ time_since_1900 (void)
}
static void
-time_stream (int fd)
+time_stream (int fd, struct component const *comp)
{
unsigned long result = time_since_1900 ();
write (fd, (char *) &result, sizeof result);
}
static void
-time_dg (int fd)
+time_dg (int fd, struct component const *comp)
{
unsigned long result;
struct sockaddr sa;
@@ -111,7 +111,7 @@ time_dg (int fd)
/* Daytime Protocol, RFC 867 */
static void
-daytime_stream (int fd)
+daytime_stream (int fd, struct component const *comp)
{
char buffer[27];
time_t now;
@@ -122,7 +122,7 @@ daytime_stream (int fd)
}
static void
-daytime_dg (int fd)
+daytime_dg (int fd, struct component const *comp)
{
char buffer[27];
time_t now;
@@ -160,7 +160,7 @@ chargen_next_line (char *text)
}
static void
-chargen_stream (int fd)
+chargen_stream (int fd, struct component const *comp)
{
char text[LINESIZ + 2];
@@ -176,7 +176,7 @@ chargen_stream (int fd)
}
static void
-chargen_dg (int fd)
+chargen_dg (int fd, struct component const *comp)
{
struct sockaddr sa;
socklen_t size = sizeof sa;
@@ -247,7 +247,7 @@ qotd_read (char *text)
}
static void
-qotd_stream (int fd)
+qotd_stream (int fd, struct component const *comp)
{
char text[QOTD_MAX];
size_t len = qotd_read (text);
@@ -255,7 +255,7 @@ qotd_stream (int fd)
}
static void
-qotd_dg (int fd)
+qotd_dg (int fd, struct component const *comp)
{
char text[QOTD_MAX];
struct sockaddr sa;
@@ -306,7 +306,7 @@ tcpmux_help (struct component *comp, void *data)
{
int *pfd = data;
- if (comp->flags & (CF_TCPMUXPLUS | CF_TCPMUX))
+ if (!(comp->flags & CF_DISABLED) && ISCF_TCPMUX (comp->flags))
{
fd_write (*pfd, comp->service);
fd_write (*pfd, "\r\n");
@@ -315,11 +315,11 @@ tcpmux_help (struct component *comp, void *data)
}
static void
-tcpmux (int fd)
+tcpmux (int fd, struct component const *comp)
{
char service[MAX_SERV_LEN + 1];
size_t len;
- struct component *comp;
+ struct component *srv_comp;
/* Read service name */
if ((len = fd_getline (fd, service, MAX_SERV_LEN)) < 0)
@@ -337,17 +337,17 @@ tcpmux (int fd)
return;
}
- comp = progman_lookup_service (service);
- if (!comp)
+ srv_comp = progman_lookup_tcpmux (service, comp->tag);
+ if (!srv_comp)
{
fd_write (fd, "-Service not available\r\n");
return;
}
- if (comp->flags & CF_TCPMUXPLUS)
+ if (srv_comp->flags & CF_TCPMUXPLUS)
fd_write (fd, "+Go\r\n");
- progman_run_comp (comp, fd);
+ progman_run_comp (srv_comp, fd);
}

Return to:

Send suggestions and report system problems to the System administrator.