debug.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stropts.h>
#include <syslog.h>
#include "rpld.h"
extern char configFile[];
extern int debugLevel;
extern int debugDest;
extern int maxClients;
extern int backGround;
extern char logFile[];
extern unsigned long delayGran;
extern unsigned long startDelay;
extern int frameSize;
extern char ifName[];
extern int ifUnit;
extern char debugmsg[];
/*
* This is the routine to send the debug messages to the specified
* location.
*/
int pri;
{
int logpri;
switch (debugDest) {
case DEST_CONSOLE:
break;
case DEST_SYSLOGD:
switch (pri) {
case MSG_FATAL:
break;
case MSG_ERROR_1:
case MSG_ERROR_2:
break;
case MSG_WARN_1:
case MSG_WARN_2:
case MSG_WARN_3:
logpri = LOG_NOTICE;
break;
case MSG_INFO_1:
case MSG_INFO_2:
break;
case MSG_ALWAYS:
break;
}
break;
case DEST_LOGFILE:
printf("Server aborted\n");
exit(0);
}
}
break;
}
}
{
int i, j, k, n;
if (debugLevel >= MSG_ALWAYS) {
}
for (i = 0; i <= k; i++) {
if (debugLevel >= MSG_ALWAYS) {
}
n = (i+1)*10;
for (j = i*10; j < n; j++) {
if (debugLevel >= MSG_ALWAYS) {
}
}
if (debugLevel >= MSG_ALWAYS) {
}
}
}
{
int i, j, k, n;
if (debugLevel >= MSG_ALWAYS) {
}
for (i = 0; i <= k; i++) {
if (debugLevel >= MSG_ALWAYS) {
}
n = (i+1)*10;
for (j = i*10; j < n; j++) {
if (debugLevel >= MSG_ALWAYS) {
}
}
if (debugLevel >= MSG_ALWAYS) {
}
}
}
{
char dbDest[20];
switch (debugDest) {
case DEST_CONSOLE:
break;
case DEST_SYSLOGD:
break;
case DEST_LOGFILE:
break;
}
if (maxClients == -1)
else
if (backGround) {
} else {
}
}