summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorBryan Ischo <bryan@ischo.com>2008-10-08 11:26:47 +0000
committerBryan Ischo <bryan@ischo.com>2008-10-08 11:26:47 +0000
commit3ed71a2e4f658bec7f0c886909bc3475778b7741 (patch)
tree68a3894dd3f13d4ff86c6e9ce685ee7c6abad042 /inc
parent8cc18cbb67d459076d6d3df08b02c531d5ccc08f (diff)
downloadceph-libs3-3ed71a2e4f658bec7f0c886909bc3475778b7741.tar.gz
* Added -Wextra and -Wshadow compiler options, to enforce extra warnings, and
fixed the code necessary to comply with these flags * Fixed a bug introduced in the 1.0 release, that caused last modified time not to be reported to callbacks * Changed the semantics of the put data callback, to only make the callback enough times to get enough data to satisfy the content length * Fixed the error status when curl doesn't get a valid HTTP response from S3 to be S3StatusConnectionFailed instead of S3StatusHttpErrorUnknown * Fixed a bug where S3_runall_request_context would stop even though a callback had added another request * libs3.h doesn't need sys/time.h anymore, it just needs sys/select.h * Some minor documentation enhancements
Diffstat (limited to 'inc')
-rw-r--r--inc/libs3.h12
-rw-r--r--inc/request.h4
-rw-r--r--inc/string_buffer.h4
3 files changed, 12 insertions, 8 deletions
diff --git a/inc/libs3.h b/inc/libs3.h
index 8b525cf..39d4d7b 100644
--- a/inc/libs3.h
+++ b/inc/libs3.h
@@ -28,7 +28,7 @@
#define LIBS3_H
#include <stdint.h>
-#include <sys/time.h>
+#include <sys/select.h>
#ifdef __cplusplus
@@ -905,8 +905,10 @@ typedef S3Status (S3ListServiceCallback)(const char *ownerId,
/**
- * This callback is made once for each object resulting from a list bucket
- * operation.
+ * This callback is made repeatedly as a list bucket operation progresses.
+ * The contents reported via this callback are only reported once per list
+ * bucket operation, but multiple calls to this callback may be necessary to
+ * report all items resulting from the list bucket operation.
*
* @param isTruncated is true if the list bucket request was truncated by the
* S3 service, in which case the remainder of the list may be obtained
@@ -1045,7 +1047,9 @@ typedef struct S3ListBucketHandler
/**
* The listBucketCallback is called as items are reported back from S3 as
- * responses to the request
+ * responses to the request. This may be called more than one time per
+ * list bucket request, each time providing more items from the list
+ * operation.
**/
S3ListBucketCallback *listBucketCallback;
} S3ListBucketHandler;
diff --git a/inc/request.h b/inc/request.h
index 750e39a..706001b 100644
--- a/inc/request.h
+++ b/inc/request.h
@@ -148,8 +148,8 @@ typedef struct Request
// Callback to be made to supply data to send to S3. Might not be called.
S3PutObjectDataCallback *toS3Callback;
- // Number of bytes total that readCallback will supply
- int64_t toS3CallbackTotalSize;
+ // Number of bytes total that readCallback has left to supply
+ int64_t toS3CallbackBytesRemaining;
// Callback to be made that supplies data read from S3.
// Might not be called.
diff --git a/inc/string_buffer.h b/inc/string_buffer.h
index 472baca..eed9bd4 100644
--- a/inc/string_buffer.h
+++ b/inc/string_buffer.h
@@ -50,7 +50,7 @@
do { \
sb##Len += snprintf(&(sb[sb##Len]), sizeof(sb) - sb##Len - 1, \
"%.*s", (int) (len), str); \
- if (sb##Len > (sizeof(sb) - 1)) { \
+ if (sb##Len > (int) (sizeof(sb) - 1)) { \
sb##Len = sizeof(sb) - 1; \
all_fit = 0; \
} \
@@ -84,7 +84,7 @@
smb##Size += (snprintf(&(smb[smb##Size]), \
sizeof(smb) - smb##Size, \
"%.*s", (int) (len), str) + 1); \
- if (smb##Size > sizeof(smb)) { \
+ if (smb##Size > (int) sizeof(smb)) { \
smb##Size = sizeof(smb); \
all_fit = 0; \
} \