Zerocopy Direct API: Do not change UNREG to REG mode after registration
With the introduction of a new boolean variable inside CkNcpyBuffer,
called isRegistered, the registration management can be controlled without
the change in the user specified mode. With this change, the RTS internally
uses the value of isRegistered to avoid unnecessary registration and
de-registration. The user specified mode remains unchanged.
This fix also updates the example programs to test de-registration using the
CkNcpyBuffer received in the callback method. The examples are also updated
to not store the CkNcpyBuffer objects, wherever applicable, as data members
in the class as they are now received as a part of the CkDataMsg in the
CkCallback.
Change-Id: I896c7002284b7aab447ad5e3bd41cf709814d218
26 files changed: