X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fstore-s3.c;h=fd2da4f5431b96c5f2598d900cbc49e4f903540c;hb=66d0c118de1aaa61f574f42b574b823c5e1ffdbb;hp=03f497b278105e8045fe6f32a6ca135397199d5a;hpb=d9bdc90da5c143d76cf3efd3c39b9bd190fb3741;p=bluesky.git diff --git a/bluesky/store-s3.c b/bluesky/store-s3.c index 03f497b..fd2da4f 100644 --- a/bluesky/store-s3.c +++ b/bluesky/store-s3.c @@ -115,6 +115,7 @@ static void s3store_task(gpointer a, gpointer s) } else if (async->op == STORE_OP_PUT) { struct put_info info; + info.success = 0; info.val = async->data; info.offset = 0; @@ -127,7 +128,11 @@ static void s3store_task(gpointer a, gpointer s) S3_put_object(&store->bucket, async->key, async->data->len, NULL, NULL, &handler, &info); - async->result = 0; + if (info.success) { + async->result = 0; + } else { + g_warning("Error completing S3 put operation; client must retry!"); + } } bluesky_store_async_mark_complete(async); @@ -187,7 +192,7 @@ static gpointer s3store_new(const gchar *path) else store->bucket.bucketName = g_strdup(path); store->bucket.protocol = S3ProtocolHTTP; - store->bucket.uriStyle = S3UriStylePath; + store->bucket.uriStyle = S3UriStyleVirtualHost; store->bucket.accessKeyId = getenv("AWS_ACCESS_KEY_ID"); store->bucket.secretAccessKey = getenv("AWS_SECRET_ACCESS_KEY");