~ubuntu-branches/ubuntu/precise/corosync/precise-proposed

« back to all changes in this revision

Viewing changes to exec/sync.c

  • Committer: Bazaar Package Importer
  • Author(s): Ante Karamatic
  • Date: 2009-08-21 09:29:56 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090821092956-w9qxxxx3zeoh8dem
Tags: 1.0.0-4ubuntu2
* debian/control:
  - 'Ubuntu Developers' instead of 'Ubuntu Core Developers'
    as maintainer
  - Bump debhelper dependecy to 7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright (c) 2005-2006 MontaVista Software, Inc.
3
 
 * Copyright (c) 2006-2007 Red Hat, Inc.
 
3
 * Copyright (c) 2006-2007, 2009 Red Hat, Inc.
4
4
 *
5
5
 * All rights reserved.
6
6
 *
7
7
 * Author: Steven Dake (sdake@redhat.com)
8
8
 *
9
9
 * This software licensed under BSD license, the text of which follows:
10
 
 * 
 
10
 *
11
11
 * Redistribution and use in source and binary forms, with or without
12
12
 * modification, are permitted provided that the following conditions are met:
13
13
 *
32
32
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33
33
 * THE POSSIBILITY OF SUCH DAMAGE.
34
34
 */
 
35
#include <config.h>
 
36
 
35
37
#include <sys/types.h>
36
38
#include <sys/socket.h>
37
39
#include <sys/un.h>
43
45
#include <stdlib.h>
44
46
#include <stdio.h>
45
47
#include <errno.h>
46
 
#include <signal.h>
47
48
#include <time.h>
48
49
#include <unistd.h>
49
50
#include <netinet/in.h>
50
51
#include <arpa/inet.h>
51
52
 
52
 
#include <corosync/saAis.h>
 
53
#include <corosync/corotypes.h>
53
54
#include <corosync/swab.h>
54
55
#include <corosync/totem/totempg.h>
55
56
#include <corosync/totem/totem.h>
56
57
#include <corosync/lcr/lcr_ifact.h>
57
58
#include <corosync/engine/logsys.h>
58
 
 
59
 
#include "main.h"
 
59
#include <corosync/coroipc_types.h>
 
60
#include "quorum.h"
60
61
#include "sync.h"
61
 
#include "vsf.h"
62
62
 
63
 
LOGSYS_DECLARE_SUBSYS ("SYNC", LOG_INFO);
 
63
LOGSYS_DECLARE_SUBSYS ("SYNC");
64
64
 
65
65
#define MESSAGE_REQ_SYNC_BARRIER 0
66
 
#define MESSAGE_REQ_SYNC_REQUEST 1
67
66
 
68
67
struct barrier_data {
69
68
        unsigned int nodeid;
70
69
        int completed;
71
70
};
72
71
 
73
 
static struct memb_ring_id *sync_ring_id;
74
 
 
75
 
static int vsf_none = 0;
 
72
static const struct memb_ring_id *sync_ring_id;
76
73
 
77
74
static int (*sync_callbacks_retrieve) (int sync_id, struct sync_callbacks *callack);
78
75
 
 
76
static void (*sync_started) (
 
77
        const struct memb_ring_id *ring_id);
 
78
 
 
79
static void (*sync_aborted) (void);
 
80
 
79
81
static struct sync_callbacks sync_callbacks;
80
82
 
81
83
static int sync_processing = 0;
82
84
 
83
 
static void (*sync_synchronization_completed) (void);
 
85
static void (*sync_next_start) (
 
86
        const unsigned int *member_list,
 
87
        size_t member_list_entries,
 
88
        const struct memb_ring_id *ring_id);
84
89
 
85
90
static int sync_recovery_index = 0;
86
91
 
87
92
static void *sync_callback_token_handle = 0;
88
 
static void *sync_request_token_handle;
89
93
 
90
94
static struct barrier_data barrier_data_confchg[PROCESSOR_COUNT_MAX];
91
95
 
92
 
static int barrier_data_confchg_entries;
 
96
static size_t barrier_data_confchg_entries;
93
97
 
94
98
static struct barrier_data barrier_data_process[PROCESSOR_COUNT_MAX];
95
99
 
96
 
static struct corosync_vsf_iface_ver0 *vsf_iface;
97
 
 
98
 
static int sync_barrier_send (struct memb_ring_id *ring_id);
99
 
 
100
 
static int sync_start_process (enum totem_callback_token_type type, void *data);
 
100
static unsigned int my_member_list[PROCESSOR_COUNT_MAX];
 
101
 
 
102
static unsigned int my_member_list_entries;
 
103
 
 
104
static int sync_barrier_send (const struct memb_ring_id *ring_id);
 
105
 
 
106
static int sync_start_process (enum totem_callback_token_type type,
 
107
                               const void *data);
101
108
 
102
109
static void sync_service_init (struct memb_ring_id *ring_id);
103
110
 
104
 
static int sync_service_process (enum totem_callback_token_type type, void *data);
 
111
static int sync_service_process (enum totem_callback_token_type type,
 
112
                                 const void *data);
105
113
 
106
114
static void sync_deliver_fn (
107
115
        unsigned int nodeid,
108
 
        struct iovec *iovec,
109
 
        int iov_len,
 
116
        const void *msg,
 
117
        unsigned int msg_len,
110
118
        int endian_conversion_required);
111
119
 
112
120
static void sync_confchg_fn (
113
121
        enum totem_configuration_type configuration_type,
114
 
        unsigned int *member_list, int member_list_entries,
115
 
        unsigned int *left_list, int left_list_entries,
116
 
        unsigned int *joined_list, int joined_list_entries,
117
 
        struct memb_ring_id *ring_id);
 
122
        const unsigned int *member_list,
 
123
        size_t member_list_entries,
 
124
        const unsigned int *left_list,
 
125
        size_t left_list_entries,
 
126
        const unsigned int *joined_list,
 
127
        size_t joined_list_entries,
 
128
        const struct memb_ring_id *ring_id);
118
129
 
119
130
static void sync_primary_callback_fn (
120
 
        unsigned int *view_list,
121
 
        int view_list_entries,
122
 
        int primary_designated,
123
 
        struct memb_ring_id *ring_id);
 
131
        const unsigned int *view_list,
 
132
        size_t view_list_entries,
 
133
        int primary_designated,
 
134
        const struct memb_ring_id *ring_id);
 
135
 
124
136
 
125
137
static struct totempg_group sync_group = {
126
138
    .group      = "sync",
127
139
    .group_len  = 4
128
140
};
129
141
 
130
 
static totempg_groups_handle sync_group_handle;
131
 
static char *service_name;
132
 
static unsigned int current_members[PROCESSOR_COUNT_MAX];
133
 
static unsigned int current_members_cnt;
 
142
static hdb_handle_t sync_group_handle;
134
143
 
135
144
struct req_exec_sync_barrier_start {
136
 
        mar_req_header_t header;
137
 
        struct memb_ring_id ring_id;
138
 
};
139
 
 
140
 
struct sync_request {
141
 
        uint32_t name_len;
142
 
        char name[0] __attribute__((aligned(8)));
143
 
};
144
 
 
145
 
typedef struct sync_msg {
146
 
        mar_req_header_t header;
147
 
        struct memb_ring_id ring_id;
148
 
        struct sync_request sync_request;
149
 
} sync_msg_t;
150
 
 
 
145
        coroipc_request_header_t header;
 
146
        struct memb_ring_id ring_id;
 
147
};
151
148
 
152
149
/*
153
150
 * Send a barrier data structure
154
151
 */
155
 
static int sync_barrier_send (struct memb_ring_id *ring_id)
 
152
static int sync_barrier_send (const struct memb_ring_id *ring_id)
156
153
{
157
154
        struct req_exec_sync_barrier_start req_exec_sync_barrier_start;
158
155
        struct iovec iovec;
172
169
        return (res);
173
170
}
174
171
 
175
 
void sync_start_init (struct memb_ring_id *ring_id)
 
172
static void sync_start_init (const struct memb_ring_id *ring_id)
176
173
{
177
174
        totempg_callback_token_create (
178
175
                &sync_callback_token_handle,
179
176
                TOTEM_CALLBACK_TOKEN_SENT,
180
177
                0, /* don't delete after callback */
181
178
                sync_start_process,
182
 
                (void *)ring_id);
 
179
                ring_id);
183
180
}
184
181
 
185
182
static void sync_service_init (struct memb_ring_id *ring_id)
186
183
{
187
 
        sync_callbacks.sync_init ();
 
184
        sync_callbacks.sync_init (my_member_list, my_member_list_entries, ring_id);
188
185
        totempg_callback_token_destroy (&sync_callback_token_handle);
189
186
 
190
187
        /*
195
192
                TOTEM_CALLBACK_TOKEN_SENT,
196
193
                0, /* don't delete after callback */
197
194
                sync_service_process,
198
 
                (void *)ring_id);
 
195
                ring_id);
199
196
}
200
197
 
201
 
static int sync_start_process (enum totem_callback_token_type type, void *data)
 
198
static int sync_start_process (enum totem_callback_token_type type,
 
199
                               const void *data)
202
200
{
203
201
        int res;
204
 
        struct memb_ring_id *ring_id = (struct memb_ring_id *)data;
 
202
        const struct memb_ring_id *ring_id = data;
205
203
 
206
204
        res = sync_barrier_send (ring_id);
207
205
        if (res == 0) {
213
211
        return (0);
214
212
}
215
213
 
216
 
void sync_callbacks_load (void)
 
214
static void sync_callbacks_load (void)
217
215
{
218
216
        int res;
219
217
 
235
233
        }
236
234
}
237
235
 
238
 
static int sync_service_process (enum totem_callback_token_type type, void *data)
 
236
static int sync_service_process (enum totem_callback_token_type type,
 
237
                                 const void *data)
239
238
{
240
239
        int res;
241
 
        struct memb_ring_id *ring_id = (struct memb_ring_id *)data;
242
 
 
243
 
        
 
240
        const struct memb_ring_id *ring_id = data;
 
241
 
 
242
 
244
243
        /*
245
244
         * If process operation not from this ring id, then ignore it and stop
246
245
         * processing
248
247
        if (memcmp (ring_id, sync_ring_id, sizeof (struct memb_ring_id)) != 0) {
249
248
                return (0);
250
249
        }
251
 
        
 
250
 
252
251
        /*
253
252
         * If process returns 0, then its time to activate
254
253
         * and start the next service's synchronization
265
264
}
266
265
 
267
266
int sync_register (
268
 
        int (*callbacks_retrieve) (int sync_id, struct sync_callbacks *callack),
269
 
        void (*synchronization_completed) (void),
270
 
        char *vsf_type)
 
267
        int (*callbacks_retrieve) (
 
268
                int sync_id,
 
269
                struct sync_callbacks *callbacks),
 
270
 
 
271
        void (*started) (
 
272
                const struct memb_ring_id *ring_id),
 
273
 
 
274
        void (*aborted) (void),
 
275
 
 
276
        void (*next_start) (
 
277
                const unsigned int *member_list,
 
278
                size_t member_list_entries,
 
279
                const struct memb_ring_id *ring_id))
271
280
{
272
281
        unsigned int res;
273
 
        unsigned int vsf_handle;
274
 
        void *vsf_iface_p;
275
 
        char corosync_vsf_type[1024];
276
282
 
277
283
        res = totempg_groups_initialize (
278
284
                &sync_group_handle,
279
285
                sync_deliver_fn,
280
286
                sync_confchg_fn);
281
287
        if (res == -1) {
282
 
                log_printf (LOG_LEVEL_ERROR,
 
288
                log_printf (LOGSYS_LEVEL_ERROR,
283
289
                        "Couldn't initialize groups interface.\n");
284
290
                return (-1);
285
291
        }
289
295
                &sync_group,
290
296
                1);
291
297
        if (res == -1) {
292
 
                log_printf (LOG_LEVEL_ERROR, "Couldn't join group.\n");
 
298
                log_printf (LOGSYS_LEVEL_ERROR, "Couldn't join group.\n");
293
299
                return (-1);
294
300
        }
295
 
                
296
 
        if (strcmp (vsf_type, "none") == 0) {
297
 
                log_printf (LOG_LEVEL_NOTICE,
298
 
                        "Not using a virtual synchrony filter.\n");
299
 
                vsf_none = 1;
300
 
        } else {
301
 
                vsf_none = 0;
302
 
 
303
 
                sprintf (corosync_vsf_type, "corosync_vsf_%s", vsf_type);
304
 
                res = lcr_ifact_reference (
305
 
                        &vsf_handle,
306
 
                        corosync_vsf_type,
307
 
                        0,
308
 
                        &vsf_iface_p,
309
 
                        0);
310
 
 
311
 
                if (res == -1) {
312
 
                        log_printf (LOG_LEVEL_NOTICE,
313
 
                                "Couldn't load virtual synchrony filter %s\n",
314
 
                                vsf_type);
315
 
                        return (-1);
316
 
                }
317
 
 
318
 
                log_printf (LOG_LEVEL_NOTICE,
319
 
                        "Using virtual synchrony filter %s\n", corosync_vsf_type);
320
 
 
321
 
                vsf_iface = (struct corosync_vsf_iface_ver0 *)vsf_iface_p;
322
 
                vsf_iface->init (sync_primary_callback_fn);
323
 
        }
324
301
 
325
302
        sync_callbacks_retrieve = callbacks_retrieve;
326
 
        sync_synchronization_completed = synchronization_completed;
 
303
        sync_next_start = next_start;
 
304
        sync_started = started;
 
305
        sync_aborted = aborted;
327
306
        return (0);
328
307
}
329
308
 
 
309
 
330
310
static void sync_primary_callback_fn (
331
 
        unsigned int *view_list,
332
 
        int view_list_entries,
 
311
        const unsigned int *view_list,
 
312
        size_t view_list_entries,
333
313
        int primary_designated,
334
 
        struct memb_ring_id *ring_id)
 
314
        const struct memb_ring_id *ring_id)
335
315
{
336
316
        int i;
337
317
 
338
318
        if (primary_designated) {
339
 
                log_printf (LOG_LEVEL_NOTICE, "This node is within the primary component and will provide service.\n");
 
319
                log_printf (LOGSYS_LEVEL_DEBUG, "This node is within the primary component and will provide service.\n");
340
320
        } else {
341
 
                log_printf (LOG_LEVEL_NOTICE, "This node is within the non-primary component and will NOT provide any services.\n");
 
321
                log_printf (LOGSYS_LEVEL_DEBUG, "This node is within the non-primary component and will NOT provide any services.\n");
342
322
                return;
343
323
        }
344
324
 
363
343
 
364
344
static struct memb_ring_id deliver_ring_id;
365
345
 
366
 
void sync_endian_convert (struct req_exec_sync_barrier_start *req_exec_sync_barrier_start)
 
346
static void sync_endian_convert (struct req_exec_sync_barrier_start
 
347
                                 *req_exec_sync_barrier_start)
367
348
{
368
349
        totemip_copy_endian_convert(&req_exec_sync_barrier_start->ring_id.rep,
369
350
                &req_exec_sync_barrier_start->ring_id.rep);
373
354
 
374
355
static void sync_deliver_fn (
375
356
        unsigned int nodeid,
376
 
        struct iovec *iovec,
377
 
        int iov_len,
 
357
        const void *msg,
 
358
        unsigned int msg_len,
378
359
        int endian_conversion_required)
379
360
{
380
361
        struct req_exec_sync_barrier_start *req_exec_sync_barrier_start =
381
 
                (struct req_exec_sync_barrier_start *)iovec[0].iov_base;
382
 
        sync_msg_t *msg = (sync_msg_t *)iovec[0].iov_base;
383
 
 
 
362
                (struct req_exec_sync_barrier_start *)msg;
 
363
        unsigned int barrier_completed;
384
364
        int i;
385
365
 
 
366
        log_printf (LOGSYS_LEVEL_DEBUG, "confchg entries %lu\n",
 
367
                    (unsigned long int) barrier_data_confchg_entries);
386
368
        if (endian_conversion_required) {
387
369
                sync_endian_convert (req_exec_sync_barrier_start);
388
370
        }
389
371
 
390
 
        int barrier_completed = 1;
 
372
        barrier_completed = 1;
391
373
 
392
374
        memcpy (&deliver_ring_id, &req_exec_sync_barrier_start->ring_id,
393
375
                sizeof (struct memb_ring_id));
400
382
                return;
401
383
        }
402
384
 
403
 
        if (msg->header.id == MESSAGE_REQ_SYNC_REQUEST) {
404
 
                if (endian_conversion_required) {
405
 
                        swab_mar_uint32_t (&msg->sync_request.name_len);
406
 
                }       
407
 
                /*
408
 
                 * If there is an ongoing sync, abort it. A requested sync is
409
 
                 * only allowed to abort other requested synchronizations,
410
 
                 * not full synchronizations.
411
 
                 */
412
 
                if (sync_processing && sync_callbacks.sync_abort) {
413
 
                        sync_callbacks.sync_abort();
414
 
                        sync_callbacks.sync_activate = NULL;
415
 
                        sync_processing = 0;
416
 
                        assert (service_name != NULL);
417
 
                        free (service_name);
418
 
                        service_name = NULL;
419
 
                }
420
 
 
421
 
                service_name = malloc (msg->sync_request.name_len);
422
 
                strcpy (service_name, msg->sync_request.name);
423
 
 
424
 
                /*
425
 
                 * Start requested synchronization
426
 
                 */
427
 
                sync_primary_callback_fn (current_members, current_members_cnt, 1,
428
 
                        sync_ring_id);
429
 
 
430
 
                return;
431
 
        }
432
 
 
433
385
        /*
434
386
         * Set completion for source_addr's address
435
387
         */
436
388
        for (i = 0; i < barrier_data_confchg_entries; i++) {
437
389
                if (nodeid == barrier_data_process[i].nodeid) {
438
390
                        barrier_data_process[i].completed = 1;
439
 
                        log_printf (LOG_LEVEL_DEBUG,
440
 
                                "Barrier Start Recieved From %d\n",
 
391
                        log_printf (LOGSYS_LEVEL_DEBUG,
 
392
                                "Barrier Start Received From %d\n",
441
393
                                barrier_data_process[i].nodeid);
442
394
                        break;
443
395
                }
447
399
         * Test if barrier is complete
448
400
         */
449
401
        for (i = 0; i < barrier_data_confchg_entries; i++) {
450
 
                log_printf (LOG_LEVEL_DEBUG,
451
 
                        "Barrier completion status for nodeid %d = %d. \n", 
 
402
                log_printf (LOGSYS_LEVEL_DEBUG,
 
403
                        "Barrier completion status for nodeid %d = %d. \n",
452
404
                        barrier_data_process[i].nodeid,
453
405
                        barrier_data_process[i].completed);
454
406
                if (barrier_data_process[i].completed == 0) {
456
408
                }
457
409
        }
458
410
        if (barrier_completed) {
459
 
                log_printf (LOG_LEVEL_DEBUG,
 
411
                log_printf (LOGSYS_LEVEL_DEBUG,
460
412
                        "Synchronization barrier completed\n");
461
413
        }
462
414
        /*
464
416
         */
465
417
        if (barrier_completed && sync_callbacks.sync_activate) {
466
418
                sync_callbacks.sync_activate ();
467
 
        
468
 
                log_printf (LOG_LEVEL_DEBUG,
 
419
 
 
420
                log_printf (LOGSYS_LEVEL_DEBUG,
469
421
                        "Committing synchronization for (%s)\n",
470
422
                        sync_callbacks.name);
471
423
        }
483
435
                 * if sync service found, execute it
484
436
                 */
485
437
                if (sync_processing && sync_callbacks.sync_init) {
486
 
                        log_printf (LOG_LEVEL_DEBUG,
 
438
                        log_printf (LOGSYS_LEVEL_DEBUG,
487
439
                                "Synchronization actions starting for (%s)\n",
488
440
                                sync_callbacks.name);
489
441
                        sync_service_init (&deliver_ring_id);
490
442
                }
 
443
                if (sync_processing == 0) {
 
444
                        sync_next_start (my_member_list, my_member_list_entries, sync_ring_id);
 
445
                }
491
446
        }
492
447
        return;
493
448
}
494
449
 
495
450
static void sync_confchg_fn (
496
451
        enum totem_configuration_type configuration_type,
497
 
        unsigned int *member_list, int member_list_entries,
498
 
        unsigned int *left_list, int left_list_entries,
499
 
        unsigned int *joined_list, int joined_list_entries,
500
 
        struct memb_ring_id *ring_id)
 
452
        const unsigned int *member_list,
 
453
        size_t member_list_entries,
 
454
        const unsigned int *left_list,
 
455
        size_t left_list_entries,
 
456
        const unsigned int *joined_list,
 
457
        size_t joined_list_entries,
 
458
        const struct memb_ring_id *ring_id)
501
459
{
502
 
        int i;
503
460
        sync_ring_id = ring_id;
504
461
 
505
462
        if (configuration_type != TOTEM_CONFIGURATION_REGULAR) {
506
463
                return;
507
464
        }
 
465
        memcpy (my_member_list, member_list, member_list_entries * sizeof (unsigned int));
 
466
        my_member_list_entries = member_list_entries;
 
467
 
508
468
        if (sync_processing && sync_callbacks.sync_abort != NULL) {
 
469
                sync_aborted ();
509
470
                sync_callbacks.sync_abort ();
510
471
                sync_callbacks.sync_activate = NULL;
511
472
        }
512
 
        /*
513
 
         * Save current members and ring ID for later use
514
 
         */
515
 
        for (i = 0; i < member_list_entries; i++) {
516
 
                current_members[i] = member_list[i];
517
 
        }
518
 
        current_members_cnt = member_list_entries;
519
 
 
520
 
        /*
521
 
         * If no virtual synchrony filter configured, then start
522
 
         * synchronization process
523
 
         */
524
 
        if (vsf_none == 1) {
525
 
                sync_primary_callback_fn (
526
 
                        member_list,
527
 
                        member_list_entries,
528
 
                        1,
529
 
                        ring_id);
530
 
        }
531
 
}
532
 
/**
533
 
 * TOTEM callback function used to multicast a sync_request
534
 
 * message
535
 
 * @param type
536
 
 * @param _name
537
 
 *
538
 
 * @return int
539
 
 */
540
 
static int sync_request_send (
541
 
        enum totem_callback_token_type type, void *_name)
542
 
{
543
 
        int res;
544
 
        char *name = _name;
545
 
        sync_msg_t msg;
546
 
        struct iovec iovec[2];
547
 
        int name_len;
548
 
 
549
 
        ENTER("'%s'", name);
550
 
 
551
 
        name_len = strlen (name) + 1;
552
 
        msg.header.size = sizeof (msg) + name_len;
553
 
        msg.header.id = MESSAGE_REQ_SYNC_REQUEST;
554
 
 
555
 
        if (sync_ring_id == NULL) {
556
 
                log_printf (LOG_LEVEL_ERROR,
557
 
                        "%s sync_ring_id is NULL.\n", __func__);
558
 
                return 1;
559
 
        }
560
 
        memcpy (&msg.ring_id, sync_ring_id,     sizeof (struct memb_ring_id));
561
 
        msg.sync_request.name_len = name_len;
562
 
 
563
 
        iovec[0].iov_base = (char *)&msg;
564
 
        iovec[0].iov_len = sizeof (msg);
565
 
        iovec[1].iov_base = _name;
566
 
        iovec[1].iov_len = name_len;
567
 
 
568
 
        res = totempg_groups_mcast_joined (
569
 
                sync_group_handle, iovec, 2, TOTEMPG_AGREED);
570
 
 
571
 
        if (res == 0) {
572
 
                /*
573
 
                 * We managed to multicast the message so delete the token callback
574
 
                 * for the sync request.
575
 
                 */
576
 
                totempg_callback_token_destroy (&sync_request_token_handle);
577
 
        }
578
 
 
579
 
        /*
580
 
         * if we failed to multicast the message, this function will be called
581
 
         * again.
582
 
         */
583
 
 
584
 
        return (0);
585
 
}
586
 
 
587
 
int sync_in_process (void)
588
 
{
589
 
        return (sync_processing);
590
 
}
591
 
 
592
 
int sync_primary_designated (void)
593
 
{
594
 
        if (vsf_none == 1) {
595
 
                return (1);
596
 
        } else {
597
 
                return (vsf_iface->primary());
598
 
        }
599
 
}
600
 
 
601
 
/**
602
 
 * Execute synchronization upon request for the named service
603
 
 * @param name
604
 
 *
605
 
 * @return int
606
 
 */
607
 
int sync_request (char *name)
608
 
{
609
 
        assert (name != NULL);
610
 
 
611
 
        ENTER("'%s'", name);
612
 
 
613
 
        if (sync_processing) {
614
 
                return -1;
615
 
        }
616
 
 
617
 
        totempg_callback_token_create (&sync_request_token_handle,
618
 
                TOTEM_CALLBACK_TOKEN_SENT, 0, /* don't delete after callback */
619
 
                sync_request_send, name);
620
 
 
621
 
        LEAVE("");
622
 
 
623
 
        return 0;
 
473
 
 
474
        sync_started (
 
475
                ring_id);
 
476
 
 
477
        sync_primary_callback_fn (
 
478
                member_list,
 
479
                member_list_entries,
 
480
                1,
 
481
                ring_id);
624
482
}