Skip to content

Commit

Permalink
osp: 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 34f4c5a commit eb8c5c4
Show file tree
Hide file tree
Showing 19 changed files with 2,055 additions and 2,286 deletions.
463 changes: 225 additions & 238 deletions src/modules/osp/destination.c

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions src/modules/osp/destination.h
Expand Up @@ -34,46 +34,46 @@
#include <time.h>
#include "osp_mod.h"

typedef struct _osp_dest {
char validafter[OSP_STRBUF_SIZE];
char validuntil[OSP_STRBUF_SIZE];
char callid[OSP_STRBUF_SIZE];
char called[OSP_STRBUF_SIZE];
char calling[OSP_STRBUF_SIZE];
char source[OSP_STRBUF_SIZE];
char srcdev[OSP_STRBUF_SIZE];
char host[OSP_STRBUF_SIZE];
char destdev[OSP_STRBUF_SIZE];
char networkid[OSP_STRBUF_SIZE];
unsigned char token[OSP_TOKENBUF_SIZE];
unsigned int callidsize;
unsigned int tokensize;
unsigned int timelimit;
int lastcode;
time_t authtime;
time_t time100;
time_t time180;
time_t time200;
int type;
unsigned long long transid;
int supported;
int used;
int reported;
unsigned int destinationCount;
char origcalled[OSP_STRBUF_SIZE];
typedef struct _osp_dest
{
char validafter[OSP_STRBUF_SIZE];
char validuntil[OSP_STRBUF_SIZE];
char callid[OSP_STRBUF_SIZE];
char called[OSP_STRBUF_SIZE];
char calling[OSP_STRBUF_SIZE];
char source[OSP_STRBUF_SIZE];
char srcdev[OSP_STRBUF_SIZE];
char host[OSP_STRBUF_SIZE];
char destdev[OSP_STRBUF_SIZE];
char networkid[OSP_STRBUF_SIZE];
unsigned char token[OSP_TOKENBUF_SIZE];
unsigned int callidsize;
unsigned int tokensize;
unsigned int timelimit;
int lastcode;
time_t authtime;
time_t time100;
time_t time180;
time_t time200;
int type;
unsigned long long transid;
int supported;
int used;
int reported;
unsigned int destinationCount;
char origcalled[OSP_STRBUF_SIZE];
} osp_dest;

osp_dest* ospInitDestination(osp_dest* dest);
int ospSaveOrigDestination(osp_dest* dest);
int ospSaveTermDestination(osp_dest* dest);
osp_dest *ospInitDestination(osp_dest *dest);
int ospSaveOrigDestination(osp_dest *dest);
int ospSaveTermDestination(osp_dest *dest);
int ospCheckOrigDestination(void);
osp_dest* ospGetNextOrigDestination(void);
osp_dest* ospGetLastOrigDestination(void);
osp_dest* ospGetTermDestination(void);
osp_dest *ospGetNextOrigDestination(void);
osp_dest *ospGetLastOrigDestination(void);
osp_dest *ospGetTermDestination(void);
void ospRecordEvent(int clientcode, int servercode);
void ospDumpDestination(osp_dest* dest);
void ospDumpDestination(osp_dest *dest);
void ospDumpAllDestination(void);
void ospConvertAddress(char* src, char* dst, int buffersize);
void ospConvertAddress(char *src, char *dst, int buffersize);

#endif /* _OSP_MOD_DESTINATION_H_ */

26 changes: 12 additions & 14 deletions src/modules/osp/globals.c
Expand Up @@ -34,18 +34,17 @@
#include "osp_mod.h"

unsigned int _osp_sp_number;
char* _osp_sp_uris[OSP_DEF_SPS];
unsigned long _osp_sp_weights[OSP_DEF_SPS] = {
OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT
};
char* _osp_device_ip = NULL;
char* _osp_device_port = NULL;
unsigned char* _osp_private_key = NULL;
unsigned char* _osp_local_certificate = NULL;
unsigned char* _osp_ca_certificate = NULL;
char *_osp_sp_uris[OSP_DEF_SPS];
unsigned long _osp_sp_weights[OSP_DEF_SPS] = {OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT, OSP_DEF_WEIGHT,
OSP_DEF_WEIGHT, OSP_DEF_WEIGHT};
char *_osp_device_ip = NULL;
char *_osp_device_port = NULL;
unsigned char *_osp_private_key = NULL;
unsigned char *_osp_local_certificate = NULL;
unsigned char *_osp_ca_certificate = NULL;
int _osp_crypto_hw = OSP_DEF_HW;
int _osp_validate_callid = OSP_DEF_CALLID;
int _osp_token_format = OSP_DEF_TOKEN;
Expand All @@ -60,9 +59,8 @@ int _osp_redir_uri = OSP_DEF_REDIRURI;
char _osp_PRIVATE_KEY[OSP_KEYBUF_SIZE];
char _osp_LOCAL_CERTIFICATE[OSP_KEYBUF_SIZE];
char _osp_CA_CERTIFICATE[OSP_KEYBUF_SIZE];
char* _osp_snid_avp = OSP_DEF_SNIDAVP;
char *_osp_snid_avp = OSP_DEF_SNIDAVP;
int_str _osp_snid_avpname;
unsigned short _osp_snid_avptype;

OSPTPROVHANDLE _osp_provider = -1;

0 comments on commit eb8c5c4

Please sign in to comment.