Changeset 4639
- Timestamp:
- Jul 27, 2005, 6:13:32 PM (21 years ago)
- Location:
- trunk/Nebulous/nebclient
- Files:
-
- 2 edited
-
src/nebclient.c (modified) (3 diffs)
-
tests/tests.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/nebclient/src/nebclient.c
r4637 r4639 4 4 * Copyright (C) 2005 Joshua Hoblitt 5 5 * 6 * $Id: nebclient.c,v 1.2 8 2005-07-28 02:55:20jhoblitt Exp $6 * $Id: nebclient.c,v 1.29 2005-07-28 04:13:32 jhoblitt Exp $ 7 7 */ 8 8 … … 311 311 char **locations; 312 312 char *filename; 313 int instances; 313 314 int fh; 314 315 315 if (nebFindInstances(server, key, NULL, &locations) < 0) { 316 instances = nebFindInstances(server, key, NULL, &locations); 317 if (instances < 1) { 316 318 nebSetErr(server, "no instances found"); 317 319 … … 326 328 327 329 if (flag == NEB_WRITE) { 330 if (instances > 1) { 331 nebSetErr(server, "write not allowed with multiple instances"); 332 nebFree(filename); 333 334 return -1; 335 } 328 336 fh = open(filename, O_RDWR); 329 337 } else { -
trunk/Nebulous/nebclient/tests/tests.c
r4636 r4639 21 21 char *key = "foobarbaz"; 22 22 23 TESTS(1 6);23 TESTS(17); 24 24 25 25 if (getenv("NEBULOUS_SERVER")) { … … 43 43 44 44 OK(nebReplicate(server, key, NULL, NULL), "replicate object"); 45 46 OK(nebOpen(server, key, NEB_WRITE) < 0, "write to object with multiple instances"); 45 47 46 48 OK(nebCull(server, key), "cull object");
Note:
See TracChangeset
for help on using the changeset viewer.
