Revision 176b8de8 src/CloudSupport/libs3_delegate_helper.c

View differences:

src/CloudSupport/libs3_delegate_helper.c
26 26
#include "net_helper.h"
27 27
#include "cloud_helper_iface.h"
28 28
#include "request_handler.h"
29
#include "config.h"
29
#include "grapes_config.h"
30 30

  
31 31
#define CLOUD_NODE_ADDR "0.0.0.0"
32 32

  
......
481 481

  
482 482
  ctx = malloc(sizeof(struct libs3_cloud_context));
483 483
  memset(ctx, 0, sizeof(struct libs3_cloud_context));
484
  cfg_tags = config_parse(config);
484
  cfg_tags = grapes_config_parse(config);
485 485

  
486 486
  /* Parse fundametal parameters */
487
  arg = config_value_str(cfg_tags, "s3_access_key");
487
  arg = grapes_config_value_str(cfg_tags, "s3_access_key");
488 488
  if (!arg) {
489 489
    deallocate_context(ctx);
490 490
    fprintf(stderr,
......
494 494
  }
495 495
  ctx->s3_bucket_context.accessKeyId = strdup(arg);
496 496

  
497
  arg = config_value_str(cfg_tags, "s3_secret_key");
497
  arg = grapes_config_value_str(cfg_tags, "s3_secret_key");
498 498
  if (!arg) {
499 499
    deallocate_context(ctx);
500 500
    fprintf(stderr,
......
504 504
  }
505 505
  ctx->s3_bucket_context.secretAccessKey = strdup(arg);
506 506

  
507
  arg = config_value_str(cfg_tags, "s3_bucket_name");
507
  arg = grapes_config_value_str(cfg_tags, "s3_bucket_name");
508 508
  if (!arg) {
509 509
    deallocate_context(ctx);
510 510
    fprintf(stderr,
......
515 515
  ctx->s3_bucket_context.bucketName = strdup(arg);
516 516

  
517 517
  ctx->s3_bucket_context.protocol = S3ProtocolHTTPS;
518
  arg = config_value_str(cfg_tags, "s3_protocol");
518
  arg = grapes_config_value_str(cfg_tags, "s3_protocol");
519 519
  if (arg) {
520 520
    if (strcmp(arg, "https") == 0) {
521 521
      ctx->s3_bucket_context.protocol = S3ProtocolHTTPS;
......
529 529

  
530 530
  /* Parse optional parameters */
531 531
  ctx->blocking_put_request = 1;
532
  arg = config_value_str(cfg_tags, "s3_blocking_put");
532
  arg = grapes_config_value_str(cfg_tags, "s3_blocking_put");
533 533
  if (arg) {
534 534
    if (strcmp(arg, "1") == 0)
535 535
      ctx->blocking_put_request = 1;

Also available in: Unified diff