mirror of
https://github.com/outbackdingo/parodus.git
synced 2026-01-28 02:20:02 +00:00
Compare commits
1 Commits
master
...
trace_reve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8957afc6bc |
47
src/config.c
47
src/config.c
@@ -711,53 +711,6 @@ int parseCommandLine(int argc,char **argv,ParodusCfg * cfg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void free_cfg(ParodusCfg *cfg)
|
||||
{
|
||||
if(cfg != NULL)
|
||||
{
|
||||
if (cfg->mtls_client_cert_path != NULL )
|
||||
{
|
||||
free(cfg->mtls_client_cert_path);
|
||||
cfg->mtls_client_cert_path = NULL;
|
||||
}
|
||||
if(cfg->connection_health_file != NULL)
|
||||
{
|
||||
free(cfg->connection_health_file);
|
||||
cfg->connection_health_file = NULL;
|
||||
}
|
||||
if(cfg->token_server_url != NULL)
|
||||
{
|
||||
free(cfg->token_server_url );
|
||||
cfg->token_server_url = NULL;
|
||||
}
|
||||
if(cfg->mtls_client_key_path != NULL)
|
||||
{
|
||||
free(cfg->mtls_client_key_path);
|
||||
cfg->mtls_client_key_path = NULL;
|
||||
}
|
||||
if(cfg->client_cert_path != NULL)
|
||||
{
|
||||
free(cfg->client_cert_path);
|
||||
cfg->client_cert_path = NULL;
|
||||
}
|
||||
if(cfg->crud_config_file != NULL)
|
||||
{
|
||||
free(cfg->crud_config_file);
|
||||
cfg->crud_config_file = NULL;
|
||||
}
|
||||
if(cfg->close_reason_file != NULL)
|
||||
{
|
||||
free(cfg->close_reason_file);
|
||||
cfg->close_reason_file = NULL;
|
||||
}
|
||||
if(cfg->cloud_disconnect != NULL)
|
||||
{
|
||||
free(cfg->cloud_disconnect);
|
||||
cfg->cloud_disconnect = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setDefaultValuesToCfg(ParodusCfg *cfg)
|
||||
{
|
||||
if(cfg == NULL)
|
||||
|
||||
@@ -135,7 +135,7 @@ void loadParodusCfg(ParodusCfg * config,ParodusCfg *cfg);
|
||||
* or -1 if error
|
||||
*/
|
||||
int parseCommandLine(int argc,char **argv,ParodusCfg * cfg);
|
||||
void free_cfg(ParodusCfg *cfg);
|
||||
|
||||
void setDefaultValuesToCfg(ParodusCfg *cfg);
|
||||
// Accessor for the global config structure.
|
||||
ParodusCfg *get_parodus_cfg(void);
|
||||
|
||||
@@ -231,9 +231,6 @@ void createSocketConnection(void (* initKeypress)())
|
||||
nopoll_ctx_unref(ctx);
|
||||
nopoll_cleanup_library();
|
||||
curl_global_cleanup();
|
||||
clear_metadata();
|
||||
rdk_logger_deinit();
|
||||
free_server_list(&server_list);
|
||||
}
|
||||
|
||||
void shutdownSocketConnection(char *reason) {
|
||||
|
||||
@@ -131,7 +131,7 @@ int main( int argc, char **argv)
|
||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
|
||||
createSocketConnection( NULL);
|
||||
free_cfg(cfg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,11 +110,6 @@ void packMetaData()
|
||||
ParodusError("Failed to encode metadata\n");
|
||||
}
|
||||
}
|
||||
|
||||
void clear_metadata(){
|
||||
if(metadataPack != NULL)
|
||||
free(metadataPack);
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief To handle UpStream messages which is received from nanomsg server socket
|
||||
@@ -325,10 +320,7 @@ void *processUpstreamMessage()
|
||||
}
|
||||
else if(msgType == WRP_MSG_TYPE__EVENT)
|
||||
{
|
||||
(msg->u.event.headers != NULL && msg->u.event.headers->headers[0] != NULL && msg->u.event.headers->headers[1] != NULL) ? ParodusInfo(" Received upstream event data: dest '%s' traceParent: %s traceState: %s\n", msg->u.event.dest, msg->u.event.headers->headers[0], msg->u.event.headers->headers[1]) : ParodusInfo(" Received upstream event data: dest '%s'\n", msg->u.event.dest);
|
||||
if(msg->u.event.transaction_uuid != NULL) {
|
||||
ParodusInfo("transaction_uuid in event: %s\n", msg->u.event.transaction_uuid);
|
||||
}
|
||||
ParodusInfo(" Received upstream event data: dest '%s'\n", msg->u.event.dest);
|
||||
partners_t *partnersList = NULL;
|
||||
int j = 0;
|
||||
|
||||
@@ -387,7 +379,7 @@ void *processUpstreamMessage()
|
||||
//Sending to server for msgTypes 3, 5, 6, 7, 8.
|
||||
if( WRP_MSG_TYPE__REQ == msgType )
|
||||
{
|
||||
(msg->u.req.headers != NULL && msg->u.req.headers->headers[0] != NULL && msg->u.req.headers->headers[1] != NULL) ? ParodusInfo(" Received upstream data with MsgType: %d dest: '%s' transaction_uuid: %s traceParent: %s traceState: %s\n", msgType, msg->u.req.dest, msg->u.req.transaction_uuid, msg->u.req.headers->headers[0], msg->u.req.headers->headers[1]) : ParodusInfo(" Received upstream data with MsgType: %d dest: '%s' transaction_uuid: %s\n", msgType, msg->u.req.dest, msg->u.req.transaction_uuid);
|
||||
ParodusInfo(" Received upstream data with MsgType: %d dest: '%s' transaction_uuid: %s\n", msgType, msg->u.req.dest, msg->u.req.transaction_uuid );
|
||||
sendUpstreamMsgToServer(&message->msg, message->len);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -59,7 +59,6 @@ int subscribeCurrentActiveInterfaceEvent();
|
||||
UpStreamMsg * get_global_UpStreamMsgQ(void);
|
||||
pthread_cond_t *get_global_nano_con(void);
|
||||
pthread_mutex_t *get_global_nano_mut(void);
|
||||
void clear_metadata();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user