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

Commit

Permalink
oic: Call callback when timeout is reached
Browse files Browse the repository at this point in the history
In sol_oic_client_get_server_info, callback needs to be called when
timeout is reached, so users can perform any cleaning operation. This is
the same behavior from other equivalent methods, as
sol_oic_client_find_resource()

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
  • Loading branch information
Otavio Pontes committed Dec 2, 2015
1 parent 413f46a commit ca5497d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/comms/sol-oic-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ _server_info_reply_cb(struct sol_coap_server *server,
uint16_t payload_len;
struct sol_oic_server_information info = { 0 };

if (!req || !cliaddr)
if (!req || !cliaddr) {
ctx->cb(ctx->client, NULL, ctx->data);
goto free_ctx;
}

if (!ctx->cb) {
SOL_WRN("No user callback provided");
Expand Down

0 comments on commit ca5497d

Please sign in to comment.