| 2405 { |
2405 { |
| 2406 g_slist_free_full(cmds, (GDestroyNotify)purple_cmd_unregister); |
2406 g_slist_free_full(cmds, (GDestroyNotify)purple_cmd_unregister); |
| 2407 } |
2407 } |
| 2408 |
2408 |
| 2409 |
2409 |
| 2410 static int zephyr_resubscribe(PurpleConnection *gc) |
2410 /* Resubscribe to the in-memory list of subscriptions and also unsubscriptions */ |
| 2411 { |
2411 static void |
| 2412 /* Resubscribe to the in-memory list of subscriptions and also |
2412 zephyr_action_resubscribe(PurpleProtocolAction *action) |
| 2413 unsubscriptions*/ |
2413 { |
| 2414 zephyr_account *zephyr = purple_connection_get_protocol_data(gc); |
2414 zephyr_account *zephyr = purple_connection_get_protocol_data(action->connection); |
| |
2415 |
| 2415 for (GSList *s = zephyr->subscrips; s; s = s->next) { |
2416 for (GSList *s = zephyr->subscrips; s; s = s->next) { |
| 2416 zephyr_triple *zt = s->data; |
2417 zephyr_triple *zt = s->data; |
| 2417 /* XXX We really should care if this fails */ |
2418 /* XXX We really should care if this fails */ |
| 2418 zephyr->subscribe_to(zephyr, zt->class, zt->instance, zt->recipient); |
2419 zephyr->subscribe_to(zephyr, zt->class, zt->instance, zt->recipient); |
| 2419 } |
2420 } |
| 2420 /* XXX handle unsubscriptions */ |
2421 /* XXX handle unsubscriptions */ |
| 2421 return 1; |
|
| 2422 } |
|
| 2423 |
|
| 2424 |
|
| 2425 static void zephyr_action_resubscribe(PurpleProtocolAction *action) |
|
| 2426 { |
|
| 2427 |
|
| 2428 PurpleConnection *gc = action->connection; |
|
| 2429 zephyr_resubscribe(gc); |
|
| 2430 } |
2422 } |
| 2431 |
2423 |
| 2432 |
2424 |
| 2433 static void zephyr_action_get_subs_from_server(PurpleProtocolAction *action) |
2425 static void zephyr_action_get_subs_from_server(PurpleProtocolAction *action) |
| 2434 { |
2426 { |