You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by "PengZheng (via GitHub)" <gi...@apache.org> on 2023/11/01 01:58:12 UTC
Re: [PR] type support for properties (celix)
PengZheng commented on code in PR #470:
URL: https://github.com/apache/celix/pull/470#discussion_r1378319542
##########
bundles/remote_services/discovery_zeroconf/src/discovery_zeroconf_announcer.c:
##########
@@ -342,11 +342,9 @@ static void discoveryZeroconfAnnouncer_revokeEndpoints(discovery_zeroconf_announ
static bool discoveryZeroconfAnnouncer_copyPropertiesToTxtRecord(discovery_zeroconf_announcer_t *announcer, celix_properties_iterator_t *propIter, TXTRecordRef *txtRecord, uint16_t maxTxtLen, bool splitTxtRecord) {
const char *key;
const char *val;
- celix_properties_t *props;
- while (celix_propertiesIterator_hasNext(propIter)) {
- key = celix_propertiesIterator_nextKey(propIter);
- props = celix_propertiesIterator_properties(propIter);
- val = celix_properties_get(props, key, "");
+ while (!celix_propertiesIterator_isEnd(propIter)) {
+ key = propIter->key;
+ val = propIter->entry.value;
Review Comment:
> When adding a property with a string value if NULL, a empty string ("") will be used instead using the celix_properties_createString function
This is nice and improves general user experience.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org