mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 23:06:38 +02:00
relay/api: disconnect cleanly when the remote is quitting (closes #2168)
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
- relay/api: fix read of one buffer line
|
||||
- relay/api: automatically disconnect when the command `/upgrade` is executed on the remote
|
||||
- relay/api: disconnect from remote in case of error when sending data
|
||||
- relay/api: disconnect cleanly when the remote is quitting ([#2168](https://github.com/weechat/weechat/issues/2168))
|
||||
- relay: fix websocket permessage-deflate extension when the client doesn't send the max window bits parameters ([#1549](https://github.com/weechat/weechat/issues/1549))
|
||||
- relay: fix allocation and reinit of field "client_context_takeover" in websocket deflate structure ([#1549](https://github.com/weechat/weechat/issues/1549))
|
||||
- spell: improve error displayed when a word can not be added to the dictionary ([#2144](https://github.com/weechat/weechat/issues/2144))
|
||||
|
||||
@@ -1170,6 +1170,16 @@ RELAY_REMOTE_EVENT_CALLBACK(upgrade)
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for event "quit".
|
||||
*/
|
||||
|
||||
RELAY_REMOTE_EVENT_CALLBACK(quit)
|
||||
{
|
||||
relay_remote_network_disconnect (event->remote);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Synchronizes with remote.
|
||||
*/
|
||||
@@ -1227,6 +1237,7 @@ relay_remote_event_recv (struct t_relay_remote *remote, const char *data)
|
||||
{ "nicklist_group_*", &relay_remote_event_cb_nick_group },
|
||||
{ "nicklist_nick_*", &relay_remote_event_cb_nick },
|
||||
{ "upgrade*", &relay_remote_event_cb_upgrade },
|
||||
{ "quit", &relay_remote_event_cb_quit },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
t_relay_remote_event_func *callback;
|
||||
|
||||
@@ -255,6 +255,26 @@ TEST(RelayRemoteEvent, CbVersion)
|
||||
/* TODO: write tests */
|
||||
}
|
||||
|
||||
/*
|
||||
* Tests functions:
|
||||
* relay_remote_event_cb_upgrade
|
||||
*/
|
||||
|
||||
TEST(RelayRemoteEvent, CbUpgrade)
|
||||
{
|
||||
/* TODO: write tests */
|
||||
}
|
||||
|
||||
/*
|
||||
* Tests functions:
|
||||
* relay_remote_event_cb_quit
|
||||
*/
|
||||
|
||||
TEST(RelayRemoteEvent, CbQuit)
|
||||
{
|
||||
/* TODO: write tests */
|
||||
}
|
||||
|
||||
/*
|
||||
* Tests functions:
|
||||
* relay_remote_event_sync_with_remote
|
||||
|
||||
Reference in New Issue
Block a user