Commit 4e119e60 authored by Kishen Maloor's avatar Kishen Maloor

Update Cloud samples

Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
parent 882e39d8
Pipeline #735 failed with stage
in 6 minutes and 11 seconds
......@@ -492,6 +492,7 @@ read_pem(const char *file_path, char *buffer, size_t *buffer_len)
return -1;
}
fclose(fp);
buffer[pem_len] = '\0';
*buffer_len = (size_t)pem_len;
return 0;
}
......
......@@ -46,11 +46,11 @@ display_menu(void)
}
// define application specific values.
static const char *spec_version = "ocf.2.5.0";
static const char *spec_version = "ocf.2.0.5";
static const char *data_model_version = "ocf.res.1.3.0";
static const char *device_rt = "oic.d.cloudDevice";
static const char *device_name = "CloudDevice";
static const char *device_name = "CloudClient";
static const char *manufacturer = "ocfcloud.com";
......@@ -450,8 +450,13 @@ main(int argc, char *argv[])
{
if (argc == 1) {
PRINT("./cloud_client <device-name-without-spaces> <auth-code> <cis> <sid> "
"<apn>\n"
"Using the default values\n");
"<apn>\n");
#ifndef OC_SECURITY
PRINT("Using default parameters: device_name: %s, auth_code: %s, cis: %s, "
"sid: %s, "
"apn: %s\n",
device_name, auth_code, cis, sid, apn);
#endif /* !OC_SECURITY */
}
if (argc > 1) {
device_name = argv[1];
......@@ -474,10 +479,6 @@ main(int argc, char *argv[])
PRINT("apn: %s\n", argv[5]);
}
PRINT("device_name: %s, auth_code: %s, cis: %s, sid: %s, "
"apn: %s\n",
device_name, auth_code, cis, sid, apn);
#if defined(_WIN32)
InitializeCriticalSection(&cs);
InitializeConditionVariable(&cv);
......
......@@ -134,12 +134,12 @@ run(void)
#endif
// define application specific values.
static const char *spec_version = "ocf.1.0.0";
static const char *data_model_version = "ocf.res.1.0.0";
static const char *spec_version = "ocf.2.0.5";
static const char *data_model_version = "ocf.res.1.3.0";
static const char *resource_rt = "core.light";
static const char *device_rt = "oic.d.cloudDevice";
static const char *device_name = "Cloud Device";
static const char *device_name = "CloudServer";
static const char *manufacturer = "ocfcloud.com";
......@@ -363,13 +363,15 @@ factory_presets_cb(size_t device, void *data)
int
main(int argc, char *argv[])
{
PRINT("Default parameters: device_name: %s, auth_code: %s, cis: %s, sid: %s, "
"apn: %s\n",
device_name, auth_code, cis, sid, apn);
if (argc == 1) {
PRINT("./cloud_client <device-name-without-spaces> <auth-code> <cis> <sid> "
"<apn>\n"
"Using the default values\n");
PRINT("./cloud_server <device-name-without-spaces> <auth-code> <cis> <sid> "
"<apn>\n");
#ifndef OC_SECURITY
PRINT("Using default parameters: device_name: %s, auth_code: %s, cis: %s, "
"sid: %s, "
"apn: %s\n",
device_name, auth_code, cis, sid, apn);
#endif /* !OC_SECURITY */
}
if (argc > 1) {
device_name = argv[1];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment