Skip to content

Question about otSrpClientSetHostName() #8181

Closed Answered by jwhui
OlivierGre asked this question in Q&A
Discussion options

You must be logged in to vote

The SRP Client only maintains a pointer to the host name provided by the caller. As a result, the caller must maintain the buffer while the host name is in use. As the comment mentions, the first call to otSrpClientSetHostName() simply checks whether we can set the host name successfully.

// We first make sure we can set the name, and if so
// we copy it to the persisted string buffer and set
// the host name again now with the persisted buffer.
// This ensures that we do not overwrite a previous
// buffer with a host name that cannot be set.

However, the first call will set the pointer…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@OlivierGre
Comment options

Answer selected by jwhui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants