Created
September 25, 2015 10:25
-
-
Save gabrielschulhof/9be8e94e75149c2159b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[13:00][nix@boundary][/home/nix/iot/iotivity]/$ git fetch ssh://[email protected]:29418/iotivity refs/changes/55/3055/1 && git checkout FETCH_HEAD | |
remote: Counting objects: 10316, done | |
remote: Finding sources: 100% (226/226) | |
remote: Total 226 (delta 89), reused 143 (delta 89) | |
Receiving objects: 100% (226/226), 103.15 KiB | 0 bytes/s, done. | |
Resolving deltas: 100% (89/89), completed with 69 local objects. | |
From ssh://gerrit.iotivity.org:29418/iotivity | |
* branch refs/changes/55/3055/1 -> FETCH_HEAD | |
M build_common/linux/SConscript | |
Warning: you are leaving 1 commit behind, not connected to | |
any of your branches: | |
c269969 Fix for JIRA issue IOT-733 | |
If you want to keep them by creating a new branch, this may be a good time | |
to do so with: | |
git branch new_branch_name c269969 | |
HEAD is now at ff5227b... Fix segfault when calling OCCancel () | |
[13:01][nix@boundary][/home/nix/iot/iotivity]/$ git clean -x -d -f -f && git clone https://github.com/01org/tinycbor.git extlibs/tinycbor/tinycbor && git clone https://github.com/jbeder/yaml-cpp.git extlibs/yaml/yaml && JAVA_HOME=/ scons VERBOSE=true -j9 liboctbstack samples && ( cd resource/csdk/doc; doxygen; ) | |
... | |
... | |
Compiling ... | |
... | |
... | |
[13:02][nix@boundary][/home/nix/iot/iotivity]/$ cat - > client.c | |
#include <stdio.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <glib.h> | |
#include <ocstack.h> | |
#include <ocpayload.h> | |
static int observationCount = 0; | |
static GMainLoop *loop = NULL; | |
static guint timeout_id = 0; | |
static char *sampleUri = "/a/light"; | |
static void deleteContextNoop( void *context ) {} | |
static void cleanupAndExit( int whatSignal ) { | |
g_message( "Cleaning up and exiting" ); | |
g_source_remove( timeout_id ); | |
g_message( "OCStop: %d", OCStop() ); | |
g_main_loop_quit( loop ); | |
} | |
static gboolean run_OCProcess( void *nothingHere ) { | |
g_message( "OCProcess: %d", OCProcess() ); | |
return TRUE; | |
} | |
static void dumpResponse( const char *prefix, OCClientResponse *response ) { | |
_Bool state; | |
int64_t power; | |
printf( "%s: response:\n", prefix ); | |
printf( "%s: ->devAddr:\n", prefix ); | |
printf( "%s: ->devAddr.adapter: %d\n", prefix, response->devAddr.adapter ); | |
printf( "%s: ->devAddr.flags: %d\n", prefix, response->devAddr.flags ); | |
printf( "%s: ->devAddr.interface: %d\n", prefix, response->devAddr.interface ); | |
printf( "%s: ->devAddr.port: %d\n", prefix, response->devAddr.port ); | |
printf( "%s: ->devAddr.addr: %s\n", prefix, response->devAddr.addr ); | |
printf( "%s: response->payload: %s\n", prefix, response->payload ? "present": "absent" ); | |
if ( response->payload ) { | |
printf( "%s: response->payload->type: %d\n", prefix, response->payload->type ); | |
if ( response->payload->type == PAYLOAD_TYPE_DISCOVERY ) { | |
OCDiscoveryPayload *discoveryPayload = ( OCDiscoveryPayload * )( response->payload ); | |
if ( discoveryPayload->resources ) { | |
printf( "%s: response->payload->resources->uri: %s\n", prefix, discoveryPayload->resources->uri ); | |
} | |
} else if ( response->payload->type == PAYLOAD_TYPE_REPRESENTATION ) { | |
if ( OCRepPayloadGetPropBool( ( OCRepPayload * )( response->payload ), "state", &state ) && | |
OCRepPayloadGetPropInt( ( OCRepPayload * )( response->payload ), "power", &power ) ) { | |
printf( "%s: payload values: { state: %s, power: %d }\n", prefix, state ? "true" : "false", (int)power ); | |
} else { | |
printf( "%s: Failed to retrieve payload values\n", prefix ); | |
} | |
} | |
} | |
} | |
static OCStackApplicationResult observeCallback( void *nothingHere, OCDoHandle handle, OCClientResponse *response ) { | |
dumpResponse( "observe", response ); | |
if ( observationCount++ >= 10 ) { | |
g_message( "OCCancel: %d", OCCancel( handle, OC_HIGH_QOS, NULL, 0 ) ); | |
} | |
return OC_STACK_KEEP_TRANSACTION; | |
} | |
static OCStackApplicationResult discoverCallback( void *nothingHere, OCDoHandle handle, OCClientResponse *response ) { | |
OCResourcePayload *iter = 0; | |
OCCallbackData observeData = { NULL, observeCallback, deleteContextNoop }; | |
OCDoHandle observeHandle = NULL; | |
dumpResponse( "discovery", response ); | |
if ( response->payload->type == PAYLOAD_TYPE_DISCOVERY ) { | |
for ( iter = ( ( OCDiscoveryPayload * )response->payload )->resources ; iter; iter = iter->next ) { | |
if ( iter->uri && !strcmp( iter->uri, sampleUri ) ) { | |
g_message( "OCDoResource(observation): %d", OCDoResource( | |
&observeHandle, | |
OC_REST_OBSERVE, | |
sampleUri, | |
response->addr, | |
NULL, | |
CT_DEFAULT, | |
OC_HIGH_QOS, | |
&observeData, | |
NULL, | |
0 ) ); | |
return OC_STACK_DELETE_TRANSACTION; | |
} | |
} | |
} | |
return OC_STACK_KEEP_TRANSACTION; | |
} | |
int main( int argc, char **argv ) { | |
OCDoHandle discoverHandle; | |
OCCallbackData discoverData = { NULL, discoverCallback, deleteContextNoop }; | |
loop = g_main_loop_new( NULL, false ); | |
timeout_id = g_timeout_add( 1000, run_OCProcess, NULL ); | |
signal( SIGINT, cleanupAndExit ); | |
g_message( "OCInit: %d", OCInit( NULL, 0, OC_CLIENT ) ); | |
g_message( "OCDoResource(discovery): %d", OCDoResource( | |
&discoverHandle, | |
OC_REST_DISCOVER, | |
OC_MULTICAST_DISCOVERY_URI, | |
NULL, | |
NULL, | |
CT_DEFAULT, | |
OC_HIGH_QOS, | |
&discoverData, | |
NULL, | |
0 ) ); | |
g_main_loop_run( loop ); | |
return 0; | |
} | |
[13:03][nix@boundary][/home/nix/iot/iotivity]/$ cc -g -Wall -O0 \ | |
> -DROUTING_EP -DTCP_ADAPTER \ | |
> -I$(pwd)/resource/c_common \ | |
> -I$(pwd)/resource/csdk/stack/include \ | |
> -L$(pwd)/out/linux/x86/release/ \ | |
> -Wl,-rpath $(pwd)/out/linux/x86/release \ | |
> -loctbstack \ | |
> `pkg-config --cflags --libs glib-2.0` \ | |
> client.c -o client | |
(failed reverse-i-search)`oute': cc -g -Wall -O0 -DROUTING_EP -DTCP_ADAPTER -I$(pwd)/resource/c_common -I$(pwd)/resource/csdk/stack/include -L$(pwd)/out/linux/x86/release/ -Wl,-rpath $(pwd)/^Ct/linux/x86/release -loctbstack `pkg-config --cflags --libs glib-2.0` client.c -o client | |
[13:04][nix@boundary][/home/nix/iot/iotivity]/$ ./out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver -o 0 & | |
[1] 22480 | |
[13:04][nix@boundary][/home/nix/iot/iotivity]/$ 04:16.624 DEBUG: ocserver: OCServer is starting... | |
04:18.643 INFO: ocserver: Created Light resource with result: OC_STACK_OK | |
04:18.645 INFO: ocserver: Entering ocserver main loop... | |
[13:04][nix@boundary][/home/nix/iot/iotivity]/$ ./04:21.644 INFO: ocserver: ================ Counting down to stop presence 10 | |
client | |
04:24.644 INFO: ocserver: ================ Counting down to stop presence 9 | |
** Message: OCInit: 0 | |
** Message: OCDoResource(discovery): 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:27.644 INFO: ocserver: ================ Counting down to stop presence 8 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:29.645 INFO: ocserver: Created /a/fan for presence notification | |
** Message: OCProcess: 0 | |
04:30.644 INFO: ocserver: ================ Counting down to stop presence 7 | |
04:30.645 INFO: ocserver: Created /a/led for presence notification | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:33.645 INFO: ocserver: ================ Counting down to stop presence 6 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:35.646 INFO: ocserver: Deleted /a/fan for presence notification | |
04:35.646 INFO: ocserver: Deleted /a/led for presence notification | |
discovery: response: | |
discovery: ->devAddr: | |
discovery: ->devAddr.adapter: 1 | |
discovery: ->devAddr.flags: 32 | |
discovery: ->devAddr.interface: 3 | |
discovery: ->devAddr.port: 37168 | |
discovery: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
discovery: response->payload: present | |
discovery: response->payload->type: 1 | |
discovery: response->payload->resources->uri: /a/light | |
** Message: OCDoResource(observation): 0 | |
** Message: OCProcess: 0 | |
04:36.645 INFO: ocserver: ================ Counting down to stop presence 5 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:39.645 INFO: ocserver: ================ Counting down to stop presence 4 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:42.645 INFO: ocserver: ================ Counting down to stop presence 3 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:45.645 INFO: ocserver: ================ Counting down to stop presence 2 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:48.646 INFO: ocserver: ================ Counting down to stop presence 1 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
04:51.646 INFO: ocserver: ================ stopping presence | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:08.648 INFO: ocserver: Inside entity handler - flags: 0x6 | |
05:08.648 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:08.648 INFO: ocserver: Received OC_REST_GET from client | |
05:08.648 INFO: ocserver: Flag includes OC_OBSERVE_FLAG | |
05:08.648 INFO: ocserver: Received OC_OBSERVE_REGISTER from client | |
05:08.648 INFO: ocserver: Received observation registration request with observation Id 124 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 80 } | |
** Message: OCProcess: 0 | |
05:09.647 INFO: ocserver: =====> Notifying stack of new power level 85 | |
05:09.647 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:09.647 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:09.647 INFO: ocserver: Received OC_REST_GET from client | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 85 } | |
** Message: OCProcess: 0 | |
05:10.649 INFO: ocserver: Inside entity handler - flags: 0x6 | |
05:10.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:10.649 INFO: ocserver: Received OC_REST_GET from client | |
05:10.649 INFO: ocserver: Flag includes OC_OBSERVE_FLAG | |
05:10.649 INFO: ocserver: Received OC_OBSERVE_REGISTER from client | |
05:10.649 INFO: ocserver: Received observation registration request with observation Id 244 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 85 } | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:12.647 INFO: ocserver: =====> Notifying stack of new power level 90 | |
05:12.647 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:12.647 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:12.647 INFO: ocserver: Received OC_REST_GET from client | |
05:12.647 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:12.647 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:12.647 INFO: ocserver: Received OC_REST_GET from client | |
05:12.649 INFO: ocserver: Inside entity handler - flags: 0x6 | |
05:12.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:12.649 INFO: ocserver: Received OC_REST_GET from client | |
05:12.649 INFO: ocserver: Flag includes OC_OBSERVE_FLAG | |
05:12.649 INFO: ocserver: Received OC_OBSERVE_REGISTER from client | |
05:12.649 INFO: ocserver: Received observation registration request with observation Id 248 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 90 } | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 90 } | |
** Message: OCProcess: 0 | |
05:15.647 INFO: ocserver: =====> Notifying stack of new power level 95 | |
05:15.647 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:15.647 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:15.647 INFO: ocserver: Received OC_REST_GET from client | |
05:15.647 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:15.647 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:15.647 INFO: ocserver: Received OC_REST_GET from client | |
05:15.647 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:15.647 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:15.647 INFO: ocserver: Received OC_REST_GET from client | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 95 } | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:18.648 INFO: ocserver: =====> Notifying stack of new power level 100 | |
05:18.648 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:18.648 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:18.648 INFO: ocserver: Received OC_REST_GET from client | |
05:18.648 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:18.648 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:18.648 INFO: ocserver: Received OC_REST_GET from client | |
05:18.648 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:18.648 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:18.648 INFO: ocserver: Received OC_REST_GET from client | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 100 } | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:21.648 INFO: ocserver: =====> Notifying stack of new power level 105 | |
05:21.648 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:21.648 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:21.648 INFO: ocserver: Received OC_REST_GET from client | |
05:21.648 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:21.648 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:21.648 INFO: ocserver: Received OC_REST_GET from client | |
05:21.648 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:21.648 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:21.648 INFO: ocserver: Received OC_REST_GET from client | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 105 } | |
** Message: OCProcess: 0 | |
05:22.650 INFO: ocserver: Inside entity handler - flags: 0x6 | |
05:22.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:22.650 INFO: ocserver: Received OC_REST_GET from client | |
05:22.650 INFO: ocserver: Flag includes OC_OBSERVE_FLAG | |
05:22.650 INFO: ocserver: Received OC_OBSERVE_REGISTER from client | |
05:22.650 INFO: ocserver: Received observation registration request with observation Id 170 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:24.648 INFO: ocserver: =====> Notifying stack of new power level 110 | |
05:24.648 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:24.648 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:24.648 INFO: ocserver: Received OC_REST_GET from client | |
05:24.649 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:24.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:24.649 INFO: ocserver: Received OC_REST_GET from client | |
05:24.649 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:24.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:24.649 INFO: ocserver: Received OC_REST_GET from client | |
05:24.649 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:24.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:24.649 INFO: ocserver: Received OC_REST_GET from client | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 105 } | |
** Message: OCProcess: 0 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 110 } | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:27.649 INFO: ocserver: =====> Notifying stack of new power level 115 | |
05:27.649 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:27.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:27.649 INFO: ocserver: Received OC_REST_GET from client | |
05:27.649 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:27.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:27.649 INFO: ocserver: Received OC_REST_GET from client | |
05:27.649 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:27.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:27.649 INFO: ocserver: Received OC_REST_GET from client | |
05:27.649 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:27.649 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:27.649 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 115 } | |
** Message: OCCancel: 0 | |
** Message: OCProcess: 0 | |
05:30.650 INFO: ocserver: =====> Notifying stack of new power level 120 | |
05:30.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:30.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:30.650 INFO: ocserver: Received OC_REST_GET from client | |
05:30.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:30.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:30.650 INFO: ocserver: Received OC_REST_GET from client | |
05:30.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:30.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:30.650 INFO: ocserver: Received OC_REST_GET from client | |
05:30.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:30.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:30.650 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:33.650 INFO: ocserver: =====> Notifying stack of new power level 125 | |
05:33.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:33.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:33.650 INFO: ocserver: Received OC_REST_GET from client | |
05:33.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:33.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:33.650 INFO: ocserver: Received OC_REST_GET from client | |
05:33.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:33.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:33.650 INFO: ocserver: Received OC_REST_GET from client | |
05:33.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:33.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:33.650 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:36.650 INFO: ocserver: =====> Notifying stack of new power level 130 | |
05:36.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:36.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:36.650 INFO: ocserver: Received OC_REST_GET from client | |
05:36.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:36.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:36.650 INFO: ocserver: Received OC_REST_GET from client | |
05:36.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:36.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:36.650 INFO: ocserver: Received OC_REST_GET from client | |
05:36.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:36.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:36.650 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 120 } | |
** Message: OCCancel: 0 | |
** Message: OCProcess: 0 | |
05:39.650 INFO: ocserver: =====> Notifying stack of new power level 135 | |
05:39.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:39.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:39.650 INFO: ocserver: Received OC_REST_GET from client | |
05:39.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:39.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:39.650 INFO: ocserver: Received OC_REST_GET from client | |
05:39.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:39.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:39.650 INFO: ocserver: Received OC_REST_GET from client | |
05:39.650 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:39.650 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:39.650 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:42.651 INFO: ocserver: =====> Notifying stack of new power level 140 | |
05:42.651 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:42.651 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:42.651 INFO: ocserver: Received OC_REST_GET from client | |
05:42.651 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:42.651 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:42.651 INFO: ocserver: Received OC_REST_GET from client | |
05:42.651 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:42.651 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:42.651 INFO: ocserver: Received OC_REST_GET from client | |
05:42.651 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:42.651 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:42.651 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:45.651 INFO: ocserver: =====> Notifying stack of new power level 145 | |
05:45.651 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:45.651 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:45.651 INFO: ocserver: Received OC_REST_GET from client | |
05:45.651 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:45.651 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:45.651 INFO: ocserver: Received OC_REST_GET from client | |
05:45.651 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:45.651 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:45.651 INFO: ocserver: Received OC_REST_GET from client | |
05:45.651 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:45.651 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:45.651 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 125 } | |
** Message: OCCancel: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:48.652 INFO: ocserver: =====> Notifying stack of new power level 150 | |
05:48.652 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:48.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:48.652 INFO: ocserver: Received OC_REST_GET from client | |
05:48.652 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:48.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:48.652 INFO: ocserver: Received OC_REST_GET from client | |
05:48.652 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:48.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:48.652 INFO: ocserver: Received OC_REST_GET from client | |
05:48.652 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:48.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:48.652 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:51.652 INFO: ocserver: =====> Notifying stack of new power level 155 | |
05:51.652 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:51.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:51.652 INFO: ocserver: Received OC_REST_GET from client | |
05:51.652 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:51.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:51.652 INFO: ocserver: Received OC_REST_GET from client | |
05:51.652 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:51.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:51.652 INFO: ocserver: Received OC_REST_GET from client | |
05:51.652 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:51.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:51.652 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:54.653 INFO: ocserver: =====> Notifying stack of new power level 160 | |
05:54.653 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:54.653 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:54.653 INFO: ocserver: Received OC_REST_GET from client | |
05:54.653 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:54.653 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:54.653 INFO: ocserver: Received OC_REST_GET from client | |
05:54.653 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:54.653 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:54.653 INFO: ocserver: Received OC_REST_GET from client | |
05:54.653 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:54.653 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:54.653 INFO: ocserver: Received OC_REST_GET from client | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 130 } | |
** Message: OCCancel: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
05:56.652 INFO: ocserver: Inside entity handler - flags: 0x6 | |
05:56.652 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:56.652 INFO: ocserver: Received OC_REST_GET from client | |
05:56.652 INFO: ocserver: Flag includes OC_OBSERVE_FLAG | |
05:56.652 INFO: ocserver: Received OC_OBSERVE_DEREGISTER from client | |
05:56.652 INFO: ocserver: Received observation deregistration request for observation Id 124 | |
** Message: OCProcess: 0 | |
05:57.653 INFO: ocserver: =====> Notifying stack of new power level 165 | |
05:57.653 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:57.653 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:57.653 INFO: ocserver: Received OC_REST_GET from client | |
05:57.653 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:57.653 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:57.653 INFO: ocserver: Received OC_REST_GET from client | |
05:57.653 INFO: ocserver: Inside entity handler - flags: 0x2 | |
05:57.653 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
05:57.653 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
06:00.654 INFO: ocserver: =====> Notifying stack of new power level 170 | |
06:00.654 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:00.654 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:00.654 INFO: ocserver: Received OC_REST_GET from client | |
06:00.654 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:00.654 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:00.654 INFO: ocserver: Received OC_REST_GET from client | |
06:00.654 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:00.654 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:00.654 INFO: ocserver: Received OC_REST_GET from client | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 135 } | |
** Message: OCCancel: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
06:03.654 INFO: ocserver: =====> Notifying stack of new power level 175 | |
06:03.654 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:03.654 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:03.654 INFO: ocserver: Received OC_REST_GET from client | |
06:03.654 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:03.654 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:03.654 INFO: ocserver: Received OC_REST_GET from client | |
06:03.654 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:03.654 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:03.654 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
06:04.653 INFO: ocserver: Inside entity handler - flags: 0x6 | |
06:04.653 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:04.653 INFO: ocserver: Received OC_REST_GET from client | |
06:04.653 INFO: ocserver: Flag includes OC_OBSERVE_FLAG | |
06:04.653 INFO: ocserver: Received OC_OBSERVE_DEREGISTER from client | |
06:04.653 INFO: ocserver: Received observation deregistration request for observation Id 244 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
06:06.655 INFO: ocserver: =====> Notifying stack of new power level 180 | |
06:06.655 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:06.655 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:06.655 INFO: ocserver: Received OC_REST_GET from client | |
06:06.655 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:06.655 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:06.655 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
06:08.654 INFO: ocserver: Inside entity handler - flags: 0x6 | |
06:08.654 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:08.654 INFO: ocserver: Received OC_REST_GET from client | |
06:08.654 INFO: ocserver: Flag includes OC_OBSERVE_FLAG | |
06:08.654 INFO: ocserver: Received OC_OBSERVE_DEREGISTER from client | |
06:08.654 INFO: ocserver: Received observation deregistration request for observation Id 248 | |
** Message: OCProcess: 0 | |
06:09.655 INFO: ocserver: =====> Notifying stack of new power level 185 | |
06:09.655 INFO: ocserver: Inside entity handler - flags: 0x2 | |
06:09.655 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:09.655 INFO: ocserver: Received OC_REST_GET from client | |
** Message: OCProcess: 0 | |
06:10.654 INFO: ocserver: Inside entity handler - flags: 0x6 | |
06:10.654 INFO: ocserver: Flag includes OC_REQUEST_FLAG | |
06:10.654 INFO: ocserver: Received OC_REST_GET from client | |
06:10.654 INFO: ocserver: Flag includes OC_OBSERVE_FLAG | |
06:10.654 INFO: ocserver: Received OC_OBSERVE_DEREGISTER from client | |
06:10.654 INFO: ocserver: Received observation deregistration request for observation Id 170 | |
** Message: OCProcess: 0 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 140 } | |
** Message: OCCancel: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
*** Error in `./out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver': double free or corruption (fasttop): 0xb3a01b88 *** | |
======= Backtrace: ========= | |
/lib/libc.so.6(+0x6ce09)[0xb7092e09] | |
/lib/libc.so.6(+0x74406)[0xb709a406] | |
/lib/libc.so.6(cfree+0x56)[0xb709e676] | |
/home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so(OICFree+0x1d)[0xb76cacf2] | |
/home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so(+0x354f2)[0xb76bb4f2] | |
/home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so(CADestroyRequestInfoInternal+0x1f)[0xb76bb614] | |
/home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so(+0x2d127)[0xb76b3127] | |
/home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so(CAHandleRequestResponseCallbacks+0x8e)[0xb76b38c9] | |
/home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so(CAHandleRequestResponse+0x23)[0xb76b2a7a] | |
/home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so(OCProcess+0x1c)[0xb76a0aa8] | |
./out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver[0x804b257] | |
/lib/libc.so.6(__libc_start_main+0xde)[0xb703de7e] | |
./out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver[0x80490f1] | |
======= Memory map: ======== | |
08048000-0804d000 r-xp 00000000 fd:03 142450 /home/nix/iot/iotivity/out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver | |
0804d000-0804e000 r--p 00004000 fd:03 142450 /home/nix/iot/iotivity/out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver | |
0804e000-0804f000 rw-p 00005000 fd:03 142450 /home/nix/iot/iotivity/out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver | |
09c30000-09c51000 rw-p 00000000 00:00 0 [heap] | |
b1600000-b1621000 rw-p 00000000 00:00 0 | |
b1621000-b1700000 ---p 00000000 00:00 0 | |
b1700000-b1721000 rw-p 00000000 00:00 0 | |
b1721000-b1800000 ---p 00000000 00:00 0 | |
b1800000-b1821000 rw-p 00000000 00:00 0 | |
b1821000-b1900000 ---p 00000000 00:00 0 | |
b19fc000-b19fd000 ---p 00000000 00:00 0 | |
b19fd000-b21fd000 rw-p 00000000 00:00 0 | |
b21fd000-b21fe000 ---p 00000000 00:00 0 | |
b21fe000-b29fe000 rw-p 00000000 00:00 0 [stack:22497] | |
b29fe000-b29ff000 ---p 00000000 00:00 0 | |
b29ff000-b31ff000 rw-p 00000000 00:00 0 [stack:22496] | |
b31ff000-b3200000 ---p 00000000 00:00 0 | |
b3200000-b3a00000 rw-p 00000000 00:00 0 [stack:22495] | |
b3a00000-b3a21000 rw-p 00000000 00:00 0 | |
b3a21000-b3b00000 ---p 00000000 00:00 0 | |
b3b00000-b3b21000 rw-p 00000000 00:00 0 | |
b3b21000-b3c00000 ---p 00000000 00:00 0 | |
b3c00000-b3c21000 rw-p 00000000 00:00 0 | |
b3c21000-b3d00000 ---p 00000000 00:00 0 | |
b3dff000-b3e00000 ---p 00000000 00:00 0 | |
b3e00000-b4600000 rw-p 00000000 00:00 0 [stack:22488] | |
b4600000-b4621000 rw-p 00000000 00:00 0 | |
b4621000-b4700000 ---p 00000000 00:00 0 | |
b4744000-b4745000 ---p 00000000 00:00 0 | |
b4745000-b4f45000 rw-p 00000000 00:00 0 [stack:22487] | |
b4f45000-b4f46000 ---p 00000000 00:00 0 | |
b4f46000-b5746000 rw-p 00000000 00:00 0 [stack:22486] | |
b5746000-b5747000 ---p 00000000 00:00 0 | |
b5747000-b5f47000 rw-p 00000000 00:00 0 [stack:22485] | |
b5f47000-b5f48000 ---p 00000000 00:00 0 | |
b5f48000-b6748000 rw-p 00000000 00:00 0 [stack:22484] | |
b6748000-b6749000 ---p 00000000 00:00 0 | |
b6749000-b6f4c000 rw-p 00000000 00:00 0 [stack:22483] | |
b6f4c000-b6fbc000 r-xp 00000000 fd:02 1059339 /usr/lib/libpcre.so.1.2.3 | |
b6fbc000-b6fbd000 ---p 00070000 fd:02 1059339 /usr/lib/libpcre.so.1.2.3 | |
b6fbd000-b6fbe000 r--p 00070000 fd:02 1059339 /usr/lib/libpcre.so.1.2.3 | |
b6fbe000-b6fbf000 rw-p 00071000 fd:02 1059339 /usr/lib/libpcre.so.1.2.3 | |
b6fbf000-b6fd6000 r-xp 00000000 fd:02 1049500 /usr/lib/libresolv-2.20.so | |
b6fd6000-b6fd7000 r--p 00016000 fd:02 1049500 /usr/lib/libresolv-2.20.so | |
b6fd7000-b6fd8000 rw-p 00017000 fd:02 1049500 /usr/lib/libresolv-2.20.so | |
b6fd8000-b6fda000 rw-p 00000000 00:00 0 | |
b6fda000-b6ffc000 r-xp 00000000 fd:02 1049458 /usr/lib/libselinux.so.1 | |
b6ffc000-b6ffd000 r--p 00021000 fd:02 1049458 /usr/lib/libselinux.so.1 | |
b6ffd000-b6ffe000 rw-p 00022000 fd:02 1049458 /usr/lib/libselinux.so.1 | |
b6ffe000-b7000000 rw-p 00000000 00:00 0 | |
b7000000-b7016000 r-xp 00000000 fd:02 1052613 /usr/lib/libz.so.1.2.8 | |
b7016000-b7017000 r--p 00015000 fd:02 1052613 /usr/lib/libz.so.1.2.8 | |
b7017000-b7018000 rw-p 00016000 fd:02 1052613 /usr/lib/libz.so.1.2.8 | |
b7018000-b701b000 r-xp 00000000 fd:02 1049167 /usr/lib/libgmodule-2.0.so.0.4200.2 | |
b701b000-b701c000 r--p 00002000 fd:02 1049167 /usr/lib/libgmodule-2.0.so.0.4200.2 | |
b701c000-b701d000 rw-p 00003000 fd:02 1049167 /usr/lib/libgmodule-2.0.so.0.4200.2 | |
b701d000-b7023000 r-xp 00000000 fd:02 1049082 /usr/lib/libffi.so.6.0.2 | |
b7023000-b7024000 ---p 00006000 fd:02 1049082 /usr/lib/libffi.so.6.0.2 | |
b7024000-b7025000 r--p 00006000 fd:02 1049082 /usr/lib/libffi.so.6.0.2 | |
b7025000-b7026000 rw-p 00007000 fd:02 1049082 /usr/lib/libffi.so.6.0.2 | |
b7026000-b71eb000 r-xp 00000000 fd:02 1048893 /usr/lib/libc-2.20.so | |
b71eb000-b71ee000 r--p 001c4000 fd:02 1048893 /usr/lib/libc-2.20.so | |
b71ee000-b71f0000 rw-p 001c7000 fd:02 1048893 /usr/lib/libc-2.20.so | |
b71f0000-b71f2000 rw-p 00000000 00:00 0 | |
b71f2000-b720e000 r-xp 00000000 fd:02 1058544 /usr/lib/libgcc_s-4.9.2-20150212.so.1 | |
b720e000-b720f000 r--p 0001b000 fd:02 1058544 /usr/lib/libgcc_s-4.9.2-20150212.so.1 | |
b720f000-b7210000 rw-p 0001c000 fd:02 1058544 /usr/lib/libgcc_s-4.9.2-20150212.so.1 | |
b7210000-b7211000 rw-p 00000000 00:00 0 | |
b7211000-b725c000 r-xp 00000000 fd:02 1049026 /usr/lib/libm-2.20.so | |
b725c000-b725d000 r--p 0004b000 fd:02 1049026 /usr/lib/libm-2.20.so | |
b725d000-b725e000 rw-p 0004c000 fd:02 1049026 /usr/lib/libm-2.20.so | |
b725e000-b7349000 r-xp 00000000 fd:02 1049597 /usr/lib/libstdc++.so.6.0.20 | |
b7349000-b734d000 r--p 000eb000 fd:02 1049597 /usr/lib/libstdc++.so.6.0.20 | |
b734d000-b734e000 rw-p 000ef000 fd:02 1049597 /usr/lib/libstdc++.so.6.0.20 | |
b734e000-b7355000 rw-p 00000000 00:00 0 | |
b7355000-b7496000 r-xp 00000000 fd:02 1049162 /usr/lib/libglib-2.0.so.0.4200.2 | |
b7496000-b7497000 r--p 00140000 fd:02 1049162 /usr/lib/libglib-2.0.so.0.4200.2 | |
b7497000-b7498000 rw-p 00141000 fd:02 1049162 /usr/lib/libglib-2.0.so.0.4200.2 | |
b7498000-b74e9000 r-xp 00000000 fd:02 1049180 /usr/lib/libgobject-2.0.so.0.4200.2 | |
b74e9000-b74ea000 ---p 00051000 fd:02 1049180 /usr/lib/libgobject-2.0.so.0.4200.2 | |
b74ea000-b74eb000 r--p 00051000 fd:02 1049180 /usr/lib/libgobject-2.0.so.0.4200.2 | |
b74eb000-b74ec000 rw-p 00052000 fd:02 1049180 /usr/lib/libgobject-2.0.so.0.4200.2 | |
b74ec000-b7671000 r-xp 00000000 fd:02 1049155 /usr/lib/libgio-2.0.so.0.4200.2 | |
b7671000-b7674000 r--p 00184000 fd:02 1049155 /usr/lib/libgio-2.0.so.0.4200.2 | |
b7674000-b7675000 rw-p 00187000 fd:02 1049155 /usr/lib/libgio-2.0.so.0.4200.2 | |
b7675000-b7676000 rw-p 00000000 00:00 0 | |
b7676000-b767d000 r-xp 00000000 fd:02 1049531 /usr/lib/librt-2.20.so | |
b767d000-b767e000 r--p 00006000 fd:02 1049531 /usr/lib/librt-2.20.so | |
b767e000-b767f000 rw-p 00007000 fd:02 1049531 /usr/lib/librt-2.20.so | |
b767f000-b7680000 rw-p 00000000 00:00 0 | |
b7680000-b7684000 r-xp 00000000 fd:02 1052489 /usr/lib/libuuid.so.1.3.0 | |
b7684000-b7685000 r--p 00003000 fd:02 1052489 /usr/lib/libuuid.so.1.3.0 | |
b7685000-b7686000 rw-p 00004000 fd:02 1052489 /usr/lib/libuuid.so.1.3.0 | |
b7686000-b76ee000 r-xp 00000000 fd:03 11535 /home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so | |
b76ee000-b76ef000 r--p 00068000 fd:03 11535 /home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so | |
b76ef000-b76f1000 rw-p 00069000 fd:03 11535 /home/nix/iot/iotivity/out/linux/x86/release/liboctbstack.so | |
b76f1000-b76f2000 rw-p 00000000 00:00 0 | |
b76f2000-b7709000 r-xp 00000000 fd:02 1049425 /usr/lib/libpthread-2.20.so | |
b7709000-b770a000 r--p 00016000 fd:02 1049425 /usr/lib/libpthread-2.20.so | |
b770a000-b770b000 rw-p 00017000 fd:02 1049425 /usr/lib/libpthread-2.20.so | |
b770b000-b770d000 rw-p 00000000 00:00 0 | |
b770d000-b7710000 r-xp 00000000 fd:02 1049003 /usr/lib/libdl-2.20.so | |
b7710000-b7711000 r--p 00002000 fd:02 1049003 /usr/lib/libdl-2.20.so | |
b7711000-b7712000 rw-p 00003000 fd:02 1049003 /usr/lib/libdl-2.20.so | |
b7731000-b7734000 rw-p 00000000 00:00 0 | |
b7734000-b7736000 r--p 00000000 00:00 0 [vvar] | |
b7736000-b7737000 r-xp 00000000 00:00 0 [vdso] | |
b7737000-b7759000 r-xp 00000000 fd:02 1057959 /usr/lib/ld-2.20.so | |
b7759000-b775a000 r--p 00021000 fd:02 1057959 /usr/lib/ld-2.20.so | |
b775a000-b775b000 rw-p 00022000 fd:02 1057959 /usr/lib/ld-2.20.so | |
bfb1f000-bfb40000 rw-p 00000000 00:00 0 [stack] | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
observe: response: | |
observe: ->devAddr: | |
observe: ->devAddr.adapter: 1 | |
observe: ->devAddr.flags: 32 | |
observe: ->devAddr.interface: 3 | |
observe: ->devAddr.port: 37168 | |
observe: ->devAddr.addr: fe80::a288:b4ff:fe17:d0c8 | |
observe: response->payload: present | |
observe: response->payload->type: 4 | |
observe: payload values: { state: false, power: 145 } | |
** Message: OCCancel: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
** Message: OCProcess: 0 | |
^C** Message: Cleaning up and exiting | |
** Message: OCStop: 0 | |
[1]+ Aborted (core dumped) ./out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver -o 0 | |
[13:06][nix@boundary][/home/nix/iot/iotivity]/$ gdb out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver core.22480 | |
GNU gdb (GDB) Fedora 7.8.2-39.fc21 | |
Copyright (C) 2014 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "i686-redhat-linux-gnu". | |
Type "show configuration" for configuration details. | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>. | |
Find the GDB manual and other documentation resources online at: | |
<http://www.gnu.org/software/gdb/documentation/>. | |
For help, type "help". | |
Type "apropos word" to search for commands related to "word"... | |
Reading symbols from out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver...done. | |
[New LWP 22480] | |
[New LWP 22485] | |
[New LWP 22487] | |
[New LWP 22496] | |
[New LWP 22495] | |
[New LWP 22483] | |
[New LWP 22497] | |
[New LWP 22488] | |
[New LWP 22484] | |
[New LWP 22486] | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/libthread_db.so.1". | |
Core was generated by `./out/linux/x86/release/resource/csdk/stack/samples/linux/SimpleClientServer/oc'. | |
Program terminated with signal SIGABRT, Aborted. | |
#0 0xb7736bc0 in __kernel_vsyscall () | |
Missing separate debuginfos, use: debuginfo-install glib2-2.42.2-1.fc21.i686 glibc-2.20-8.fc21.i686 libffi-3.1-7.fc21.i686 libgcc-4.9.2-6.fc21.i686 libselinux-2.3-10.fc21.i686 libstdc++-4.9.2-6.fc21.i686 libuuid-2.25.2-3.fc21.i686 pcre-8.35-12.fc21.i686 zlib-1.2.8-7.fc21.i686 | |
(gdb) bt | |
#0 0xffffffff in __kernel_vsyscall () | |
#1 0xffffffff in raise () at /lib/libc.so.6 | |
#2 0xffffffff in abort () at /lib/libc.so.6 | |
#3 0xffffffff in () at /lib/libc.so.6 | |
#4 0xffffffff in _int_free () at /lib/libc.so.6 | |
#5 0xffffffff in free () at /lib/libc.so.6 | |
#6 0xffffffff in OICFree (ptr=0xb3a01b88) at resource/c_common/oic_malloc/src/oic_malloc.c:135 | |
#7 0xffffffff in CADestroyInfoInternal (info=info@entry=0xb3a01b2c) at resource/csdk/connectivity/common/src/caremotehandler.c:173 | |
#8 0xffffffff in CADestroyRequestInfoInternal (rep=0xb3a01b28) at resource/csdk/connectivity/common/src/caremotehandler.c:195 | |
#9 0xffffffff in CADestroyData (data=0xb3a008d0, size=24) at resource/csdk/connectivity/src/camessagehandler.c:338 | |
#10 0xffffffff in CAHandleRequestResponseCallbacks () at resource/csdk/connectivity/src/camessagehandler.c:873 | |
#11 0xffffffff in CAHandleRequestResponse () at resource/csdk/connectivity/src/caconnectivitymanager.c:375 | |
#12 0xffffffff in OCProcess () at resource/csdk/stack/src/ocstack.c:2739 | |
#13 0x0804b257 in main(int, char**) (argc=3, argv=0xbfb3e534) | |
at resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp:1055 | |
(gdb) quit | |
[13:06][nix@boundary][/home/nix/iot/iotivity]/$ git show | |
commit ff5227bf023da4e9c07af99d77ddcfc02bb995a8 | |
Author: Mandeep Shetty <[email protected]> | |
Date: Thu Sep 24 13:42:39 2015 -0700 | |
Fix segfault when calling OCCancel () | |
This fixes the client side crash in IOT-733. | |
OCCancel () allocates a pointer that is free'd in routingutility.c. | |
Although the pointer was passed in as reference into routingutility and | |
is re-assigned with a new malloc'ed pointer, OCCancel() free's the old | |
pointer. | |
This is because there two structs that are being passed around. The | |
pointer that is double free'd is free'd twice as part of two DIFFERENT | |
structs. Got rid of the extra struct to keep things consistent and | |
resolve the crash. | |
If accepted, this changeset should be cherrypicked to 1.0.0-dev. | |
Change-Id: I8c961776406c02dbe7706a787bb19db53ba83853 | |
Signed-off-by: Mandeep Shetty <[email protected]> | |
diff --git a/resource/csdk/stack/src/ocstack.c b/resource/csdk/stack/src/ocstack.c | |
index e8f89e4..f6d2e70 100644 | |
--- a/resource/csdk/stack/src/ocstack.c | |
+++ b/resource/csdk/stack/src/ocstack.c | |
@@ -2534,7 +2534,6 @@ OCStackResult OCCancel(OCDoHandle handle, OCQualityOfService qos, OCHeaderOption | |
*/ | |
OCStackResult ret = OC_STACK_OK; | |
CAEndpoint_t endpoint = {.adapter = CA_DEFAULT_ADAPTER}; | |
- CAInfo_t requestData = {.type = CA_MSG_CONFIRM}; | |
CARequestInfo_t requestInfo = {.method = CA_GET}; | |
if(!handle) | |
@@ -2545,14 +2544,15 @@ OCStackResult OCCancel(OCDoHandle handle, OCQualityOfService qos, OCHeaderOption | |
ClientCB *clientCB = GetClientCB(NULL, 0, handle, NULL); | |
[13:06][nix@boundary][/home/nix/iot/iotivity]/$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment