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

Commit

Permalink
Server: Correctly handle multiple types/interfaces
Browse files Browse the repository at this point in the history
Change-Id: Ieddfd71bec6222757041b0d95a770068ea9f205c
  • Loading branch information
Gabriel Schulhof committed Oct 17, 2016
1 parent 26ca385 commit 7878383
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Server.js
Expand Up @@ -72,7 +72,7 @@ function bindStringsToResource( resource, strings, binder, reject ) {
var index, result, errorMessage;
var extension = {};

for ( index = 1; index < strings.length; index++ ) {
for ( index = 0; index < strings.length; index++ ) {
result = csdk[ binder ](
resource._private.handle, strings[ index ] );
if ( result !== csdk.OCStackResult.OC_STACK_OK ) {
Expand Down Expand Up @@ -216,7 +216,7 @@ _.extend( Server.prototype, {
if ( !( bindStringsToResource( resource, init.resourceTypes.slice( 1 ),
"OCBindResourceTypeToResource", reject ) &&
bindStringsToResource( resource, init.interfaces.slice( 1 ),
"OCBindInterfaceToResource", reject ) ) ) {
"OCBindResourceInterfaceToResource", reject ) ) ) {
return;
}

Expand Down

0 comments on commit 7878383

Please sign in to comment.