hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
153 stars 82 forks source link

fix reading encrypted frames that don't line up with network frames #64

Closed ccutrer closed 5 years ago

ccutrer commented 5 years ago

we want to call step again if there's remaining data. pos + toWrite is what we consumed from this network frame to complete the encrypted frame. so if it's less than the total network frame (data.length), then call step again.

timcharper commented 5 years ago

@beowulfe any chance you can grant me reviewing powers ? I'd like to give this a +1

andylintner commented 5 years ago

Thanks @ccutrer - this is a great fix! Could be the cause of a quite a few odd issues!

@timcharper - looks like I can't give granular permissions on a personal repo. But Inacknowledge your +1 :)

timcharper commented 5 years ago

I'm really rather wondering if the window covering bug was triggered with this! And removing the other characteristics caused it to stop triggering it.

It was failing in fantastic ways. Such a great fix!!!

@beowulfe do you feel like we're ready for a new point release? I'd like to start merging my openhab changes and integrating into master.

ccutrer commented 5 years ago

I'd like to get https://github.com/ccutrer/HAP-Java/commit/1544779aa4acb2e7519d0d2e7f7aad6297831473 (or some variation thereof) merged before a new point release. It was far easier to remove the LowBatteryStatusAccessory rather than trying to keep it compatible-but-deprecated. See #70.

timcharper commented 5 years ago

I'll move the discussion there :)