/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include "lpsched.h"
#include <syslog.h>
static void init_printers(),
init_classes(),
init_forms(),
init_pwheels(),
init_exec();
static void init_requests();
void
init_memory(void)
{
init_exec();
init_classes();
init_forms();
init_pwheels();
/*
* Load the status after the basic structures have been loaded,
* but before loading requests still in the queue. This is so
* the requests can be compared against accurate status information
* (except rejection status--accept the jobs anyway).
*/
load_status();
}
static void
{
PRINTER *p;
int i = 0;
if ((!p) || (p->remote)) /* NULL or this is remote, ignore it */
continue;
(void) new_pstatus(p);
}
}
static void
{
CLASS *c;
(void) new_cstatus(c);
}
}
static void
{
_FORM *f;
int i = 0;
(void) new_fstatus(f);
}
}
static void
{
PWHEEL *p;
int i = 0;
{
if (!p) /* NULL, ignore it. */
continue;
(void) new_pwstatus(p);
}
}
static void
init_requests(void)
{
REQUEST *r;
SECURE *s;
char *name;
char *sysdir;
char *sysname;
short vr_ret;
continue;
}
freesecure(s);
continue;
}
rsp = new_rstatus(r, s);
continue;
}
/*
* So far, the only way RS_NOTIFY can be set without there
* being a notification file containing the message to the
* user, is if the request was cancelled. This is because
* cancelling a request does not cause the creation of the
* message if the request is currently printing or filtering.
* (The message is created after the child process dies.)
* Thus, we know what to say.
*
* If this behaviour changes, we may have to find another way
* of determining what to say in the message.
*/
if (!(r->outcome & RS_CANCELLED)) {
continue;
}
}
}
/* fix for bugid 1103709. if validate_request returns
* MNODEST, then the printer for the request doesn't exist
* anymore! E.g. lpadmin -x was issued, and the request
* hasn't been cleaned up. In this case, the "printer"
* element of table[] will be NULL, and cancel will
* core dump! So we clean this up here.
*/
/*
* Well actually this happens with MDENYDEST too. The real problem
* is if the printer is NULL, so test for it
*/
continue;
}
}
}
sysaddr = -1;
}
unsigned long i;
(int (*)(const void * , const void *))rsort);
}
Request_List = *table;
}
}
static void
{
int i;
for (i = 0; i < ET_SlowSize; i++) {
}
for (i = 0; i < ET_NotifySize; i++) {
}
}