Index: /trunk/Nebulous/nebclient/src/nebclient.c
===================================================================
--- /trunk/Nebulous/nebclient/src/nebclient.c	(revision 4491)
+++ /trunk/Nebulous/nebclient/src/nebclient.c	(revision 4492)
@@ -4,5 +4,5 @@
  * Copyright (C) 2005  Joshua Hoblitt
  *
- * $Id: nebclient.c,v 1.9 2005-07-07 00:16:11 jhoblitt Exp $
+ * $Id: nebclient.c,v 1.10 2005-07-07 02:08:12 jhoblitt Exp $
  */
 
@@ -149,5 +149,4 @@
 {
     char            **locations;
-    int             n;
 
     if (nebFindInstances(server, (char *)key, NULL, &locations) < 2) {
@@ -252,8 +251,32 @@
 }
 
-int nebDelete(nebServer *server, char *key )
-{
-
-    return 0;
+bool nebDelete(nebServer *server, const char *key)
+{
+    char            **locations;
+    int             n;
+    int             i;
+
+    n = nebFindInstances(server, (char *)key, NULL, &locations);
+
+    if (n < 0) {
+        fprintf(stderr, "no instances found\n");
+        nebFree(locations);
+
+        return false;
+    }
+
+    for (i = 0; i < n; i++) {
+        printf("nebDelete location is: %s\n", locations[i]);
+
+        if (!nebDeleteInstance(server, locations[i])) {
+            nebFree(locations);
+
+            return false;
+        }
+    }
+
+    nebFree(locations);
+
+    return true;
 }
 
@@ -272,5 +295,5 @@
 bool nebDeleteInstance(nebServer *server, const char *URI)
 {
-    int             *response;
+    int             response;
     char            *filename;
     bool            status;
@@ -282,5 +305,5 @@
     }
 
-    if (soap_call_ns1__delete_USCOREinstance(server, NULL, NULL, (char *)URI, response) != SOAP_OK) {
+    if (soap_call_ns1__delete_USCOREinstance(server, NULL, NULL, (char *)URI, &response) != SOAP_OK) {
         nebFree(filename);
 
@@ -288,5 +311,5 @@
     }
 
-    if (*response > 0) {
+    if (response > 0) {
         status = nebNukeFile(filename);
     } else {
@@ -321,4 +344,8 @@
     int             matchLength;
 
+    if (!URI) {
+        return 0;
+    }
+
     status = regcomp(&myregex, pattern, REG_EXTENDED);
     if (status != 0) {
Index: /trunk/Nebulous/nebclient/src/nebclient.h
===================================================================
--- /trunk/Nebulous/nebclient/src/nebclient.h	(revision 4491)
+++ /trunk/Nebulous/nebclient/src/nebclient.h	(revision 4492)
@@ -4,5 +4,5 @@
  * Copyright (C) 2005  Joshua Hoblitt
  *
- * $Id: nebclient.h,v 1.11 2005-07-07 00:16:11 jhoblitt Exp $
+ * $Id: nebclient.h,v 1.12 2005-07-07 02:08:12 jhoblitt Exp $
  */
 
@@ -38,5 +38,5 @@
 int nebOpen(nebServer *server, const char *key, rw flag);
 
-int nebDelete(nebServer *server, char *key);
+bool nebDelete(nebServer *server, const char *key);
 
 int nebCopy(nebServer *server, char *key, char *newKey);
