summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4536000)
Amazon will return directory listings in chunks. Be sure to repeat list
calls until we find the actual end of the directory listing.
+ if (checkpoint_size == 0) {
+ g_error("Unable to locate checkpoint record!\n");
+ }
+
g_print("Found checkpoint record at %zd (size %zd)\n",
checkpoint - last->data, checkpoint_size);
g_print("Found checkpoint record at %zd (size %zd)\n",
checkpoint - last->data, checkpoint_size);
struct list_info {
int success;
char *last_entry;
struct list_info {
int success;
char *last_entry;
};
static S3Status s3store_get_handler(int bufferSize, const char *buffer,
};
static S3Status s3store_get_handler(int bufferSize, const char *buffer,
g_free(info->last_entry);
info->last_entry = g_strdup(contents[contentsCount - 1].key);
}
g_free(info->last_entry);
info->last_entry = g_strdup(contents[contentsCount - 1].key);
}
+ info->truncated = isTruncated;
return S3StatusOK;
}
static char *s3store_lookup_last(gpointer s, const char *prefix)
{
S3Store *store = (S3Store *)s;
return S3StatusOK;
}
static char *s3store_lookup_last(gpointer s, const char *prefix)
{
S3Store *store = (S3Store *)s;
- struct list_info info = {0, NULL};
+ struct list_info info = {0, NULL, FALSE};
struct S3ListBucketHandler handler;
handler.responseHandler.propertiesCallback
struct S3ListBucketHandler handler;
handler.responseHandler.propertiesCallback
- S3_list_bucket(&store->bucket, prefix, marker, NULL, 1024, NULL, &handler, &info);
+ do {
+ S3_list_bucket(&store->bucket, prefix, marker, NULL, 1024, NULL,
+ &handler, &info);
+ g_free(marker);
+ marker = g_strdup(info.last_entry);
+ g_print("Last key: %s\n", info.last_entry);
+ } while (info.truncated);
- g_print("Last key: %s\n", info.last_entry);
return info.last_entry;
}
return info.last_entry;
}