{
BlueSkyInode *inode = NULL;
+ if (inum == 0) {
+ return NULL;
+ }
+
g_mutex_lock(fs->lock);
inode = (BlueSkyInode *)g_hash_table_lookup(fs->inodes, &inum);
bluesky_store_put(fs->store, "superblock", data);
}
-
}
struct get_info {
+ int success;
GString *buf;
};
const S3ErrorDetails *errorDetails,
void *callbackData)
{
+ struct get_info *info = (struct get_info *)callbackData;
+
g_print("S3 operation complete, status=%s, now=%ld\n",
S3_get_status_name(status), bluesky_now_hires());
+
+ if (status == 0) {
+ info->success = 1;
+ }
+
if (errorDetails != NULL) {
g_print(" Error message: %s\n", errorDetails->message);
}
struct get_info info;
info.buf = g_string_new("");
+ info.success = 0;
struct S3GetObjectHandler handler;
handler.responseHandler.propertiesCallback = s3store_properties_callback;
S3_get_object(&store->bucket, key, NULL, 0, 0, NULL,
&handler, &info);
+ if (!info.success) {
+ g_string_free(info.buf, TRUE);
+ return NULL;
+ }
+
BlueSkyRCStr *raw, *decrypted;
raw = bluesky_string_new_from_gstring(info.buf);
decrypted = bluesky_crypt_decrypt(raw, store->encryption_key);