Changeset 458 for trunk/src/sh_hash.c
- Timestamp:
- Aug 5, 2014, 12:26:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_hash.c
r457 r458 477 477 SH_MUTEX_UNLOCK(mutex_hash); 478 478 479 /* remove here to avoid second message from hash_unvisited */ 480 if (retval == 0) 481 sh_hash_remove (fullpath); 482 479 483 return retval; 480 484 } … … 537 541 SL_RET0(_("hash_unvisited")); 538 542 } 539 #if 0 540 if (!strcmp(p->fullpath, "/var/lib/synaptic")) 541 { 542 fprintf(stderr, "FIXME: Check for missing files %s\n", p->fullpath); 543 if (SH_FFLAG_VISITED_SET(p->fflags)) fprintf(stderr, "FIXME: visited\n"); 544 if (SH_FFLAG_CHECKED_SET(p->fflags)) fprintf(stderr, "FIXME: checked\n"); 545 if (SH_FFLAG_REPORTED_SET(p->fflags)) fprintf(stderr, "FIXME: reported\n"); 546 if (SH_FFLAG_ALLIGNORE_SET(p->fflags)) fprintf(stderr, "FIXME: allignore\n"); 547 } 548 #endif 543 549 544 /* visited flag not set: not seen; 550 545 * checked flag set: not seen (i.e. missing), and already checked … … 560 555 { 561 556 i = retry_lstat(FIL__, __LINE__, p->fullpath, &buf); 562 #if 0 563 if (!strcmp(p->fullpath, "/var/lib/synaptic")) 564 fprintf(stderr, "FIXME: Check for missing files %s (%d)\n", p->fullpath, i); 565 #endif 557 566 558 /* if file does not exist 567 559 */ … … 653 645 CLEAR_SH_FFLAG_VISITED(p->fflags); 654 646 CLEAR_SH_FFLAG_CHECKED(p->fflags); 647 SET_SH_FFLAG_ENOENT(p->fflags); 655 648 656 649 SL_RET0(_("hash_unvisited")); … … 2202 2195 /* needs lock to be threadsafe 2203 2196 */ 2204 void sh_hash_ addflag (char * filename, int flag_to_set)2197 void sh_hash_set_flag (char * filename, int flag_to_set) 2205 2198 { 2206 2199 sh_file_t * p; … … 2218 2211 return; 2219 2212 } 2213 2214 /* needs lock to be threadsafe 2215 */ 2216 void sh_hash_clear_flag (char * filename, int flag_to_clear) 2217 { 2218 sh_file_t * p; 2219 2220 if (IsInit != 1) 2221 sh_hash_init(); 2222 2223 SH_MUTEX_LOCK(mutex_hash); 2224 p = sh_hash_have_it_int (filename); 2225 if (p) 2226 { 2227 p->fflags &= ~flag_to_clear; 2228 } 2229 SH_MUTEX_UNLOCK(mutex_hash); 2230 return; 2231 } 2232 2220 2233 2221 2234 /*****************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.