Skip to content

Commit

Permalink
rtpengine: clang-format for coherent indentation and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxmaniac committed May 18, 2023
1 parent 5f48f91 commit 37af6df
Show file tree
Hide file tree
Showing 11 changed files with 2,346 additions and 2,033 deletions.
392 changes: 226 additions & 166 deletions src/modules/rtpengine/bencode.c

Large diffs are not rendered by default.

342 changes: 205 additions & 137 deletions src/modules/rtpengine/bencode.h

Large diffs are not rendered by default.

51 changes: 27 additions & 24 deletions src/modules/rtpengine/config.c
Expand Up @@ -30,29 +30,32 @@

#include "config.h"

struct cfg_group_rtpengine default_rtpengine_cfg = {
60, /* default disable timeout in seconds */
1, /* default aggressive_redetection enabled */
1000, /* default wait timeout in milliseconds */
MAX_RTPP_TRIED_NODES,
5, /* rtprengine retries */
};
struct cfg_group_rtpengine default_rtpengine_cfg = {
60, /* default disable timeout in seconds */
1, /* default aggressive_redetection enabled */
1000, /* default wait timeout in milliseconds */
MAX_RTPP_TRIED_NODES, 5, /* rtprengine retries */
};

void *rtpengine_cfg = &default_rtpengine_cfg;
void *rtpengine_cfg = &default_rtpengine_cfg;

cfg_def_t rtpengine_cfg_def[] = {
{"rtpengine_disable_tout", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
"The time after which rtpengine module will try to communicate"
" with an RTPEngine instance after it has been marked disabled automatically. "},
{"aggressive_redetection", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
"Determines if the sip proxy should force a query of all nodes"
" when all RTPEngine instances seem unavailable."},
{"rtpengine_tout_ms", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
"The total number of nodes inside a set to be queried before giving up"
" establishing a session"},
{"queried_nodes_limit", CFG_VAR_INT | CFG_ATOMIC, 0, MAX_RTPP_TRIED_NODES, 0, 0,
"Timeout value expressed in milliseconds to wait for reply from RTPEngine"},
{"rtpengine_retr", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
"How many times the module should retry to send and receive after timeout was generated"},
{0, 0, 0, 0, 0, 0}
};
cfg_def_t rtpengine_cfg_def[] = {
{"rtpengine_disable_tout", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
"The time after which rtpengine module will try to communicate"
" with an RTPEngine instance after it has been marked disabled "
"automatically. "},
{"aggressive_redetection", CFG_VAR_INT | CFG_ATOMIC, 0, 1, 0, 0,
"Determines if the sip proxy should force a query of all nodes"
" when all RTPEngine instances seem unavailable."},
{"rtpengine_tout_ms", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
"The total number of nodes inside a set to be queried before "
"giving up"
" establishing a session"},
{"queried_nodes_limit", CFG_VAR_INT | CFG_ATOMIC, 0,
MAX_RTPP_TRIED_NODES, 0, 0,
"Timeout value expressed in milliseconds to wait for reply "
"from RTPEngine"},
{"rtpengine_retr", CFG_VAR_INT | CFG_ATOMIC, 0, 0, 0, 0,
"How many times the module should retry to send and receive "
"after timeout was generated"},
{0, 0, 0, 0, 0, 0}};
23 changes: 12 additions & 11 deletions src/modules/rtpengine/config.h
Expand Up @@ -24,19 +24,20 @@

#include "../../core/cfg/cfg.h"

#define MAX_RTPP_TRIED_NODES 30

struct cfg_group_rtpengine {
unsigned int rtpengine_disable_tout;
unsigned int aggressive_redetection;
unsigned int rtpengine_tout_ms;
unsigned int queried_nodes_limit;
unsigned int rtpengine_retr;
#define MAX_RTPP_TRIED_NODES 30

struct cfg_group_rtpengine
{
unsigned int rtpengine_disable_tout;
unsigned int aggressive_redetection;
unsigned int rtpengine_tout_ms;
unsigned int queried_nodes_limit;
unsigned int rtpengine_retr;
};

extern struct cfg_group_rtpengine default_rtpengine_cfg;
extern void *rtpengine_cfg;
extern cfg_def_t rtpengine_cfg_def[];
extern struct cfg_group_rtpengine default_rtpengine_cfg;
extern void *rtpengine_cfg;
extern cfg_def_t rtpengine_cfg_def[];


#endif

0 comments on commit 37af6df

Please sign in to comment.