Project

General

Profile

Feature #4372

Replace osmo_sccp_timer_val with osmo_tdef

Added by pespin 29 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
01/21/2020
Due date:
% Done:

0%

Spec Reference:

Description

libosmo-sccp internally uses its own set of structs called osmo_sccp_timer_val, which basically duplicates what osmo_tdef already does in libosmocore.

Since that struct is only used internally (and exported only in src/sccp_internal.h), we can easily drop it and replace it with libosmocore's osmo_tdef.

src/sccp_internal.h
25:struct osmo_sccp_timer_val {
30:extern const struct osmo_sccp_timer_val osmo_sccp_timer_defaults[];
57:     struct osmo_sccp_timer_val timers[OSMO_SCCP_TIMERS_COUNT];
127:const struct osmo_sccp_timer_val *osmo_sccp_timer_get(const struct osmo_sccp_instance *inst,

src/sccp_vty.c
151:    struct osmo_sccp_timer_val set_val = { .s = atoi(argv[1]) };
168:static const char *osmo_sccp_timer_val_name(const struct osmo_sccp_timer_val *val)
190:            const struct osmo_sccp_timer_val *def;
202:                                 osmo_sccp_timer_val_name(def));
219:            const struct osmo_sccp_timer_val *val = osmo_sccp_timer_get(inst, i, default_if_unset);
223:                    osmo_sccp_timer_val_name(val), VTY_NEWLINE);

src/sccp_scoc.c
278:const struct osmo_sccp_timer_val osmo_sccp_timer_defaults[] = {
297:const struct osmo_sccp_timer_val *osmo_sccp_timer_get(const struct osmo_sccp_instance *inst,
301:    const struct osmo_sccp_timer_val *val;
302:    const struct osmo_sccp_timer_val *def;
331:    const struct osmo_sccp_timer_val *val = osmo_sccp_timer_get(conn->inst, timer_name, true);

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)