Revision 89b16ba8 src/Tests/cloud_test.c

View differences:

src/Tests/cloud_test.c
32 32
static char *key;
33 33
static char *value;
34 34

  
35
static const uint8_t *HEADER = (const uint8_t *) "<header>";
36

  
37

  
35 38
static void cmdline_parse(int argc, char *argv[])
36 39
{
37 40
  int o;
......
112 115
    break;
113 116
  case GET:
114 117
    printf("Getting from cloud value for key \"%s\": ", key);
115
    err = get_from_cloud(cloud, key);
118
    err = get_from_cloud(cloud, key, HEADER, sizeof(HEADER));
116 119
    if (err) {
117 120
      printf("Error performing the operation");
118 121
      return 1;
......
134 137
      printf("No response from cloud\n");
135 138
      return 1;
136 139
    } else {
137
      printf("No value for the specified key\n");
140
      err = recv_from_cloud(cloud, buffer, sizeof(buffer)-1);
141
      buffer[sizeof(buffer) - 1] = '\0';
142
      printf("No value for the specified key. Received: %s\n", buffer);
138 143
      return 1;      
139 144
    }
140 145
  }

Also available in: Unified diff