-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
espidf added flush, clean task stop , commented out crashing debug log #362
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -647,6 +647,7 @@ int8_t z_put(z_session_t zs, z_keyexpr_t keyexpr, const uint8_t *payload, z_zint | |
#endif | ||
); | ||
|
||
#if Z_FEATURE_SUBSCRIPTION == 1 | ||
// Trigger local subscriptions | ||
_z_trigger_local_subscriptions(&zs._val.in->val, keyexpr, payload, payload_len, | ||
_z_n_qos_make(0, opt.congestion_control == Z_CONGESTION_CONTROL_BLOCK, opt.priority) | ||
|
@@ -655,7 +656,7 @@ int8_t z_put(z_session_t zs, z_keyexpr_t keyexpr, const uint8_t *payload, z_zint | |
opt.attachment | ||
#endif | ||
); | ||
|
||
#endif | ||
return ret; | ||
} | ||
|
||
|
@@ -746,15 +747,15 @@ int8_t z_publisher_put(const z_publisher_t pub, const uint8_t *payload, size_t l | |
opt.attachment | ||
#endif | ||
); | ||
|
||
#if Z_FEATURE_SUBSCRIPTION == 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You shouldn't need this because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see comment above, it doesn´t compile. Feels like code was tested with this feature off. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No it's definitely tested with both in CI, I recall you use C++ to compile, so maybe this is the source of our compilation diverging behavior. |
||
// Trigger local subscriptions | ||
_z_trigger_local_subscriptions(&pub._val->_zn.in->val, pub._val->_key, payload, len, _Z_N_QOS_DEFAULT | ||
#if Z_FEATURE_ATTACHMENT == 1 | ||
, | ||
opt.attachment | ||
#endif | ||
); | ||
|
||
#endif | ||
return ret; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,8 +184,11 @@ int8_t _z_trigger_subscriptions(_z_session_t *zn, const _z_keyexpr_t keyexpr, co | |
#if Z_FEATURE_MULTI_THREAD == 1 | ||
zp_mutex_lock(&zn->_mutex_inner); | ||
#endif // Z_FEATURE_MULTI_THREAD == 1 | ||
#if Z_FEATURE_SUBSCRIPTION == 1 | ||
|
||
_Z_DEBUG("Resolving %d - %s on mapping 0x%x", keyexpr._id, keyexpr._suffix, _z_keyexpr_mapping_id(&keyexpr)); | ||
// _Z_DEBUG(" %x - %s", keyexpr._id, keyexpr._suffix); | ||
// _Z_DEBUG("Resolving %d - %s on mapping 0x%x", keyexpr._id, keyexpr._suffix, _z_keyexpr_mapping_id(&keyexpr)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't comment the debug lines. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand these pose issues when receiving something without a suffix, then I suggest you something like: _Z_DEBUG("Resolving %d on mapping 0x%x", keyexpr._id, _z_keyexpr_mapping_id(&keyexpr));
_z_keyexpr_t key = __unsafe_z_get_expanded_key_from_key(zn, &keyexpr);
if (key._suffix != NULL) {
_Z_DEBUG("Triggering subs for %d - %s", key._id, key._suffix);
_z_subscription_rc_list_t *subs = __unsafe_z_get_subscriptions_by_key(zn, _Z_RESOURCE_IS_LOCAL, key); |
||
#endif | ||
_z_keyexpr_t key = __unsafe_z_get_expanded_key_from_key(zn, &keyexpr); | ||
_Z_DEBUG("Triggering subs for %d - %s", key._id, key._suffix); | ||
if (key._suffix != NULL) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one, I'd say we should either have all the feature token in the file or none.
Did you need this for a reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to remember that otherwise it didn´t compile with Z_FEATURE_SUBSCRIPTION=0