Skip to content

Commit baf6365

Browse files
committed
poc: removing links and usage of os_xml
1 parent 5982714 commit baf6365

File tree

5 files changed

+20
-17
lines changed

5 files changed

+20
-17
lines changed

src/common/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ add_subdirectory(time_op)
44
add_subdirectory(file_op)
55
add_subdirectory(privsep_op)
66
add_subdirectory(pthreads_op)
7-
add_subdirectory(os_xml)
87
add_subdirectory(error_messages)
98
add_subdirectory(mem_op)
109
add_subdirectory(binaries_op)

src/common/debug_op/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ target_link_libraries(debug_op
1111
mem_op
1212
privsep_op
1313
pthreads_op
14-
os_xml
1514
error_messages
1615
os_net
1716
binaries_op

src/common/debug_op/src/debug_op.c

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -278,31 +278,36 @@ void w_logging_init(){
278278
}
279279

280280
void os_logging_config(){
281-
OS_XML xml;
281+
// OS_XML xml;
282282
const char * xmlf[] = {"ossec_config", "logging", "log_format", NULL};
283283
char * logformat;
284284
char ** parts = NULL;
285285
int i;
286286

287287
pid = (int)getpid();
288288

289-
if (OS_ReadXML(OSSECCONF, &xml) < 0){
290-
flags.log_plain = 1;
291-
flags.log_json = 0;
292-
OS_ClearXML(&xml);
293-
mlerror_exit(LOGLEVEL_ERROR, XML_ERROR, OSSECCONF, xml.err, xml.err_line);
294-
}
295-
296-
logformat = OS_GetOneContentforElement(&xml, xmlf);
289+
// TODO: replace function OS_ReadXML
290+
// if (OS_ReadXML(OSSECCONF, &xml) < 0){
291+
// flags.log_plain = 1;
292+
// flags.log_json = 0;
293+
// TODO: replace function OS_ClearXML
294+
// OS_ClearXML(&xml);
295+
// TODO: replace XML_ERROR
296+
// mlerror_exit(LOGLEVEL_ERROR, XML_ERROR, OSSECCONF, xml.err, xml.err_line);
297+
// }
298+
// TODO: replace function OS_GetOneContentforElement
299+
// logformat = OS_GetOneContentforElement(&xml, xmlf);
297300

298301
if (!logformat || logformat[0] == '\0'){
299302

300303
flags.log_plain = 1;
301304
flags.log_json = 0;
302305

303306
free(logformat);
304-
OS_ClearXML(&xml);
305-
mdebug1(XML_NO_ELEM, "log_format");
307+
// TODO: replace function OS_ClearXML
308+
// OS_ClearXML(&xml);
309+
// TODO: replace XML_NO_ELEM
310+
// mdebug1(XML_NO_ELEM, "log_format");
306311

307312
}else{
308313

@@ -320,7 +325,8 @@ void os_logging_config(){
320325
}else{
321326
flags.log_plain = 1;
322327
flags.log_json = 0;
323-
mlerror_exit(LOGLEVEL_ERROR, XML_VALUEERR, "log_format", part);
328+
// TODO: replace XML_VALUEERR
329+
// mlerror_exit(LOGLEVEL_ERROR, XML_VALUEERR, "log_format", part);
324330
}
325331
}
326332
for (i=0; parts[i]; i++){
@@ -330,7 +336,8 @@ void os_logging_config(){
330336
}
331337

332338
free(logformat);
333-
OS_ClearXML(&xml);
339+
// TODO: replace function OS_ClearXML
340+
// OS_ClearXML(&xml);
334341
}
335342
}
336343

src/common/utils/include/shared.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@
119119
#include "mem_op.h"
120120
#include "privsep_op.h"
121121
#include "pthreads_op.h"
122-
#include "os_xml.h"
123122
#include "error_messages.h"
124123
#include "binaries_op.h"
125124
#include "os_ip.h"

src/modules/inventory/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ target_include_directories(inventory PUBLIC
2424
${COMMON_FOLDER}/file_op/include
2525
${COMMON_FOLDER}/hashHelper/include
2626
${COMMON_FOLDER}/logging_helper/include
27-
${COMMON_FOLDER}/os_xml/include
2827
${COMMON_FOLDER}/privsep_op/include
2928
${COMMON_FOLDER}/pthreads_op/include
3029
${COMMON_FOLDER}/stringHelper/include

0 commit comments

Comments
 (0)