[winpr,pubsub] check return of PubSub_Subscribe

This commit is contained in:
Armin Novak
2026-02-27 11:56:23 +01:00
parent 7b47aac9e6
commit 0445ed6734
11 changed files with 70 additions and 44 deletions

View File

@@ -167,9 +167,12 @@ static BOOL tf_pre_connect(freerdp* instance)
* callbacks or deactivate certain features. */
/* Register the channel listeners.
* They are required to set up / tear down channels if they are loaded. */
PubSub_SubscribeChannelConnected(instance->context->pubSub, tf_OnChannelConnectedEventHandler);
PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
tf_OnChannelDisconnectedEventHandler);
if (PubSub_SubscribeChannelConnected(instance->context->pubSub,
tf_OnChannelConnectedEventHandler) < 0)
return FALSE;
if (PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
tf_OnChannelDisconnectedEventHandler) < 0)
return FALSE;
/* TODO: Any code your client requires */
return TRUE;