plugins/out_s3/s3_multipart.c
static int save_upload(struct flb_s3 *ctx, struct multipart_upload *m_upload,
                       flb_sds_t etag)
{
    int ret;
    flb_sds_t key;
    flb_sds_t data;
    struct flb_fstore_file *fsf;

    key = upload_key(m_upload);
    if (!key) {
        flb_plg_debug(ctx->ins, "Could not constuct upload key for buffer dir");
        return -1;
    }

    data = upload_data(etag, m_upload->part_number);
    if (!data) {
        flb_plg_debug(ctx->ins, "Could not constuct upload key for buffer dir");
        return -1;
    }

    fsf = s3_store_file_upload_get(ctx, key, flb_sds_len(key));

    /* Write the key to the file */
    ret = s3_store_file_upload_put(ctx, fsf, key, data);

    flb_sds_destroy(key);
    flb_sds_destroy(data);

    return ret;
}
/* persists upload data to the file system */
persists upload data to the file system
persists upload data to the file system
static int save_upload(struct flb_s3 *ctx, struct multipart_upload *m_upload,
                       flb_sds_t etag)
{
    int ret;
    flb_sds_t key;
    flb_sds_t data;
    struct flb_fstore_file *fsf;
    key = upload_key(m_upload);
    if (!key) {
        flb_plg_debug(ctx->ins, "Could not constuct upload key for buffer dir");
        return -1;
    }
    data = upload_data(etag, m_upload->part_number);
    if (!data) {
        flb_plg_debug(ctx->ins, "Could not constuct upload key for buffer dir");
        return -1;
    }
    fsf = s3_store_file_upload_get(ctx, key, flb_sds_len(key));
    ret = s3_store_file_upload_put(ctx, fsf, key, data);
    flb_sds_destroy(key);
    flb_sds_destroy(data);
    return ret;
}
static int save_upload ( struct flb_s3 * ctx , struct multipart_upload * m_upload , flb_sds_t etag ) { int ret ; flb_sds_t key ; flb_sds_t data ; struct flb_fstore_file * fsf ; key = upload_key ( m_upload ) ; if ( ! key ) { flb_plg_debug ( ctx -> ins , " " ) ; return -1 ; } data = upload_data ( etag , m_upload -> part_number ) ; if ( ! data ) { flb_plg_debug ( ctx -> ins , " " ) ; return -1 ; } fsf = s3_store_file_upload_get ( ctx , key , flb_sds_len ( key ) ) ; ret = s3_store_file_upload_put ( ctx , fsf , key , data ) ; flb_sds_destroy ( key ) ; flb_sds_destroy ( data ) ; return ret ; }
persists upload data to the file system
persists upload data to the file system
/* Write the key to the file */