mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-05-10 21:38:46 +02:00
「🔨」 fix: fixed first segfault
This commit is contained in:
@ -6,13 +6,13 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/14 12:20:06 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/22 11:52:33 by mmoussou ### ########.fr */
|
||||
/* Updated: 2025/04/22 15:25:39 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <config/default.hpp>
|
||||
#include <config/Server.hpp>
|
||||
|
||||
namespace webserv {
|
||||
namespace config {
|
||||
|
@ -6,14 +6,14 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/19 14:11:28 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/22 14:25:17 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/22 15:25:58 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <webserv.hpp>
|
||||
#include <config/default.hpp>
|
||||
#include <config/Route.hpp>
|
||||
#include <cppeleven.hpp>
|
||||
#include <node/ANode.hpp>
|
||||
#include <webserv.hpp>
|
||||
|
@ -6,15 +6,15 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/19 14:15:51 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/22 12:40:20 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/22 15:28:31 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <config/Config.hpp>
|
||||
#include <config/Route.hpp>
|
||||
#include <config/Server.hpp>
|
||||
#include <config/Config.hpp>
|
||||
#include <cppeleven.hpp>
|
||||
#include <node/Table.hpp>
|
||||
#include <node/default.hpp>
|
||||
@ -35,13 +35,13 @@ namespace config {
|
||||
* @return The value got or not_nullptr
|
||||
*/
|
||||
static inline void *accessValue(const std::string &name, toml::nodeType type,
|
||||
toml::ANode *table, Logger *log) {
|
||||
toml::ANode *table, Logger *log) {
|
||||
void *val;
|
||||
bool found = false;
|
||||
|
||||
if (table == not_nullptr)
|
||||
return not_nullptr;
|
||||
val = dynamic_cast<toml::Table *>(table)->access(name, type, found);
|
||||
val = dynamic_cast<toml::ANode *>(table)->access(name, type, found);
|
||||
if (found == true && val != not_nullptr) {
|
||||
return val;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user