~ubuntu-branches/ubuntu/utopic/gnome-online-accounts/utopic

« back to all changes in this revision

Viewing changes to src/goabackend/goayahooprovider.c

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson, Laurent Bigonville, Andreas Henriksson
  • Date: 2014-05-16 11:42:52 UTC
  • mfrom: (1.1.28) (0.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20140516114252-u5ect6mk6ht8i38x
Tags: 3.12.2-1
[ Laurent Bigonville ]
* debian/control.in: Recommends realmd package (Closes: #725965)

[ Andreas Henriksson ]
* New upstream release.
  - Removes chat support from Windows Live provider (XMPP gateway gone).
* Bump Standards-Version to 3.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 * Lesser General Public License for more details.
14
14
 *
15
15
 * You should have received a copy of the GNU Lesser General
16
 
 * Public License along with this library; if not, write to the
17
 
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18
 
 * Boston, MA 02111-1307, USA.
 
16
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19
17
 *
20
18
 * Author: David Zeuthen <davidz@redhat.com>
21
19
 */
26
24
#include <rest/oauth-proxy.h>
27
25
#include <json-glib/json-glib.h>
28
26
 
29
 
#include "goalogging.h"
30
27
#include "goaprovider.h"
31
28
#include "goaprovider-priv.h"
32
29
#include "goaoauthprovider.h"
184
181
                   GOA_ERROR,
185
182
                   GOA_ERROR_FAILED,
186
183
                   /* Translators: the %d is a HTTP status code and the %s is a textual description of it */
187
 
                   _("Expected status 200 when requesting guid, instead got status %d (%s)"),
 
184
                   _("Expected status 200 when requesting your identity, instead got status %d (%s)"),
188
185
                   rest_proxy_call_get_status_code (call),
189
186
                   rest_proxy_call_get_status_message (call));
190
187
      goto out;
196
193
                                   rest_proxy_call_get_payload_length (call),
197
194
                                   &identity_error))
198
195
    {
199
 
      goa_warning ("json_parser_load_from_data() failed: %s (%s, %d)",
200
 
                   identity_error->message,
201
 
                   g_quark_to_string (identity_error->domain),
202
 
                   identity_error->code);
 
196
      g_warning ("json_parser_load_from_data() failed: %s (%s, %d)",
 
197
                 identity_error->message,
 
198
                 g_quark_to_string (identity_error->domain),
 
199
                 identity_error->code);
203
200
      g_set_error (error,
204
201
                   GOA_ERROR,
205
202
                   GOA_ERROR_FAILED,
211
208
  json_data_object = json_object_get_object_member (json_object, "guid");
212
209
  if (json_data_object == NULL)
213
210
    {
214
 
      goa_warning ("Did not find guid in JSON data");
 
211
      g_warning ("Did not find guid in JSON data");
215
212
      g_set_error (error,
216
213
                   GOA_ERROR,
217
214
                   GOA_ERROR_FAILED,
222
219
  guid = g_strdup (json_object_get_string_member (json_data_object, "value"));
223
220
  if (guid == NULL)
224
221
    {
225
 
      goa_warning ("Did not find value in JSON data");
 
222
      g_warning ("Did not find value in JSON data");
226
223
      g_set_error (error,
227
224
                   GOA_ERROR,
228
225
                   GOA_ERROR_FAILED,
265
262
                                   rest_proxy_call_get_payload_length (call),
266
263
                                   &identity_error))
267
264
    {
268
 
      goa_warning ("json_parser_load_from_data() failed: %s (%s, %d)",
269
 
                   identity_error->message,
270
 
                   g_quark_to_string (identity_error->domain),
271
 
                   identity_error->code);
 
265
      g_warning ("json_parser_load_from_data() failed: %s (%s, %d)",
 
266
                 identity_error->message,
 
267
                 g_quark_to_string (identity_error->domain),
 
268
                 identity_error->code);
272
269
      g_set_error (error,
273
270
                   GOA_ERROR,
274
271
                   GOA_ERROR_FAILED,
280
277
  json_data_object = json_object_get_object_member (json_object, "profile");
281
278
  if (json_data_object == NULL)
282
279
    {
283
 
      goa_warning ("Did not find profile in JSON data");
 
280
      g_warning ("Did not find profile in JSON data");
284
281
      g_set_error (error,
285
282
                   GOA_ERROR,
286
283
                   GOA_ERROR_FAILED,
291
288
  presentation_identity = g_strdup (json_object_get_string_member (json_data_object, "nickname"));
292
289
  if (presentation_identity == NULL)
293
290
    {
294
 
      goa_warning ("Did not find nickname in JSON data");
 
291
      g_warning ("Did not find nickname in JSON data");
295
292
      g_set_error (error,
296
293
                   GOA_ERROR,
297
294
                   GOA_ERROR_FAILED,