+ if((objheader =(objheader_t *)chashSearch(record->lookupTable, oid)) != NULL){
+ return(objheader);
+ } else if ((objheader = (objheader_t *) mhashSearch(oid)) != NULL) {
+ //Look up in Machine lookup table and found
+ printf(" oid not found in cache\n");
+ tmp = mhashSearch(oid);
+ size = sizeof(objheader_t)+classsize[tmp->type];
+ //Copy into cache
+ objcopy = objstrAlloc(record->cache, size);
+ memcpy(objcopy, (void *)tmp, size);
+ //Insert into cache's lookup table
+ chashInsert(record->lookupTable, objheader->oid, objcopy);
+ return(objcopy);
+ } else {
+ printf(" oid not found in Machine Lookup\n");
+ machinenumber = lhashSearch(oid);
+ //TODO:broadcast
+ return(NULL);
+ }