Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
All: Build against 809b1b1e9be15724a6d756b403328a95894e639f
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Jun 5, 2015
1 parent b7f1198 commit 67bedf5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
5 changes: 4 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"<!(node -e \"require('nan')\")"
],
"libraries": [ '<!(pkg-config --libs octbstack)' ],
"cflags": [ '<!(pkg-config --cflags octbstack)' ]
"cflags": [
'<!(pkg-config --cflags octbstack)',
'-std=c++11'
]
},
"targets": [
{
Expand Down
2 changes: 1 addition & 1 deletion js/client.observe.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function getAbsoluteUrl( response ) {

return "coap://" +
ipv4Bytes[ 0 ] + "." + ipv4Bytes[ 1 ] + "." + ipv4Bytes[ 2 ] + "." + ipv4Bytes[ 3 ] + ":" +
portHolder.port + JSON.parse( response.resJSONPayload ).oc[ 0 ].href;
portHolder.port + JSON.parse( response.resJSONPayload ).oic[ 0 ].href;
}

iotivity.OCInit( null, 0, iotivity.OCMode.OC_CLIENT );
Expand Down
2 changes: 1 addition & 1 deletion js/server.observe.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ iotivity.OCCreateResource(
}
} );

console.log( "OCCreateResource() handler: Entering" );
console.log( "OCCreateResource() handler: Responding with " + payload );
iotivity.OCDoResponse( {
requestHandle: request.requestHandle.handle,
resourceHandle: request.resource.handle,
Expand Down
11 changes: 5 additions & 6 deletions src/enums.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ using namespace v8;
static Local<Object> bind_OCEntityHandlerFlag() {
Local<Object> returnValue = NanNew<Object>();

returnValue->ForceSet(NanNew<String>("OC_INIT_FLAG"),
NanNew<Number>(OC_INIT_FLAG),
static_cast<PropertyAttribute>(ReadOnly || DontDelete));
returnValue->ForceSet(NanNew<String>("OC_REQUEST_FLAG"),
NanNew<Number>(OC_REQUEST_FLAG),
static_cast<PropertyAttribute>(ReadOnly || DontDelete));
Expand Down Expand Up @@ -43,6 +40,9 @@ static Local<Object> bind_OCEntityHandlerResult() {
returnValue->ForceSet(NanNew<String>("OC_EH_FORBIDDEN"),
NanNew<Number>(OC_EH_FORBIDDEN),
static_cast<PropertyAttribute>(ReadOnly || DontDelete));
returnValue->ForceSet(NanNew<String>("OC_EH_RESOURCE_NOT_FOUND"),
NanNew<Number>(OC_EH_RESOURCE_NOT_FOUND),
static_cast<PropertyAttribute>(ReadOnly || DontDelete));

return returnValue;
}
Expand Down Expand Up @@ -296,10 +296,9 @@ static Local<Object> bind_OCVirtualResources() {
static Local<Object> bind_OCConnectivityType() {
Local<Object> returnValue = NanNew<Object>();

returnValue->ForceSet(NanNew<String>("OC_ETHERNET"),
NanNew<Number>(OC_ETHERNET),
returnValue->ForceSet(NanNew<String>("OC_IPV4"), NanNew<Number>(OC_IPV4),
static_cast<PropertyAttribute>(ReadOnly || DontDelete));
returnValue->ForceSet(NanNew<String>("OC_WIFI"), NanNew<Number>(OC_WIFI),
returnValue->ForceSet(NanNew<String>("OC_IPV6"), NanNew<Number>(OC_IPV6),
static_cast<PropertyAttribute>(ReadOnly || DontDelete));
returnValue->ForceSet(NanNew<String>("OC_EDR"), NanNew<Number>(OC_EDR),
static_cast<PropertyAttribute>(ReadOnly || DontDelete));
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/simple-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ test( "Simple client", function( assert ) {

// Make sure the callback was called with the right response
assert.deepEqual(
JSON.parse( response.resJSONPayload ).oc[ 0 ],
JSON.parse( response.resJSONPayload ).oic[ 0 ],
magicToken,
"OCDoResource observation handler has received the " +
"expected response" );
Expand Down

0 comments on commit 67bedf5

Please sign in to comment.