serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1708140 - /serf/trunk/buckets/log_wrapper_buckets.c
Date Mon, 12 Oct 2015 15:29:12 GMT
Author: rhuijben
Date: Mon Oct 12 15:29:12 2015
New Revision: 1708140

URL: http://svn.apache.org/viewvc?rev=1708140&view=rev
Log:
* buckets/log_wrapper_buckets.c
  (serf__bucket_log_wrapper_create): Properly detect and declare bucket v2
    support without depending on pointer equality.

Modified:
    serf/trunk/buckets/log_wrapper_buckets.c

Modified: serf/trunk/buckets/log_wrapper_buckets.c
URL: http://svn.apache.org/viewvc/serf/trunk/buckets/log_wrapper_buckets.c?rev=1708140&r1=1708139&r2=1708140&view=diff
==============================================================================
--- serf/trunk/buckets/log_wrapper_buckets.c (original)
+++ serf/trunk/buckets/log_wrapper_buckets.c Mon Oct 12 15:29:12 2015
@@ -157,11 +157,13 @@ serf_bucket_t *serf__bucket_log_wrapper_
     bkt_type->name = wrapped->type->name;
     bkt_type->peek = wrapped->type->peek;
     /* These read functions are not used by serf, so no need to add logging. */
-    bkt_type->read_bucket = wrapped->type->read_bucket;
     bkt_type->read_for_sendfile = wrapped->type->read_for_sendfile;
-    if (wrapped->type->read_bucket == serf_buckets_are_v2) {
+    if (serf_get_type(wrapped, 2) != NULL) {
+        bkt_type->read_bucket = serf_buckets_are_v2;
         bkt_type->read_bucket_v2 = wrapped->type->read_bucket_v2;
         bkt_type->get_remaining = wrapped->type->get_remaining;
+    } else {
+        bkt_type->read_bucket = wrapped->type->read_bucket;
     }
 
     /* Wrap these functions */



Mime
View raw message