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

Commit

Permalink
OicServer: Do not set resourceUri and and ehResult twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Nov 2, 2015
1 parent cbe691c commit 5291520
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/OicServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ _.extend( OicRequestEvent.prototype, {
} : null ),
sendVendorSpecificHeaderOptions: headerOptions,

// FIXME: This url should be a FQDN or COAP URL ?
resourceUri: iotivity.OCGetResourceUri( this.target ),
resourceUri: ( iotivity.OCGetResourceUri( this.target ) || "" ),
ehResult: iotivity.OCEntityHandlerResult.OC_EH_OK
};

Expand All @@ -41,9 +40,6 @@ _.extend( OicRequestEvent.prototype, {
};
}

oicResponse.resourceUri = iotivity.OCGetResourceUri( this.target );
oicResponse.ehResult = iotivity.OCEntityHandlerResult.OC_EH_OK;

var ret = iotivity.OCDoResponse( oicResponse );
if ( ret !== iotivity.OCStackResult.OC_STACK_OK ) {
reject( "OCDoResponse Error" );
Expand Down

0 comments on commit 5291520

Please sign in to comment.