Skip to content

Commit

Permalink
[linkkit gateway] cancel memset linkkit_gateway_ctx to 0 when linkkit…
Browse files Browse the repository at this point in the history
…_gateway_start
  • Loading branch information
yuhao.tyh authored and Yang, Xiao committed Aug 7, 2018
1 parent 242d6a9 commit aa68707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/linkkit/dm/linkkit_gateway_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,6 @@ int linkkit_gateway_start(linkkit_cbs_t *cbs, void *ctx)
return SUCCESS_RETURN;
}

memset(linkkit_gateway_ctx,0,sizeof(linkkit_gateway_legacy_ctx_t));
linkkit_gateway_ctx->is_inited = 1;
linkkit_gateway_ctx->is_started = 1;

Expand Down Expand Up @@ -1195,6 +1194,7 @@ int linkkit_gateway_stop(int devid)
HAL_MutexDestroy(linkkit_gateway_ctx->upstream_mutex);
HAL_MutexDestroy(linkkit_gateway_ctx->mutex);

memset(linkkit_gateway_ctx,0,sizeof(linkkit_gateway_legacy_ctx_t));
return SUCCESS_RETURN;
}

Expand Down

0 comments on commit aa68707

Please sign in to comment.