Print this page
Bump Apache dependency to Apache 2

@@ -18,19 +18,18 @@
  *
  * 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 $ */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 /*
  * Internet Printing Protocol (IPP) module for Apache.
  */
 
 #include "ap_config.h"

@@ -49,11 +48,11 @@
 #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"
+#define ap_table_get apr_table_get
 #endif
 
 #include <papi.h>
 #include <ipp-listener.h>
 

@@ -192,11 +191,11 @@
                 if ((message = alloca(size)) != NULL)
                         vsnprintf(message, size, fmt, args);
         va_end(args);
 
 #ifdef APACHE2
-        ap_log_rerror(file, line, level, NULL, r, message);
+        ap_log_rerror(file, line, level, APR_SUCCESS, r, message);
 #else
         ap_log_rerror(file, line, level, r, message);
 #endif
 }
 

@@ -286,18 +285,20 @@
                         (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,11 +398,11 @@
         return (NULL);
 }
 
 /*ARGSUSED0*/
 static const char *
-ipp_operation(cmd_parms *cmd, void *cfg, char *op, char *toggle)
+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);