Changeset 1254
- Timestamp:
- 09/11/08 21:12:11 (3 months ago)
- Files:
-
- 1.8.3/branches/devel/src/db.c (modified) (2 diffs)
- 1.8.3/branches/devel/src/extchat.c (modified) (1 diff)
- 1.8.3/branches/devel/src/extmail.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/devel/src/db.c
r1052 r1254 37 37 #include "privtab.h" 38 38 #include "htab.h" 39 #include "extchat.h" 39 40 #include "extmail.h" 40 41 #include "confmagic.h" … … 1918 1919 god, desc_flags, 1); 1919 1920 current_state.rooms++; 1920 } 1921 1922 1923 init_chatdb(); 1924 mail_init(); 1925 } 1.8.3/branches/devel/src/extchat.c
r1247 r1254 198 198 init_chatdb(void) 199 199 { 200 num_channels = 0; 201 channel_slab = slab_create("channels", sizeof(struct channel)); 202 chanuser_slab = slab_create("channel users", sizeof(struct chanuser)); 203 chanlist_slab = slab_create("channel lists", sizeof(struct chanlist)); 204 slab_set_opt(chanuser_slab, SLAB_ALLOC_BEST_FIT, 1); 205 slab_set_opt(chanlist_slab, SLAB_ALLOC_BEST_FIT, 1); 206 channels = NULL; 200 static bool init_called = 0; 201 if (!init_called) { 202 init_called = 1; 203 num_channels = 0; 204 channel_slab = slab_create("channels", sizeof(struct channel)); 205 chanuser_slab = slab_create("channel users", sizeof(struct chanuser)); 206 chanlist_slab = slab_create("channel lists", sizeof(struct chanlist)); 207 slab_set_opt(chanuser_slab, SLAB_ALLOC_BEST_FIT, 1); 208 slab_set_opt(chanlist_slab, SLAB_ALLOC_BEST_FIT, 1); 209 channels = NULL; 210 } 207 211 } 208 212 1.8.3/branches/devel/src/extmail.c
r1141 r1254 2019 2019 mail_init(void) 2020 2020 { 2021 mdb_top = 0; 2022 mail_slab = slab_create("mail messages", sizeof(struct mail)); 2023 slab_set_opt(mail_slab, SLAB_HINTLESS_THRESHOLD, 5); 2024 HEAD = NULL; 2025 TAIL = NULL; 2021 static bool init_called = 0; 2022 if (!init_called) { 2023 init_called = 1; 2024 mdb_top = 0; 2025 mail_slab = slab_create("mail messages", sizeof(struct mail)); 2026 slab_set_opt(mail_slab, SLAB_HINTLESS_THRESHOLD, 5); 2027 HEAD = NULL; 2028 TAIL = NULL; 2029 } 2026 2030 } 2027 2031
