~ubuntu-branches/ubuntu/natty/vino/natty

« back to all changes in this revision

Viewing changes to server/vino-tube-server.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-09-07 14:23:05 UTC
  • mfrom: (1.1.39 upstream)
  • Revision ID: james.westby@ubuntu.com-20090907142305-iweame4y7atzzcii
Tags: 2.27.92-0ubuntu1
* New upstream version:
  - Fix a regression that allows more than one instance of the server to run.
  - Use vino's debug framework instead of g_printerr 
  - Make Avahi use the network interface defined in vino preferences.
  - Use integer (instead of double) as the port parameter in dbus calls.
  - Fixed a warning in libgcrypt initialization.
  - Translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#include "vino-tube-server.h"
34
34
#include "vino-dbus-error.h"
 
35
#include "vino-util.h"
35
36
 
36
37
G_DEFINE_TYPE (VinoTubeServer, vino_tube_server, VINO_TYPE_SERVER);
37
38
 
127
128
      server->priv->channel_properties = NULL;
128
129
    }
129
130
 
130
 
  g_debug ("-- Destruction of a VinoTubeServer --\n");
 
131
  dprintf (TUBE, "Destruction of a VinoTubeServer\n");
131
132
 
132
133
  if (G_OBJECT_CLASS (vino_tube_server_parent_class)->finalize)
133
134
    G_OBJECT_CLASS (vino_tube_server_parent_class)->finalize (object);
281
282
{
282
283
  VinoTubeServer *self = VINO_TUBE_SERVER (server);
283
284
 
284
 
  g_debug ("Tube is closed\n");
 
285
  dprintf (TUBE, "Tube is closed\n");
285
286
  g_signal_emit (G_OBJECT (self), signals[DISCONNECTED], 0);
286
287
}
287
288
 
369
370
{
370
371
  if (error != NULL)
371
372
    {
372
 
      g_printerr ("Impossible to offer the stream tube: %s\n",
373
 
          error->message);
 
373
      dprintf (TUBE, "Impossible to offer the stream tube: %s\n", error->message);
374
374
      return;
375
375
    }
376
376
}
396
396
 
397
397
  if (!tp_connection_parse_object_path (connection, &protocol, &cm))
398
398
    {
399
 
      g_printerr ("Impossible to parse object path\n");
 
399
      dprintf (TUBE, "Impossible to parse object path\n");
400
400
      return NULL;
401
401
    }
402
402
 
434
434
 
435
435
  if (error != NULL)
436
436
    {
437
 
      g_printerr ("Impossible to get the contact name: %s\n", error->message);
 
437
      dprintf (TUBE, "Impossible to get the contact name: %s\n", error->message);
438
438
      return;
439
439
    }
440
440
 
473
473
 
474
474
  if (error != NULL)
475
475
    {
476
 
      g_printerr ("Impossible to create the channel: %s\n",
477
 
          error->message);
 
476
      dprintf (TUBE, "Impossible to create the channel: %s\n", error->message);
478
477
      return;
479
478
    }
480
479
 
491
490
 
492
491
  if (error_failed != NULL)
493
492
    {
494
 
      g_printerr ("Failed to connect state channel: %s\n",
495
 
          error_failed->message);
 
493
      dprintf (TUBE, "Failed to connect state channel: %s\n", error_failed->message);
496
494
      g_clear_error (&error_failed);
497
495
      return ;
498
496
    }
507
505
 
508
506
  port = vino_server_get_port (VINO_SERVER (server));
509
507
 
510
 
  g_debug ("-- Creation of a VinoTubeServer!! port : %d --\n", port);
 
508
  dprintf (TUBE, "Creation of a VinoTubeServer, port : %d\n", port);
511
509
 
512
510
  server->priv->signal_invalidated_id = g_signal_connect (G_OBJECT (channel),
513
511
      "invalidated", G_CALLBACK (vino_tube_server_invalidated_cb), server);
536
534
 
537
535
  if (connection == NULL)
538
536
    {
539
 
      g_printerr ("The connection is not ready: %s\n", error->message);
 
537
      dprintf (TUBE, "The connection is not ready: %s\n", error->message);
540
538
      return ;
541
539
    }
542
540
 
546
544
 
547
545
  if (server->priv->tp_channel == NULL)
548
546
    {
549
 
      g_printerr ("Error requesting tp channel: %s\n",
550
 
          error_failed->message);
 
547
      dprintf (TUBE, "Error requesting tp channel: %s\n", error_failed->message);
551
548
      g_clear_error (&error_failed);
552
549
      return ;
553
550
    }
568
565
 
569
566
  if (tp_dbus_daemon == NULL)
570
567
    {
571
 
      g_printerr ("Error requesting dbus daemon: %s\n",
572
 
          error_failed->message);
 
568
      dprintf (TUBE, "Error requesting dbus daemon: %s\n", error_failed->message);
573
569
      g_clear_error (&error_failed);
574
570
      g_set_error (error, vino_dbus_error_quark (),
575
571
          VINO_DBUS_ERROR_FAILED,
582
578
 
583
579
  if (tp_connection == NULL)
584
580
    {
585
 
      g_printerr ("Error requesting tp connection: %s\n",
586
 
          error_failed->message);
 
581
      dprintf (TUBE, "Error requesting tp connection: %s\n", error_failed->message);
587
582
      g_clear_error (&error_failed);
588
583
      g_set_error (error, vino_dbus_error_quark (),
589
584
          VINO_DBUS_ERROR_FAILED,