Skip to content

Commit

Permalink
much better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax committed Oct 12, 2023
1 parent 3866ac9 commit 5dd6186
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 8 additions & 0 deletions core/pubnub_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,14 @@ static pubnub_bymebl_t provider_encrypt(struct pubnub_crypto_provider_t const* p

memcpy(result.ptr + header_size, encrypted_data->data.ptr, encrypted_data->data.size);

#if PUBNUB_LOG_LEVEL >= PUBNUB_LOG_LEVEL_DEBUG
PUBNUB_LOG_DEBUG("\nbytes to decrypt = [");
for (size_t i = 0; i < result.size; i++) {
PUBNUB_LOG_DEBUG("%d ", result.ptr[i]);
}
PUBNUB_LOG_DEBUG("]\n");
#endif

free(header_block->ptr);
free(header_block);

Expand Down
2 changes: 0 additions & 2 deletions cpp/samples/pubnub_crypto_module_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ int main()
return -1;
}

std::this_thread::sleep_for(std::chrono::seconds(10));

if (PNR_OK == pb.subscribe(chan).await()) {
auto messages = pb.get_all();
for (auto const& m : messages) {
Expand Down

0 comments on commit 5dd6186

Please sign in to comment.