Project

General

Profile

Actions

Bug #4816

closed

osmo-bts has rate_ctr_desc definitions in header file

Added by laforge over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
10/18/2020
Due date:
% Done:

100%

Spec Reference:

Description

a header file should only contain declarations, not entire definitions.

The fact that we have constructs like

static const struct rate_ctr_desc bts_ctr_description[] = {
       [BTS_CTR_CHREQ_TOTAL] =                 {"chreq:total", "Received channel requests"},

in a header file means that very C file including this header file will get its own private copy of the entire definition.

The header file should only include this declaration:

extern const struct rate_ctr_desc bts_ctr_description[];

and the actual non-static definition should be in a C file.

Actions #1

Updated by fixeria over 3 years ago

  • Status changed from New to In Progress
  • Assignee changed from 4368 to fixeria

Given that I am currently working on osmo-bts-trx, I can quickly fix this.

Actions #2

Updated by fixeria over 3 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100

https://gerrit.osmocom.org/c/osmo-bsc/+/20731 bts: move rate counter / stat item definitions from *.h to *.c

Actions #3

Updated by fixeria over 3 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)