| 1 |
/*************************************************************************** |
/* SPDX-License-Identifier: GPL-3.0-or-later */ |
| 2 |
main.c - description |
/* |
| 3 |
------------------- |
* main |
| 4 |
Copyright : (C) 2004-2025 by Leaflet |
* - entry of server program |
| 5 |
Email : leaflet@leafok.com |
* |
| 6 |
***************************************************************************/ |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
| 7 |
|
*/ |
|
/*************************************************************************** |
|
|
* * |
|
|
* This program is free software; you can redistribute it and/or modify * |
|
|
* it under the terms of the GNU General Public License as published by * |
|
|
* the Free Software Foundation; either version 3 of the License, or * |
|
|
* (at your option) any later version. * |
|
|
* * |
|
|
***************************************************************************/ |
|
| 8 |
|
|
| 9 |
#include "bbs.h" |
#include "bbs.h" |
| 10 |
#include "common.h" |
#include "common.h" |
| 163 |
goto cleanup; |
goto cleanup; |
| 164 |
} |
} |
| 165 |
|
|
| 166 |
|
// Check section aid location dir |
| 167 |
|
ret = mkdir(VAR_SECTION_AID_LOC_DIR, 0750); |
| 168 |
|
if (ret == -1 && errno != EEXIST) |
| 169 |
|
{ |
| 170 |
|
log_error("mkdir(%s) error (%d)\n", VAR_SECTION_AID_LOC_DIR, errno); |
| 171 |
|
goto cleanup; |
| 172 |
|
} |
| 173 |
|
|
| 174 |
// Initialize data pools |
// Initialize data pools |
| 175 |
if ((fp = fopen(VAR_ARTICLE_BLOCK_SHM, "w")) == NULL) |
if ((fp = fopen(VAR_ARTICLE_BLOCK_SHM, "w")) == NULL) |
| 176 |
{ |
{ |
| 242 |
{ |
{ |
| 243 |
if (load_file(data_files_load_startup[i]) < 0) |
if (load_file(data_files_load_startup[i]) < 0) |
| 244 |
{ |
{ |
| 245 |
log_error("load_file_mmap(%s) error\n", data_files_load_startup[i]); |
log_error("load_file(%s) error\n", data_files_load_startup[i]); |
| 246 |
} |
} |
| 247 |
} |
} |
| 248 |
|
|