Print this page
Bump Apache dependency to Apache 2
*** 18,36 ****
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
/* $Id: mod_ipp.c 149 2006-04-25 16:55:01Z njacobs $ */
- #pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Internet Printing Protocol (IPP) module for Apache.
*/
#include "ap_config.h"
--- 18,35 ----
*
* CDDL HEADER END
*/
/*
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
/* $Id: mod_ipp.c 149 2006-04-25 16:55:01Z njacobs $ */
/*
* Internet Printing Protocol (IPP) module for Apache.
*/
#include "ap_config.h"
*** 49,59 ****
#include "http_log.h"
#include "http_main.h"
#include "papi.h"
#ifndef APACHE_RELEASE /* appears to only exist in Apache 1.X */
#define APACHE2
! #include "apr_compat.h"
#endif
#include <papi.h>
#include <ipp-listener.h>
--- 48,58 ----
#include "http_log.h"
#include "http_main.h"
#include "papi.h"
#ifndef APACHE_RELEASE /* appears to only exist in Apache 1.X */
#define APACHE2
! #define ap_table_get apr_table_get
#endif
#include <papi.h>
#include <ipp-listener.h>
*** 192,202 ****
if ((message = alloca(size)) != NULL)
vsnprintf(message, size, fmt, args);
va_end(args);
#ifdef APACHE2
! ap_log_rerror(file, line, level, NULL, r, message);
#else
ap_log_rerror(file, line, level, r, message);
#endif
}
--- 191,201 ----
if ((message = alloca(size)) != NULL)
vsnprintf(message, size, fmt, args);
va_end(args);
#ifdef APACHE2
! ap_log_rerror(file, line, level, APR_SUCCESS, r, message);
#else
ap_log_rerror(file, line, level, r, message);
#endif
}
*** 286,303 ****
--- 285,304 ----
(void) papiAttributeListAddString(&request,
PAPI_ATTR_EXCL, "default-service",
config->default_svc);
}
+ #ifndef APACHE2
/*
* For Trusted Solaris, pass the fd number of the socket connection
* to the backend so the it can be forwarded to the backend print
* service to retrieve the sensativity label off of a multi-level
* port.
*/
(void) papiAttributeListAddInteger(&request, PAPI_ATTR_EXCL,
"peer-socket", ap_bfileno(r->connection->client, B_RD));
+ #endif
/* process the request */
status = ipp_process_request(request, &response, read_data, r);
if (status != PAPI_OK) {
errno = 0;
*** 397,407 ****
return (NULL);
}
/*ARGSUSED0*/
static const char *
! ipp_operation(cmd_parms *cmd, void *cfg, char *op, char *toggle)
{
IPPListenerConfig *config = (IPPListenerConfig *)cfg;
papi_status_t status;
status = ipp_configure_operation(&config->operations, op, toggle);
--- 398,408 ----
return (NULL);
}
/*ARGSUSED0*/
static const char *
! ipp_operation(cmd_parms *cmd, void *cfg, const char *op, const char *toggle)
{
IPPListenerConfig *config = (IPPListenerConfig *)cfg;
papi_status_t status;
status = ipp_configure_operation(&config->operations, op, toggle);