~bcurtiswx/ubuntu/precise/empathy/3.4.2.1-0ubuntu1

« back to all changes in this revision

Viewing changes to libempathy/empathy-ft-handler.c

  • Committer: Bazaar Package Importer
  • Author(s): Ken VanDine
  • Date: 2011-08-22 14:16:36 UTC
  • mto: (1.8.1 upstream) (163.1.1 oneiric-proposed)
  • mto: This revision was merged to the branch mainline in revision 157.
  • Revision ID: james.westby@ubuntu.com-20110822141636-i553k6njkvpdct3r
Tags: upstream-3.1.5.1
ImportĀ upstreamĀ versionĀ 3.1.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1083
1083
}
1084
1084
 
1085
1085
static void
1086
 
conn_prepared_cb (GObject *conn,
1087
 
    GAsyncResult *result,
1088
 
    gpointer user_data)
 
1086
check_hashing (CallbacksData *data)
1089
1087
{
1090
 
  CallbacksData *data = user_data;
1091
1088
  EmpathyFTHandler *handler = data->handler;
1092
1089
  EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
1093
1090
  GError *myerr = NULL;
1094
1091
  TpCapabilities *caps;
1095
1092
  GPtrArray *classes;
1096
 
 
1097
 
  if (!tp_proxy_prepare_finish (conn, result, &myerr))
 
1093
  TpConnection *conn;
 
1094
 
 
1095
  conn = empathy_contact_get_connection (priv->contact);
 
1096
 
 
1097
  caps = tp_connection_get_capabilities (conn);
 
1098
  if (caps == NULL)
1098
1099
    {
1099
 
      DEBUG ("Failed to prepare connection: %s", myerr->message);
1100
 
 
1101
 
      data->callback (handler, myerr, data->user_data);
 
1100
      data->callback (handler, NULL, data->user_data);
1102
1101
      goto out;
1103
1102
    }
1104
1103
 
1105
 
  caps = tp_connection_get_capabilities (TP_CONNECTION (conn));
1106
1104
  classes = tp_capabilities_get_channel_classes (caps);
1107
1105
 
1108
1106
  /* set whether we support hash and the type of it */
1202
1200
  else
1203
1201
    {
1204
1202
      /* see if FT/hashing are allowed */
1205
 
      TpConnection *connection;
1206
 
      GQuark features[] = { TP_CONNECTION_FEATURE_CAPABILITIES, 0 };
1207
 
 
1208
 
      connection = empathy_contact_get_connection (priv->contact);
1209
 
      g_assert (connection != NULL);
1210
 
 
1211
 
      tp_proxy_prepare_async (connection, features,
1212
 
          conn_prepared_cb, cb_data);
 
1203
      check_hashing (cb_data);
1213
1204
    }
1214
1205
}
1215
1206