projects
/
platform
/
upstream
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 1.1.0
[platform/upstream/iotivity.git]
/
resource
/
csdk
/
stack
/
samples
/
linux
/
secure
/
ocamsservice.cpp
diff --git
a/resource/csdk/stack/samples/linux/secure/ocamsservice.cpp
b/resource/csdk/stack/samples/linux/secure/ocamsservice.cpp
index
c22d371
..
4a6b14e
100644
(file)
--- a/
resource/csdk/stack/samples/linux/secure/ocamsservice.cpp
+++ b/
resource/csdk/stack/samples/linux/secure/ocamsservice.cpp
@@
-16,7
+16,7
@@
int gQuitFlag = 0;
//AMS service database, hold AMS service Identity and
//the PSK credentials of trusted devices
//AMS service database, hold AMS service Identity and
//the PSK credentials of trusted devices
-static char AMSS_DB_FILE[] = "oic_amss_db.
json
";
+static char AMSS_DB_FILE[] = "oic_amss_db.
dat
";
/* SIGINT handler: set gQuitFlag to 1 for graceful termination */
void handleSigInt(int signum)
/* SIGINT handler: set gQuitFlag to 1 for graceful termination */
void handleSigInt(int signum)
@@
-37,7
+37,7
@@
int main(int /*argc*/, char* /*argv*/[])
{
struct timespec timeout;
{
struct timespec timeout;
- OC_LOG(DEBUG, TAG, "OCAMS service is starting...");
+ O
I
C_LOG(DEBUG, TAG, "OCAMS service is starting...");
// Initialize Persistent Storage for SVR database
OCPersistentStorage ps = { service_fopen, fread, fwrite, fclose, unlink };
// Initialize Persistent Storage for SVR database
OCPersistentStorage ps = { service_fopen, fread, fwrite, fclose, unlink };
@@
-45,7
+45,7
@@
int main(int /*argc*/, char* /*argv*/[])
if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
{
if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
{
- OC_LOG(ERROR, TAG, "OCStack init error");
+ O
I
C_LOG(ERROR, TAG, "OCStack init error");
return 0;
}
return 0;
}
@@
-53,23
+53,23
@@
int main(int /*argc*/, char* /*argv*/[])
timeout.tv_nsec = 100000000L;
// Break from loop with Ctrl-C
timeout.tv_nsec = 100000000L;
// Break from loop with Ctrl-C
- OC_LOG(INFO, TAG, "Entering ocamsservice main loop...");
+ O
I
C_LOG(INFO, TAG, "Entering ocamsservice main loop...");
signal(SIGINT, handleSigInt);
while (!gQuitFlag)
{
if (OCProcess() != OC_STACK_OK)
{
signal(SIGINT, handleSigInt);
while (!gQuitFlag)
{
if (OCProcess() != OC_STACK_OK)
{
- OC_LOG(ERROR, TAG, "OCStack process error");
+ O
I
C_LOG(ERROR, TAG, "OCStack process error");
return 0;
}
nanosleep(&timeout, NULL);
}
return 0;
}
nanosleep(&timeout, NULL);
}
- OC_LOG(INFO, TAG, "Exiting ocamsservice main loop...");
+ O
I
C_LOG(INFO, TAG, "Exiting ocamsservice main loop...");
if (OCStop() != OC_STACK_OK)
{
if (OCStop() != OC_STACK_OK)
{
- OC_LOG(ERROR, TAG, "OCStack process error");
+ O
I
C_LOG(ERROR, TAG, "OCStack process error");
}
return 0;
}
return 0;