#
-# "$Id: Makefile,v 1.6 1999/04/16 20:47:46 mike Exp $"
+# "$Id: Makefile,v 1.7 1999/05/10 21:35:40 mike Exp $"
#
# Scheduler Makefile for the Common UNIX Printing System (CUPS).
#
include ../Makedefs
-#OPTIONS = -DDEBUG
OBJS = auth.o classes.o client.o conf.o dirsvc.o main.o ipp.o job.o \
printers.o
#
-# Make the scheduler executable, "cupsd".
+# Make everything...
#
-cupsd: $(OBJS) ../cups/libcups.a
- $(CC) $(LDFLAGS) -o cupsd $(OBJS) $(LIBS)
-
-$(OBJS): auth.h classes.h client.h conf.h cupsd.h dirsvc.h job.h \
- printers.h ../cups/cups.h ../cups/http.h ../cups/ipp.h \
- ../cups/mime.h ../cups/string.h ../Makedefs
+all: cupsd
#
# Clean all object files...
#
install:
+ -$(MKDIR) $(SBINDIR)
+ $(CP) cupsd $(SBINDIR)
+ -$(MKDIR) $(SERVERROOT)/logs
+ -$(MKDIR) $(SERVERROOT)/ppd
+ -$(MKDIR) $(SERVERROOT)/requests
+
+#
+# Make the scheduler executable, "cupsd".
+#
+
+cupsd: $(OBJS) ../cups/libcups.a
+ $(CC) $(LDFLAGS) -o cupsd $(OBJS) $(LIBS)
+
+$(OBJS): auth.h classes.h client.h conf.h cupsd.h dirsvc.h job.h \
+ printers.h ../cups/cups.h ../cups/http.h ../cups/ipp.h \
+ ../cups/mime.h ../cups/string.h ../Makedefs
#
-# End of "$Id: Makefile,v 1.6 1999/04/16 20:47:46 mike Exp $".
+# End of "$Id: Makefile,v 1.7 1999/05/10 21:35:40 mike Exp $".
#
/*
- * "$Id: auth.c,v 1.9 1999/04/23 14:06:14 mike Exp $"
+ * "$Id: auth.c,v 1.10 1999/05/10 21:35:40 mike Exp $"
*
* Authorization routines for the Common UNIX Printing System (CUPS).
*
strncpy(temp->location, location, sizeof(temp->location) - 1);
temp->length = strlen(temp->location);
- LogMessage(LOG_INFO, "AddLocation: added location \'%s\'", location);
+ LogMessage(LOG_DEBUG, "AddLocation: added location \'%s\'", location);
/*
* Return the new record...
if (pw == NULL) /* No such user... */
{
- LogMessage(LOG_INFO, "IsAuthorized: Unknown username \"%s\".",
+ LogMessage(LOG_WARN, "IsAuthorized: Unknown username \"%s\"; access denied.",
con->username);
return (HTTP_UNAUTHORIZED);
}
/*
- * End of "$Id: auth.c,v 1.9 1999/04/23 14:06:14 mike Exp $".
+ * End of "$Id: auth.c,v 1.10 1999/05/10 21:35:40 mike Exp $".
*/
/*
- * "$Id: client.c,v 1.18 1999/05/10 16:38:40 mike Exp $"
+ * "$Id: client.c,v 1.19 1999/05/10 21:35:40 mike Exp $"
*
* Client routines for the Common UNIX Printing System (CUPS) scheduler.
*
else
strncpy(con->http.hostname, host->h_name, sizeof(con->http.hostname) - 1);
- LogMessage(LOG_INFO, "accept() %d from %s:%d.", con->http.fd,
+ LogMessage(LOG_DEBUG, "accept() %d from %s:%d.", con->http.fd,
con->http.hostname, ntohs(con->http.hostaddr.sin_port));
/*
int status; /* Exit status of pipe command */
- LogMessage(LOG_INFO, "CloseClient() %d", con->http.fd);
+ LogMessage(LOG_DEBUG, "CloseClient() %d", con->http.fd);
/*
* Close the socket and clear the file from the input set for select()...
con->start = time(NULL);
con->operation = con->http.state;
- LogMessage(LOG_INFO, "ReadClient() %d %s %s HTTP/%d.%d", con->http.fd,
+ LogMessage(LOG_DEBUG, "ReadClient() %d %s %s HTTP/%d.%d", con->http.fd,
operation, con->uri,
con->http.version / 100, con->http.version % 100);
con->file = mkstemp(con->filename);
fchmod(con->file, 0644);
- LogMessage(LOG_INFO, "ReadClient() %d REQUEST %s", con->http.fd,
+ LogMessage(LOG_DEBUG, "ReadClient() %d REQUEST %s", con->http.fd,
con->filename);
if (con->file < 0)
for (i = NumListeners, lis = Listeners; i > 0; i --, lis ++)
{
- LogMessage(LOG_INFO, "StartListening() address=%08x port=%d",
+ LogMessage(LOG_DEBUG, "StartListening() address=%08x port=%d",
ntohl(lis->address.sin_addr.s_addr),
ntohs(lis->address.sin_port));
FD_SET(lis->fd, &InputSet);
}
- LogMessage(LOG_INFO, "StartListening() NumListeners=%d", NumListeners);
+ LogMessage(LOG_DEBUG, "StartListening() NumListeners=%d", NumListeners);
}
FD_CLR(lis->fd, &InputSet);
}
- LogMessage(LOG_INFO, "StopListening()");
+ LogMessage(LOG_DEBUG, "StopListening()");
}
/*
- * End of "$Id: client.c,v 1.18 1999/05/10 16:38:40 mike Exp $".
+ * End of "$Id: client.c,v 1.19 1999/05/10 21:35:40 mike Exp $".
*/
/*
- * "$Id: conf.c,v 1.16 1999/05/10 16:38:41 mike Exp $"
+ * "$Id: conf.c,v 1.17 1999/05/10 21:35:41 mike Exp $"
*
* Configuration routines for the Common UNIX Printing System (CUPS).
*
StopListening();
StopBrowsing();
- LogMessage(LOG_INFO, "ReadConfiguration() ConfigurationFile=\"%s\"",
+ LogMessage(LOG_DEBUG, "ReadConfiguration() ConfigurationFile=\"%s\"",
ConfigurationFile);
if (AccessFile != NULL)
/*
- * End of "$Id: conf.c,v 1.16 1999/05/10 16:38:41 mike Exp $".
+ * End of "$Id: conf.c,v 1.17 1999/05/10 21:35:41 mike Exp $".
*/
/*
- * "$Id: job.c,v 1.17 1999/05/10 16:38:42 mike Exp $"
+ * "$Id: job.c,v 1.18 1999/05/10 21:35:41 mike Exp $"
*
* Job management routines for the Common UNIX Printing System (CUPS).
*
*/
*lineptr++ = '\0';
- puts(buffer);
/*
* Figure out the logging level...
/*
- * End of "$Id: job.c,v 1.17 1999/05/10 16:38:42 mike Exp $".
+ * End of "$Id: job.c,v 1.18 1999/05/10 21:35:41 mike Exp $".
*/