- unsigned int machinenumber;
- objheader_t *tmp, *objheader;
- objheader_t *objcopy;
- int size, rc, found = 0;
- void *buf;
- struct timespec ts;
- struct timeval tp;
-
- if(oid == 0) {
- printf("Error: %s, %d oid is NULL \n", __FILE__, __LINE__);
- return NULL;
- }
-
- rc = gettimeofday(&tp, NULL);
-
- /* 1ms delay */
- tp.tv_usec += 1000;
- if (tp.tv_usec >= 1000000)
- {
- tp.tv_usec -= 1000000;
- tp.tv_sec += 1;
- }
- /* Convert from timeval to timespec */
- ts.tv_sec = tp.tv_sec;
- ts.tv_nsec = tp.tv_usec * 1000;
-
- /* Search local transaction cache */
- if((objheader = (objheader_t *)chashSearch(record->lookupTable, oid)) != NULL){
-
-#ifdef COMPILER
- return &objheader[1];
-#else
- return objheader;
-#endif
- } else if ((objheader = (objheader_t *) mhashSearch(oid)) != NULL) {
- /* Look up in machine lookup table and copy into cache*/
- GETSIZE(size, objheader);
- size += sizeof(objheader_t);
- objcopy = (objheader_t *) objstrAlloc(record->cache, size);
- memcpy(objcopy, objheader, size);
- /* Insert into cache's lookup table */
- chashInsert(record->lookupTable, OID(objheader), objcopy);
+ unsigned int machinenumber;
+ objheader_t *tmp, *objheader;
+ objheader_t *objcopy;
+ int size, found = 0;
+ void *buf;
+
+ if(oid == 0) {
+ printf("Error: %s, %d oid is NULL \n", __FILE__, __LINE__);
+ return NULL;
+ }
+
+ /* Search local transaction cache */
+ if((objheader = (objheader_t *)chashSearch(record->lookupTable, oid)) != NULL){