Merge pull request #7612 from bergzand/gcoap/core-link-fix
gcoap: fix resource separator inserting
This commit is contained in:
commit
5c65711fa4
@ -827,7 +827,7 @@ int gcoap_get_resource_list(void *buf, size_t maxlen, uint8_t cf)
|
||||
if ((pos + path_len + 3) > maxlen) {
|
||||
break;
|
||||
}
|
||||
if (i) {
|
||||
if (pos) {
|
||||
out[pos++] = ',';
|
||||
}
|
||||
out[pos++] = '<';
|
||||
@ -836,7 +836,7 @@ int gcoap_get_resource_list(void *buf, size_t maxlen, uint8_t cf)
|
||||
out[pos++] = '>';
|
||||
}
|
||||
else {
|
||||
pos += (i) ? 3 : 2;
|
||||
pos += (pos) ? 3 : 2;
|
||||
pos += path_len;
|
||||
}
|
||||
++resource;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user