r22179: Store resource id along with the object itself to be able to return
authorRafal Szczesniak <mimir@samba.org>
Wed, 11 Apr 2007 23:01:48 +0000 (23:01 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:49:58 +0000 (14:49 -0500)
it as "number" type. This fixes a small problem with resource set
method returning id of type "number" whereas find method was returning
id of type "string".

rafal

services/resources.esp

index e7fd164c34a6bf9e7dee29a7e58a80186d9e341c..b5c4bd3b3d392089246bf39749ab85d82fdd6fec 100644 (file)
@@ -52,6 +52,7 @@ function _resourcesCreate()
         /* Save the resource and its type */
         r.resource = resource;
         r.type = type;
+       r.id = this.resourceList.id;
 
         /* Add this resource to the list */
         this.resourceList[this.resourceList.id] = r;
@@ -110,7 +111,7 @@ function _resourcesCreate()
                 if (r.type == type)
                 {
                     /* Yup, this is the one they want. */
-                    return resourceId;
+                 return r.id;
                 }
             }
         }