Function anjay_est_state_restore

Function Documentation

avs_error_t anjay_est_state_restore(anjay_t *anjay, avs_stream_t *out_stream)

Attempts to restore EST state from specified in_stream . If restore fails, then the state will be left untouched.

NOTE: This function is intended to be called during client initializaiton, before entering the main event loop. If EST state is restored while server connections are already active, the new credentials will not be applied until a full reconnect with a given server, which requires either anjay_disable_server to be called, or a connection error to occur.

Parameters:
  • anjay – Anjay instance.

  • out_stream – Stream to write to.

Returns:

AVS_OK in case of success, or an error code. NOTE: State cannot be restored if EST operation is in progress. avs_errno(AVS_EAGAIN) will be returned in such case.