Skip to content

Commit

Permalink
Add missing stubs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Nov 16, 2021
1 parent f3590f3 commit 0d0a369
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/persist_read_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,11 @@ void db__msg_add_to_queued_stats(struct mosquitto_msg_data *msg_data, struct mos
UNUSED(msg_data);
UNUSED(msg);
}

void context__add_to_by_id(struct mosquitto *context)
{
if(context->in_by_id == false){
context->in_by_id = true;
HASH_ADD_KEYPTR(hh_id, db.contexts_by_id, context->id, strlen(context->id), context);
}
}
8 changes: 8 additions & 0 deletions test/unit/persist_write_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,11 @@ int send__pubrel(struct mosquitto *mosq, uint16_t mid, const mosquitto_property

return MOSQ_ERR_SUCCESS;
}

void context__add_to_by_id(struct mosquitto *context)
{
if(context->in_by_id == false){
context->in_by_id = true;
HASH_ADD_KEYPTR(hh_id, db.contexts_by_id, context->id, strlen(context->id), context);
}
}

0 comments on commit 0d0a369

Please sign in to comment.