Skip to content

Commit

Permalink
outbound: 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 eb8c5c4 commit 3b770d3
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 188 deletions.
13 changes: 7 additions & 6 deletions src/modules/outbound/api.h
Expand Up @@ -31,24 +31,25 @@
#include "../../core/sr_module.h"

typedef int (*encode_flow_token_t)(str *, struct receive_info *);
typedef int (*decode_flow_token_t)(struct sip_msg *, struct receive_info **, str);
typedef int (*decode_flow_token_t)(
struct sip_msg *, struct receive_info **, str);
typedef int (*use_outbound_t)(struct sip_msg *);

typedef struct ob_binds {
typedef struct ob_binds
{
encode_flow_token_t encode_flow_token;
decode_flow_token_t decode_flow_token;
use_outbound_t use_outbound;
} ob_api_t;

typedef int (*bind_ob_f)(ob_api_t*);
typedef int (*bind_ob_f)(ob_api_t *);

int bind_ob(struct ob_binds*);
int bind_ob(struct ob_binds *);

inline static int ob_load_api(ob_api_t *pxb)
{
bind_ob_f bind_ob_exports;
if (!(bind_ob_exports = (bind_ob_f)find_export("bind_ob", 1, 0)))
{
if(!(bind_ob_exports = (bind_ob_f)find_export("bind_ob", 1, 0))) {
LM_INFO("unable to import bind_ob - maybe module is not loaded\n");
return -1;
}
Expand Down
10 changes: 4 additions & 6 deletions src/modules/outbound/config.c
Expand Up @@ -32,15 +32,13 @@
#include "config.h"

struct cfg_group_outbound default_outbound_cfg = {
0, /* Read only variable to mark if outbound is enabled */
0, /* Read only variable to mark if outbound is enabled */
};

void *outbound_cfg = &default_outbound_cfg;

cfg_def_t outbound_cfg_def[] = {
{ "outbound_enabled", CFG_VAR_INT | CFG_ATOMIC | CFG_READONLY,
0, 0, 0, 0,
"If set to one (true) Outbound is enabled." },
{"outbound_enabled", CFG_VAR_INT | CFG_ATOMIC | CFG_READONLY, 0, 0, 0,
0, "If set to one (true) Outbound is enabled."},

{0, 0, 0, 0, 0, 0}
};
{0, 0, 0, 0, 0, 0}};
3 changes: 2 additions & 1 deletion src/modules/outbound/config.h
Expand Up @@ -34,7 +34,8 @@

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

struct cfg_group_outbound {
struct cfg_group_outbound
{
int outbound_active;
};

Expand Down

0 comments on commit 3b770d3

Please sign in to comment.