src/upstream.c
void createUpstreamRetrieveMsg(wrp_msg_t *message, wrp_msg_t **retrieve_msg)
{
	wrp_msg_t *msg;
	msg = ( wrp_msg_t * ) malloc( sizeof( wrp_msg_t ) );
	if(msg != NULL)
    {
		memset(msg, 0, sizeof(wrp_msg_t));

		msg->msg_type = message->msg_type;
		if(message->u.crud.transaction_uuid != NULL)
		{
			msg->u.crud.transaction_uuid = strdup(message->u.crud.transaction_uuid);
		}
		if(message->u.crud.source !=NULL)
		{
			msg->u.crud.source = strdup(message->u.crud.source);
		}
		if(message->u.crud.dest != NULL)
		{
			msg->u.crud.dest = strdup(message->u.crud.dest);
		}
		*retrieve_msg = msg;
	}
}
/**
 * @brief createUpstreamRetrieveMsg function to create new message for processing Retrieve requests
 *
 * @param[in] message The upstream message received from cloud or internal clients
 * @param[out] retrieve_msg New message for processing Retrieve requests
 */
@brief createUpstreamRetrieveMsg function to create new message for processing Retrieve requests
@param[in] message The upstream message received from cloud or internal clients
@param[out] retrieve_msg New message for processing Retrieve requests
@brief createUpstreamRetrieveMsg function to create new message for processing Retrieve requests @param [ in ] message The upstream message received from cloud or internal clients @param [ out ] retrieve_msg New message for processing Retrieve requests
void createUpstreamRetrieveMsg(wrp_msg_t *message, wrp_msg_t **retrieve_msg)
{
	wrp_msg_t *msg;
	msg = ( wrp_msg_t * ) malloc( sizeof( wrp_msg_t ) );
	if(msg != NULL)
    {
		memset(msg, 0, sizeof(wrp_msg_t));
		msg->msg_type = message->msg_type;
		if(message->u.crud.transaction_uuid != NULL)
		{
			msg->u.crud.transaction_uuid = strdup(message->u.crud.transaction_uuid);
		}
		if(message->u.crud.source !=NULL)
		{
			msg->u.crud.source = strdup(message->u.crud.source);
		}
		if(message->u.crud.dest != NULL)
		{
			msg->u.crud.dest = strdup(message->u.crud.dest);
		}
		*retrieve_msg = msg;
	}
}
void createUpstreamRetrieveMsg ( wrp_msg_t * message , wrp_msg_t * * retrieve_msg ) { wrp_msg_t * msg ; msg = ( wrp_msg_t * ) malloc ( sizeof ( wrp_msg_t ) ) ; if ( msg != NULL ) { memset ( msg , 0 , sizeof ( wrp_msg_t ) ) ; msg -> msg_type = message -> msg_type ; if ( message -> u . crud . transaction_uuid != NULL ) { msg -> u . crud . transaction_uuid = strdup ( message -> u . crud . transaction_uuid ) ; } if ( message -> u . crud . source != NULL ) { msg -> u . crud . source = strdup ( message -> u . crud . source ) ; } if ( message -> u . crud . dest != NULL ) { msg -> u . crud . dest = strdup ( message -> u . crud . dest ) ; } * retrieve_msg = msg ; } }
@brief createUpstreamRetrieveMsg function to create new message for processing Retrieve requests
 @param[in] message The upstream message received from cloud or internal clients
 @param[out] retrieve_msg New message for processing Retrieve requests
@brief createUpstreamRetrieveMsg function to create new message for processing Retrieve requests @param [ in ] message The upstream message received from cloud or internal clients @param [ out ] retrieve_msg New message for processing Retrieve requests