//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)
{
struct timespec timeout;
- OC_LOG(DEBUG, TAG, "OCAMS service is starting...");
+ OIC_LOG(DEBUG, TAG, "OCAMS service is starting...");
// Initialize Persistent Storage for SVR database
OCPersistentStorage ps = { service_fopen, fread, fwrite, fclose, unlink };
if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
{
- OC_LOG(ERROR, TAG, "OCStack init error");
+ OIC_LOG(ERROR, TAG, "OCStack init error");
return 0;
}
timeout.tv_nsec = 100000000L;
// Break from loop with Ctrl-C
- OC_LOG(INFO, TAG, "Entering ocamsservice main loop...");
+ OIC_LOG(INFO, TAG, "Entering ocamsservice main loop...");
signal(SIGINT, handleSigInt);
while (!gQuitFlag)
{
if (OCProcess() != OC_STACK_OK)
{
- OC_LOG(ERROR, TAG, "OCStack process error");
+ OIC_LOG(ERROR, TAG, "OCStack process error");
return 0;
}
nanosleep(&timeout, NULL);
}
- OC_LOG(INFO, TAG, "Exiting ocamsservice main loop...");
+ OIC_LOG(INFO, TAG, "Exiting ocamsservice main loop...");
if (OCStop() != OC_STACK_OK)
{
- OC_LOG(ERROR, TAG, "OCStack process error");
+ OIC_LOG(ERROR, TAG, "OCStack process error");
}
return 0;