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 0.9.2
[platform/upstream/iotivity.git]
/
service
/
notification-manager
/
SampleApp
/
linux
/
notificationManager
/
main.cpp
diff --git
a/service/notification-manager/SampleApp/linux/notificationManager/main.c
b/service/notification-manager/SampleApp/linux/notificationManager/main.cpp
similarity index 76%
rename from
service/notification-manager/SampleApp/linux/notificationManager/main.c
rename to
service/notification-manager/SampleApp/linux/notificationManager/main.cpp
index
830db3a
..
4f4ebe0
100644
(file)
--- a/
service/notification-manager/SampleApp/linux/notificationManager/main.c
+++ b/
service/notification-manager/SampleApp/linux/notificationManager/main.cpp
@@
-35,47
+35,30
@@
int main()
{
printf("OCResourceHosting is starting...\n");
{
printf("OCResourceHosting is starting...\n");
- if (OCInit((char *) NULL, 0, OC_CLIENT_SERVER) != OC_STACK_OK)
- {
- printf("OCStack init error\n");
- return 0;
- }
-
if (OICStartCoordinate() != OC_STACK_OK)
{
if (OICStartCoordinate() != OC_STACK_OK)
{
- printf("OIC
coordinate start
fail\n");
+ printf("OIC
StartCoordinate
fail\n");
return 0;
}
return 0;
}
+ printf("OCResourceHosting Started Successfully \n");
+
signal(SIGINT, handleSigInt);
while (!g_quitFlag)
{
signal(SIGINT, handleSigInt);
while (!g_quitFlag)
{
- if (OCProcess() != OC_STACK_OK)
- {
- OICStopCoordinate();
- printf("OCStack process error\n");
- return 0;
- }
-
sleep(2);
}
if (OICStopCoordinate() != OC_STACK_OK)
{
sleep(2);
}
if (OICStopCoordinate() != OC_STACK_OK)
{
- printf("OIC
coordinate stop
error\n");
+ printf("OIC
StopCoordinate
error\n");
}
else
{
}
else
{
- printf("OIC
coordinate stop
success\n");
+ printf("OIC
StopCoordinate
success\n");
}
printf("Exiting occlient main loop...\n");
}
printf("Exiting occlient main loop...\n");
-
- if (OCStop() != OC_STACK_OK)
- {
- printf("OCStack stop error\n");
- }
-
return 0;
}
return 0;
}