telefonicaid / lwm2m-node-lib

Library for building OMA Lightweight M2M Applications (client and server).
74 stars 44 forks source link

Observe operation must return the actual value of the resource #128

Closed dcalvoalonso closed 6 years ago

dcalvoalonso commented 6 years ago

As it is explained in http://www.openmobilealliance.org/release/LightweightM2M/V1_0-20170208-A/OMA-TS-LightweightM2M-V1_0-20170208-A.pdf,

In the message sent by a LwM2M Client in response to an “Observe” operation, the current Resource value is reported; this event can be considered as the initial notification.

Nevertheless, in https://github.com/telefonicaid/lwm2m-node-lib/blob/master/lib/services/server/informationReporting.jsL#117, the server does not use the value reported by the client. This function considers the first piece of data as the received by the first notification.

fgalan commented 6 years ago

It seems that github has closed this automatically, as the issue number as mentioned in a commit in a fork repository.

I understand it is better to keep the issue opened while that fix lands into master repository. What do you think @dcalvoalonso ?

dcalvoalonso commented 6 years ago

Hi @fgalan! After some further research, I discovered that https://github.com/telefonicaid/lwm2m-node-lib/blob/master/lib/services/server/informationReporting.js#L125 receives also the actual value of the resource. For that reason, I decided to close the issue. Sorry, I should have explained this with a comment. If you agree, we can close it again.

fgalan commented 6 years ago

Agreed. Closing.