diff options
author | Nikias Bassen | 2022-05-10 12:44:55 +0200 |
---|---|---|
committer | Nikias Bassen | 2022-05-10 12:44:55 +0200 |
commit | 5722838a8ed8d42200c82831f166eee154e525cc (patch) | |
tree | 6417db15892dac8bcd2850722c2f9d8a79d7f97d | |
parent | dd8a2de8e0bb8e2e81a83234db524a07969b6ad3 (diff) | |
download | libimobiledevice-5722838a8ed8d42200c82831f166eee154e525cc.tar.gz libimobiledevice-5722838a8ed8d42200c82831f166eee154e525cc.tar.bz2 |
idevice: Restore original behavior for idevice_event_unsubscribe()
Due to an implementation detail from the past, a call to idevice_event_unsubscribe
would not cause the callback function to be called with IDEVICE_DEVICE_REMOVE
events, even though originally it was planned to be that way.
Due to the internal changes for the newer idevice_events_subscribe/unsubscribe
API, that behavior changed and it would call the callback.
Now to not break current software implementations depending on the original
behavior we modify the old API to behave the same as before the change.
-rw-r--r-- | src/idevice.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/idevice.c b/src/idevice.c index c8574fc..3984583 100644 --- a/src/idevice.c +++ b/src/idevice.c @@ -296,6 +296,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_event_unsubscribe(void) if (!event_ctx) { return IDEVICE_E_SUCCESS; } + event_ctx->callback = NULL; return idevice_events_unsubscribe(event_ctx); } |