- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly
For automated changes based on OAI PL v1.1:
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml
The rest (cmake, files with missing license, cmake) manually.
46 lines
968 B
C
46 lines
968 B
C
/*
|
|
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
|
*/
|
|
|
|
#include "logger.h"
|
|
#include "logger_defs.h"
|
|
#include "event.h"
|
|
#include "database.h"
|
|
#include "handler.h"
|
|
#include "filter/filter.h"
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
struct timelog {
|
|
struct logger common;
|
|
};
|
|
|
|
static void _event(void *p, event e)
|
|
{
|
|
struct timelog *l = p;
|
|
int i;
|
|
|
|
if (l->common.filter != NULL && filter_eval(l->common.filter, e) == 0)
|
|
return;
|
|
|
|
for (i = 0; i < l->common.vsize; i++)
|
|
l->common.v[i]->append(l->common.v[i], e.sending_time);
|
|
}
|
|
|
|
logger *new_timelog(event_handler *h, void *database, char *event_name)
|
|
{
|
|
struct timelog *ret;
|
|
int event_id;
|
|
|
|
ret = calloc(1, sizeof(struct timelog)); if (ret == NULL) abort();
|
|
|
|
ret->common.event_name = strdup(event_name);
|
|
if (ret->common.event_name == NULL) abort();
|
|
|
|
event_id = event_id_from_name(database, event_name);
|
|
|
|
ret->common.handler_id = register_handler_function(h,event_id,_event,ret);
|
|
|
|
return ret;
|
|
}
|