int top=endoffsets[ntuples-1];
*((int *)(node+len))=ntuples;
len += sizeof(int);
-
+ /* int i;
+ for(i=0;i<ntuples;i++) {
+ if (oids[i]%2==0&&(oids[i]!=0)) {
+ printf("Bad oid %ld\n",oids[i]);
+ }
+ }*/
+
memcpy(node+len, oids, ntuples*sizeof(unsigned int));
memcpy(node+len+ntuples*sizeof(unsigned int), endoffsets, ntuples*sizeof(unsigned short));
memcpy(node+len+ntuples*(sizeof(unsigned int)+sizeof(short)), arrayfields, top*sizeof(short));
void *buf;
if(oid == 0) {
- printf("Error: %s, %d oid is NULL \n", __FILE__, __LINE__);
return NULL;
}
unsigned int oid=oidarray[i];
int newbase;
int machinenum;
+ if (oid==0)
+ continue;
//Look up fields locally
for(newbase=baseindex;newbase<endindex;newbase++) {
if (!lookupObject(&oid, arryfields[newbase]))
/* TODO: For each object not found query DHT for new location and retrieve the object */
/* Throw an error */
printf("OBJECT %x NOT FOUND.... THIS SHOULD NOT HAPPEN...TERMINATE PROGRAM\n", oid);
- exit(-1);
+ // exit(-1);
} else {
printf("Error: in decoding the control value %d, %s, %d\n",control, __FILE__, __LINE__);
}
}
//TODO: when reusing oids, make sure they are not already in use!
+static unsigned int id = 0xFFFFFFFF;
unsigned int getNewOID(void) {
- static unsigned int id = 0xFFFFFFFF;
-
id += 2;
if (id > oidMax || id < oidMin)
{