1
--- vino-2.13.5.orig/server/vino-server.c
2
+++ vino-2.13.5/server/vino-server.c
8
-vino_server_set_client_on_hold (VinoServer *server,
9
- VinoServerClientInfo *client,
12
- rfbClientPtr rfb_client = client->rfb_client;
14
- dprintf (RFB, "Setting client '%s' on hold: %s\n",
15
- rfb_client->host, on_hold ? "(true)" : "(false)");
17
- rfb_client->onHold = on_hold;
19
- /* We don't process any pending data from an client which is
20
- * on hold, so don't let it starve the rest of the mainloop.
22
- g_source_set_priority (g_main_context_find_source_by_id (NULL, client->io_watch),
23
- on_hold ? G_PRIORITY_LOW : G_PRIORITY_DEFAULT);
27
- if (!client->update_timeout)
28
- client->update_timeout = g_timeout_add (50,
29
- (GSourceFunc) vino_server_update_client_timeout,
34
- if (client->update_timeout)
35
- g_source_remove (client->update_timeout);
36
- client->update_timeout = 0;
40
static inline gboolean
41
more_data_pending (int fd)
44
return vino_server_update_client (rfb_client);
48
+vino_server_set_client_on_hold (VinoServer *server,
49
+ VinoServerClientInfo *client,
52
+ rfbClientPtr rfb_client = client->rfb_client;
54
+ dprintf (RFB, "Setting client '%s' on hold: %s\n",
55
+ rfb_client->host, on_hold ? "(true)" : "(false)");
57
+ rfb_client->onHold = on_hold;
61
+ if (client->io_watch)
63
+ g_source_remove(client->io_watch);
64
+ client->io_watch = 0;
67
+ if (client->update_timeout)
69
+ g_source_remove (client->update_timeout);
70
+ client->update_timeout = 0;
75
+ if (!client->io_watch)
77
+ client->io_watch = g_io_add_watch (client->io_channel,
79
+ (GIOFunc) vino_server_client_data_pending,
83
+ if (!client->update_timeout)
85
+ client->update_timeout = g_timeout_add (50,
86
+ (GSourceFunc) vino_server_update_client_timeout,
92
static enum rfbNewClientAction
93
vino_server_handle_new_client (rfbClientPtr rfb_client)
97
client->io_channel = g_io_channel_unix_new (rfb_client->sock);
99
- client->io_watch = g_io_add_watch (client->io_channel,
101
- (GIOFunc) vino_server_client_data_pending,
104
server->priv->clients = g_slist_prepend (server->priv->clients, client);
106
vino_server_set_client_on_hold (server, client, server->priv->on_hold);