Skip to content

Commit c4842c1

Browse files
pearsonnashif
authored andcommitted
net: openthread: add log_strdup to role text, fix doc gender issue
- Add a `log_strdup` to the role text output for logging V1 compatibility - Fix style issues - Change where the documentation refers to an OpenThread device as "himself" to "itself" Signed-off-by: Chris Pearson <[email protected]>
1 parent b8dff13 commit c4842c1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

samples/net/lwm2m_client/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ networking do the following:
214214
:compact:
215215

216216
Note: If not provisioned (fully erased before flash), device will form
217-
new OpenThread network and promote himself as leader (Current role: leader).
217+
new OpenThread network and promote itself to leader (Current role: leader).
218218
To join into already existing OT network, either enable CONFIG_OPENTHREAD_JOINER=y
219219
and CONFIG_OPENTHREAD_JOINER_AUTOSTART=y and send join request from other
220220
already joined device with joiner capabilities, or provision it manually

subsys/net/l2/openthread/openthread.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ static void ot_state_changed_handler(uint32_t flags, void *context)
169169
struct openthread_context *ot_context = context;
170170

171171
NET_INFO("State changed! Flags: 0x%08" PRIx32 " Current role: %s",
172-
flags, otThreadDeviceRoleToString( otThreadGetDeviceRole(ot_context->instance)));
172+
flags,
173+
log_strdup(otThreadDeviceRoleToString(otThreadGetDeviceRole(ot_context->instance)))
174+
);
173175

174176
if (flags & OT_CHANGED_IP6_ADDRESS_REMOVED) {
175177
NET_DBG("Ipv6 address removed");

0 commit comments

Comments
 (0)