~ubuntu-branches/ubuntu/oneiric/dbus-glib/oneiric-updates

« back to all changes in this revision

Viewing changes to dbus/dbus-gproxy.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2007-07-06 14:00:42 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070706140042-zh5qmx99npmoe454
Tags: 0.74-1
* New upstream release.
* debian/rules:
  + Update shlibs to >= 0.74 because of new API.
* debian/control:
  + Use ${binary:Version} to make lintian happy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
798
798
        {
799
799
          priv->manager->unassociated_proxies = g_slist_prepend (priv->manager->unassociated_proxies, proxy);
800
800
        }
801
 
      else
 
801
      else if (error->domain == DBUS_GERROR && error->code == DBUS_GERROR_REMOTE_EXCEPTION)
802
802
        g_warning ("Couldn't get name owner (%s): %s",
803
803
                   dbus_g_error_get_name (error),
804
804
                   error->message);
805
 
 
 
805
      else
 
806
        g_warning ("Couldn't get name owner (code %d): %s",
 
807
                   error->code, error->message);
806
808
      g_clear_error (&error);
807
809
      goto out;
808
810
    }
928
930
                            list->name, list);
929
931
    }
930
932
 
931
 
  if (list->proxies == NULL)
 
933
  if (list->proxies == NULL && priv->name)
932
934
    {
933
935
      /* We have to add the match rule to the server,
934
 
       * but FIXME only if the server is a message bus,
 
936
       * but only if the server is a message bus,
935
937
       * not if it's a peer.
936
938
       */
937
 
      char *rule;
938
 
 
939
 
      rule = g_proxy_get_match_rule (proxy);
940
 
      
941
 
      /* We don't check for errors; it's not like anyone would handle them,
942
 
       * and we don't want a round trip here.
943
 
       */
944
 
      dbus_bus_add_match (manager->connection,
945
 
                          rule, NULL);
946
 
 
947
 
      g_free (rule);
 
939
       char *rule;
 
940
       
 
941
       rule = g_proxy_get_match_rule (proxy);
 
942
       
 
943
       /* We don't check for errors; it's not like anyone would handle them, and
 
944
        * we don't want a round trip here.
 
945
        */
 
946
       dbus_bus_add_match (manager->connection,
 
947
                           rule, NULL);
 
948
       
 
949
       g_free (rule);
948
950
    }
949
951
 
950
952
  g_assert (g_slist_find (list->proxies, proxy) == NULL);
1196
1198
      sender = dbus_message_get_sender (message);
1197
1199
 
1198
1200
      /* dbus spec requires these, libdbus validates */
1199
 
      g_assert (sender != NULL);
1200
1201
      g_assert (dbus_message_get_path (message) != NULL);
1201
1202
      g_assert (dbus_message_get_interface (message) != NULL);
1202
1203
      g_assert (dbus_message_get_member (message) != NULL);
1217
1218
 
1218
1219
      g_free (tri);
1219
1220
 
1220
 
      if (manager->owner_names)
 
1221
      if (manager->owner_names && sender)
1221
1222
        {
1222
1223
          owned_names = g_hash_table_lookup (manager->owner_names, sender);
1223
1224
          for (tmp = owned_names; tmp; tmp = tmp->next)
1340
1341
   * on these parameters being provided. unfortunately we can't assert
1341
1342
   * for manager because it's allowed to be NULL when tha mangager is
1342
1343
   * setting up a bus proxy for its own calls */
1343
 
  g_assert (priv->name != NULL);
1344
1344
  g_assert (priv->path != NULL);
1345
1345
  g_assert (priv->interface != NULL);
1346
1346
 
1496
1496
    {
1497
1497
    case PROP_NAME:
1498
1498
      priv->name = g_strdup (g_value_get_string (value));
1499
 
      priv->for_owner = (priv->name[0] == ':');
 
1499
      if (priv->name)
 
1500
        priv->for_owner = (priv->name[0] == ':');
 
1501
      else
 
1502
        priv->for_owner = TRUE;
1500
1503
      break;
1501
1504
    case PROP_PATH:
1502
1505
      priv->path = g_strdup (g_value_get_string (value));