IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 22, 2008, 9:44:43 PM (18 years ago)
Author:
bills
Message:

when opening a file in nebulous for writing, cull all but one existing
instance for consistencty (may need some work with respect to locking
versus replication)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/nebclient/src/nebclient.c

    r20209 r20341  
    44 * Copyright (C) 2005  Joshua Hoblitt
    55 *
    6  * $Id: nebclient.c,v 1.52 2008-10-16 23:53:01 jhoblitt Exp $
     6 * $Id: nebclient.c,v 1.53 2008-10-23 07:44:43 bills Exp $
    77 */
    88
     
    247247
    248248    locations = nebFindInstances(server, key, NULL);
    249     if (!locations) {
     249    if (!locations || locations->n <= 1) {
    250250        nebSetErr(server, "can not cull - not enough instances");
    251251
     
    260260
    261261    nebObjectInstancesFree(locations);
     262
     263    return true;
     264}
     265
     266bool nebCullAllButOne(nebServer *server, const char *key)
     267{
     268    while (nebCull(server, key)) {
     269        ;
     270    }
    262271
    263272    return true;
Note: See TracChangeset for help on using the changeset viewer.