View | Details | Raw Unified
Collapse All | Expand All

(-) file_not_specified_in_diff (-38 / +52 lines)
 Lines 1-3    Link Here 
vino (2.13.5-0ubuntu5) dapper; urgency=low
  * The IO socket for clients on hold should not be included in the
    GTK main loop. Ubuntu: #31037
 -- Gary Coady <gary@lyranthe.org>  Fri, 31 Mar 2006 18:15:18 +0100
vino (2.13.5-0ubuntu4) dapper; urgency=low
vino (2.13.5-0ubuntu4) dapper; urgency=low
  * debian/rules: Add -Wl,--as-needed to CFLAGS to get rid of a lot of useless
  * debian/rules: Add -Wl,--as-needed to CFLAGS to get rid of a lot of useless
 Lines 201-239    Link Here 
  return TRUE;
  return TRUE;
}
}
static void
vino_server_set_client_on_hold (VinoServer            *server,
				VinoServerClientInfo  *client,
				gboolean               on_hold)
{
  rfbClientPtr rfb_client = client->rfb_client;
  dprintf (RFB, "Setting client '%s' on hold: %s\n",
	   rfb_client->host, on_hold ? "(true)" : "(false)");
  rfb_client->onHold = on_hold;
  /* We don't process any pending data from an client which is
   * on hold, so don't let it starve the rest of the mainloop.
   */
  g_source_set_priority (g_main_context_find_source_by_id (NULL, client->io_watch),
			 on_hold ? G_PRIORITY_LOW : G_PRIORITY_DEFAULT);
  if (!on_hold)
    {
      if (!client->update_timeout)
	client->update_timeout = g_timeout_add (50,
						(GSourceFunc) vino_server_update_client_timeout,
						rfb_client);
    }
  else
    {
      if (client->update_timeout)
	g_source_remove (client->update_timeout);
      client->update_timeout = 0;
    }
}
static inline gboolean
static inline gboolean
more_data_pending (int fd)
more_data_pending (int fd)
{
{
 Lines 257-262    Link Here 
  return vino_server_update_client (rfb_client);
  return vino_server_update_client (rfb_client);
}
}
static void
vino_server_set_client_on_hold (VinoServer            *server,
				VinoServerClientInfo  *client,
				gboolean               on_hold)
{
  rfbClientPtr rfb_client = client->rfb_client;
  dprintf (RFB, "Setting client '%s' on hold: %s\n",
	   rfb_client->host, on_hold ? "(true)" : "(false)");
  rfb_client->onHold = on_hold;
  if (on_hold)
  {
    if (client->io_watch)
    {
      g_source_remove(client->io_watch);
      client->io_watch = 0;
    }
    if (client->update_timeout)
    {
      g_source_remove (client->update_timeout);
      client->update_timeout = 0;
    }
  }
  else
  {
    if (!client->io_watch)
    {
      client->io_watch = g_io_add_watch (client->io_channel,
					G_IO_IN|G_IO_PRI,
					(GIOFunc) vino_server_client_data_pending,
					rfb_client);
    }
    if (!client->update_timeout)
    {
      client->update_timeout = g_timeout_add (50,
					(GSourceFunc) vino_server_update_client_timeout,
					rfb_client);
    }
  }
}
static enum rfbNewClientAction
static enum rfbNewClientAction
vino_server_handle_new_client (rfbClientPtr rfb_client)
vino_server_handle_new_client (rfbClientPtr rfb_client)
{
{
 Lines 280-290    Link Here 
  client->io_channel = g_io_channel_unix_new (rfb_client->sock);
  client->io_channel = g_io_channel_unix_new (rfb_client->sock);
  client->io_watch = g_io_add_watch (client->io_channel,
				     G_IO_IN|G_IO_PRI,
				     (GIOFunc) vino_server_client_data_pending,
				     rfb_client);
  server->priv->clients = g_slist_prepend (server->priv->clients, client);
  server->priv->clients = g_slist_prepend (server->priv->clients, client);
  vino_server_set_client_on_hold (server, client, server->priv->on_hold);
  vino_server_set_client_on_hold (server, client, server->priv->on_hold);