39 #include "safec_lib.h"
58 int insertPCNode(GList **pch,
char *pattern,
char *header, DType_t dtype,
int count,
char *data)
63 new = (
pcdata_t *) malloc(
sizeof(*
new));
65 if (pattern != NULL) {
66 new->pattern = strdup(pattern);
67 if (!(new->pattern)) {
76 new->header = strdup(header);
90 }
else if (dtype == STR) {
92 new->data = strdup(data);
103 *pch = g_list_append(*pch ,
new);
121 if (tmp && tmp->pattern && NULL != strstr(sp, tmp->pattern)) {
138 fnode = g_list_find_custom(pch, pattern, (GCompareFunc)
comparePattern);
153 UNREFERENCED_PARAMETER(user_data);
156 LOG(
"node pattern:%s, header:%s", node->pattern, node->header);
157 if (node->d_type == INT) {
158 LOG(
"\tcount:%d", node->count);
159 }
else if (node->d_type == STR) {
160 LOG(
"\tdata:%s", node->data);
185 if (NULL != tmp->pattern) {
189 if (NULL != tmp->header) {
193 if (tmp->d_type == STR) {
194 if (NULL != tmp->data) {