Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeuz committed Aug 8, 2024
1 parent de33e7e commit 14875e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion communication/src/spark_protocol_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ bool spark_protocol_send_event(ProtocolFacade* protocol, const char *event_name,
int ttl, uint32_t flags, void* reserved) {
ASSERT_ON_SYSTEM_THREAD();
CompletionHandler handler;
std::optional<size_t> data_size = 0;
std::optional<size_t> data_size;
int content_type = (int)CoapContentFormat::TEXT_PLAIN;
if (reserved) {
auto r = static_cast<const spark_protocol_send_event_data*>(reserved);
Expand Down
2 changes: 1 addition & 1 deletion system/src/system_cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ bool spark_subscribe(const char* event_name, EventHandler handler, void* handler
{
SYSTEM_THREAD_CONTEXT_SYNC(spark_subscribe(event_name, handler, handler_data, scope_deprecated, device_id_deprecated, param));
int flags = 0;
if (param && param->flags & SUBSCRIBE_FLAG_BINARY_DATA) {
if (param && (param->flags & SUBSCRIBE_FLAG_BINARY_DATA)) {
flags |= SubscriptionFlag::BINARY_DATA;
}
bool ok = spark_protocol_add_event_handler(sp, event_name, handler, flags, nullptr /* device_id_deprecated */, handler_data);
Expand Down

0 comments on commit 14875e5

Please sign in to comment.