Changeset 10402
- Timestamp:
- 02/04/15 15:46:09 (9 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cacheex.c
r10391 r10402 51 51 static hash_table ht_hitcache; 52 52 static list ll_hitcache; 53 static bool cacheex_running; 53 54 54 55 void cacheex_init_hitcache(void) … … 57 58 if (pthread_rwlock_init(&hitcache_lock,NULL) != 0) 58 59 cs_log("Error creating lock hitcache_lock!"); 60 cacheex_running = true; 61 } 62 63 void cacheex_free_hitcache(void) 64 { 65 cacheex_running = false; 66 deinitialize_hash_table(&ht_hitcache); 67 pthread_rwlock_destroy(&hitcache_lock); 59 68 } 60 69 … … 232 241 struct s_write_from_cache *wfc=NULL; 233 242 234 while( 1)243 while(cacheex_running) 235 244 { 236 245 cs_readlock(&ecmcache_lock); -
trunk/module-cacheex.h
r10391 r10402 35 35 static inline int8_t cacheex_get_rdr_mode(struct s_reader *reader) { return reader->cacheex.mode; } 36 36 void cacheex_init_hitcache(void); 37 void cacheex_free_hitcache(void); 37 38 void cacheex_cleanup_hitcache(void); 38 39 void cacheex_update_hash(ECM_REQUEST *er); … … 55 56 static inline int8_t cacheex_get_rdr_mode(struct s_reader *UNUSED(reader)) { return 0; } 56 57 static inline void cacheex_init_hitcache(void) { } 58 static inline void cacheex_free_hitcache(void) { } 57 59 static inline void cacheex_cleanup_hitcache(void) { } 58 60 static inline void cacheex_update_hash(ECM_REQUEST *UNUSED(er)) { } -
trunk/oscam-cache.c
r10400 r10402 70 70 if (pthread_rwlock_init(&cache_lock,NULL) != 0) 71 71 cs_log("Error creating lock cache_lock!"); 72 } 73 74 void free_cache(void){ 75 deinitialize_hash_table(&ht_cache); 76 pthread_rwlock_destroy(&cache_lock); 72 77 } 73 78 -
trunk/oscam-cache.h
r10374 r10402 3 3 4 4 void init_cache(void); 5 void free_cache(void); 5 6 void add_cache(ECM_REQUEST *er); 6 7 struct ecm_request_t *check_cache(ECM_REQUEST *er, struct s_client *cl); -
trunk/oscam.c
r10376 r10402 1608 1608 { unlink(oscam_pidfile); } 1609 1609 1610 free_cache(); 1611 cacheex_free_hitcache(); 1610 1612 webif_tpls_free(); 1611 1613 init_free_userdb(cfg.account);
Note:
See TracChangeset
for help on using the changeset viewer.