]> granicus.if.org Git - apache/commitdiff
* modules/echo/mod_echo.c (process_echo_connection): Use _cleanup
authorJoe Orton <jorton@apache.org>
Sat, 5 Jun 2010 20:35:51 +0000 (20:35 +0000)
committerJoe Orton <jorton@apache.org>
Sat, 5 Jun 2010 20:35:51 +0000 (20:35 +0000)
  rather than _destroy to clear a brigade which is to be re-used.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951761 13f79535-47bb-0310-9956-ffa450edef68

modules/echo/mod_echo.c

index 63e329260b1ba2320d54dd14f4c2a97108a72613..bc0be70f8c6a1582639e41f282294325a27b1bcf 100644 (file)
@@ -150,7 +150,7 @@ static int process_echo_connection(conn_rec *c)
         /* Get a single line of input from the client */
         if (((rv = ap_get_brigade(c->input_filters, bb, AP_MODE_GETLINE,
                                   APR_BLOCK_READ, 0)) != APR_SUCCESS)) {
-            apr_brigade_destroy(bb);
+            apr_brigade_cleanup(bb);
             if (!APR_STATUS_IS_EOF(rv) && ! APR_STATUS_IS_TIMEUP(rv))
                 ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,
                              "ProtocolEcho: Failure reading from %s",
@@ -160,7 +160,7 @@ static int process_echo_connection(conn_rec *c)
 
         /* Something horribly wrong happened.  Someone didn't block! */
         if (APR_BRIGADE_EMPTY(bb)) {
-            apr_brigade_destroy(bb);
+            apr_brigade_cleanup(bb);
             ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,
                          "ProtocolEcho: Error - read empty brigade from %s!",
                          c->remote_ip);