/[LeafOK_CVS]/lbbs/src/trie_dict.c
ViewVC logotype

Diff of /lbbs/src/trie_dict.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.20 by sysadm, Wed Nov 19 15:50:13 2025 UTC Revision 1.21 by sysadm, Thu Nov 20 01:02:15 2025 UTC
# Line 187  int get_trie_dict_shm_readonly(void) Line 187  int get_trie_dict_shm_readonly(void)
187    
188  int set_trie_dict_shm_readonly(void)  int set_trie_dict_shm_readonly(void)
189  {  {
190          if (p_trie_node_pool != NULL && munmap(p_trie_node_pool, p_trie_node_pool->shm_size) < 0)          if (p_trie_node_pool != NULL && mprotect(p_trie_node_pool, p_trie_node_pool->shm_size, PROT_READ) < 0)
191          {          {
192                  log_error("munmap() error (%d)\n", errno);                  log_error("mprotect() error (%d)\n", errno);
193                  return -2;                  return -1;
         }  
   
         if (get_trie_dict_shm_readonly() < 0)  
         {  
                 log_error("get_trie_dict_shm_readonly() error\n");  
                 return -3;  
194          }          }
195    
196          return 0;          return 0;


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1