Closed slaft closed 5 months ago
Hi @slaft, Good Catch ! and Thx a lot for taking time to report that :pray:
Following your explanation and reading the code I pretty sure you're right.
I'm gonna fix that.
Do you try your fix and does it solves your issue ?
Thanks. I've just tested it, yes it does solve the issue.
It is fixed in master
and will be available in 2.0.0-M15.
Hi, I'm testing the future 2.0.0-M15 (from the nightly build).
I use the Leshan client to test the server part (based on Leshan). The Leshan client is configured with an instance of
LwM2mTestObject
and aResourceListener
. I send aWriteRequest
from the server:The LwM2mTestObject initially has 1 instance of the resource 1120 (id: 0, value: 1024), so I expect to be notified for change (in the ResourceListener) for:
/3442/0/1120/0
,/3442/0/1120/1
(and/3442/0/1120
which is something new compared to 2.0.0-M14). But/3442/0/1120/1
is missing from the notification (the instance is nevertheless created).https://github.com/eclipse-leshan/leshan/blob/dceda02a1fd6f99c93b6742c49fc98e5cdb89ddc/leshan-client-core/src/main/java/org/eclipse/leshan/client/resource/SimpleInstanceEnabler.java#L127-L133 I guess that the issue is just that it should be
previousValue
insteadnewValue
on L128.