| 2366 |
2366 |
| 2367 static void |
2367 static void |
| 2368 set_current_error(PurpleAccount *account, |
2368 set_current_error(PurpleAccount *account, |
| 2369 PurpleConnectionErrorInfo *new_err) |
2369 PurpleConnectionErrorInfo *new_err) |
| 2370 { |
2370 { |
| 2371 PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account); |
2371 PurpleAccountPrivate *priv; |
| 2372 PurpleConnectionErrorInfo *old_err = priv->current_error; |
2372 PurpleConnectionErrorInfo *old_err; |
| |
2373 |
| |
2374 g_return_if_fail(account != NULL); |
| |
2375 |
| |
2376 priv = PURPLE_ACCOUNT_GET_PRIVATE(account); |
| |
2377 old_err = priv->current_error; |
| 2373 |
2378 |
| 2374 if(new_err == old_err) |
2379 if(new_err == old_err) |
| 2375 return; |
2380 return; |
| 2376 |
2381 |
| 2377 priv->current_error = new_err; |
2382 priv->current_error = new_err; |
| 2391 connection_error_cb(PurpleConnection *gc, |
2396 connection_error_cb(PurpleConnection *gc, |
| 2392 PurpleConnectionError type, |
2397 PurpleConnectionError type, |
| 2393 const gchar *description, |
2398 const gchar *description, |
| 2394 gpointer unused) |
2399 gpointer unused) |
| 2395 { |
2400 { |
| 2396 PurpleAccount *account = purple_connection_get_account(gc); |
2401 PurpleAccount *account; |
| 2397 PurpleConnectionErrorInfo *err = g_new0(PurpleConnectionErrorInfo, 1); |
2402 PurpleConnectionErrorInfo *err; |
| |
2403 |
| |
2404 account = purple_connection_get_account(gc); |
| |
2405 |
| |
2406 g_return_if_fail(account != NULL); |
| |
2407 |
| |
2408 err = g_new0(PurpleConnectionErrorInfo, 1); |
| 2398 |
2409 |
| 2399 err->type = type; |
2410 err->type = type; |
| 2400 err->description = g_strdup(description); |
2411 err->description = g_strdup(description); |
| 2401 |
2412 |
| 2402 set_current_error(account, err); |
2413 set_current_error(account, err); |