You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mt...@apache.org on 2006/07/26 01:49:39 UTC

svn commit: r425559 - /httpd/httpd/trunk/modules/proxy/ajp_utils.c

Author: mturk
Date: Tue Jul 25 16:49:39 2006
New Revision: 425559

URL: http://svn.apache.org/viewvc?rev=425559&view=rev
Log:
Adjust the svn properties.

Modified:
    httpd/httpd/trunk/modules/proxy/ajp_utils.c   (contents, props changed)

Modified: httpd/httpd/trunk/modules/proxy/ajp_utils.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ajp_utils.c?rev=425559&r1=425558&r2=425559&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/ajp_utils.c (original)
+++ httpd/httpd/trunk/modules/proxy/ajp_utils.c Tue Jul 25 16:49:39 2006
@@ -1,104 +1,104 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ajp.h"
-
-/*
- * Handle the CPING/CPONG
- */
-apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
-                                    request_rec *r,
-                                    apr_interval_time_t timeout)
-{
-    ajp_msg_t *msg;
-    apr_status_t rc;
-    apr_interval_time_t org;
-    apr_byte_t result;
-
-    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                         "Into ajp_handle_cping_cpong");
-
-    rc = ajp_msg_create(r->pool, &msg);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: ajp_msg_create failed");
-        return rc;
-    }
-
-    rc = ajp_msg_serialize_cping(msg);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: ajp_marshal_into_msgb failed");
-        return rc;
-    }
-
-    rc = ajp_ilink_send(sock, msg);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: ajp_ilink_send failed");
-        return rc;
-    }
-
-    rc = apr_socket_timeout_get(sock, &org);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: apr_socket_timeout_get failed");
-        return rc;
-    }
-
-    /* Set CPING/CPONG response timeout */
-    rc = apr_socket_timeout_set(sock, timeout);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: apr_socket_timeout_set failed");
-        return rc;
-    }
-    ajp_msg_reuse(msg);
-
-    /* Read CPONG reply */
-    rc = ajp_ilink_receive(sock, msg);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: ajp_ilink_receive failed");
-        return rc;
-    }
-
-    rc = ajp_msg_get_uint8(msg, &result);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: invalid CPONG message");
-        return rc;
-    }
-    if (result != CMD_AJP13_CPONG) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: awaited CPONG, received %d ",
-               result);
-        return APR_EGENERAL;
-
-    }
-
-    /* Restore original socket timeout */
-    rc = apr_socket_timeout_set(sock, org);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_handle_cping_cpong: apr_socket_timeout_set failed");
-        return rc;
-    }
-
-    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                         "ajp_handle_cping_cpong: Done");
-    return APR_SUCCESS;
-}
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ajp.h"
+
+/*
+ * Handle the CPING/CPONG
+ */
+apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
+                                    request_rec *r,
+                                    apr_interval_time_t timeout)
+{
+    ajp_msg_t *msg;
+    apr_status_t rc;
+    apr_interval_time_t org;
+    apr_byte_t result;
+
+    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                         "Into ajp_handle_cping_cpong");
+
+    rc = ajp_msg_create(r->pool, &msg);
+    if (rc != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: ajp_msg_create failed");
+        return rc;
+    }
+
+    rc = ajp_msg_serialize_cping(msg);
+    if (rc != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: ajp_marshal_into_msgb failed");
+        return rc;
+    }
+
+    rc = ajp_ilink_send(sock, msg);
+    if (rc != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: ajp_ilink_send failed");
+        return rc;
+    }
+
+    rc = apr_socket_timeout_get(sock, &org);
+    if (rc != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: apr_socket_timeout_get failed");
+        return rc;
+    }
+
+    /* Set CPING/CPONG response timeout */
+    rc = apr_socket_timeout_set(sock, timeout);
+    if (rc != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: apr_socket_timeout_set failed");
+        return rc;
+    }
+    ajp_msg_reuse(msg);
+
+    /* Read CPONG reply */
+    rc = ajp_ilink_receive(sock, msg);
+    if (rc != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: ajp_ilink_receive failed");
+        return rc;
+    }
+
+    rc = ajp_msg_get_uint8(msg, &result);
+    if (rc != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: invalid CPONG message");
+        return rc;
+    }
+    if (result != CMD_AJP13_CPONG) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: awaited CPONG, received %d ",
+               result);
+        return APR_EGENERAL;
+
+    }
+
+    /* Restore original socket timeout */
+    rc = apr_socket_timeout_set(sock, org);
+    if (rc != APR_SUCCESS) {
+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
+               "ajp_handle_cping_cpong: apr_socket_timeout_set failed");
+        return rc;
+    }
+
+    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+                         "ajp_handle_cping_cpong: Done");
+    return APR_SUCCESS;
+}

Propchange: httpd/httpd/trunk/modules/proxy/ajp_utils.c
------------------------------------------------------------------------------
    svn:eol-style = native