reformat code

This commit is contained in:
PolynomialDivision 2018-01-23 12:40:56 +01:00
parent 96be14940c
commit 5d52c806e6

View file

@ -80,8 +80,7 @@ static void client_read_cb(struct ustream *s, int bytes) {
//printf("RECEIVED String: %s\n", str); //printf("RECEIVED String: %s\n", str);
if(network_config.use_symm_enc) if (network_config.use_symm_enc) {
{
char *base64_dec_str = malloc(B64_DECODE_LEN(strlen(str))); char *base64_dec_str = malloc(B64_DECODE_LEN(strlen(str)));
int base64_dec_length = b64_decode(str, base64_dec_str, B64_DECODE_LEN(strlen(str))); int base64_dec_length = b64_decode(str, base64_dec_str, B64_DECODE_LEN(strlen(str)));
char *dec = gcrypt_decrypt_msg(base64_dec_str, base64_dec_length); char *dec = gcrypt_decrypt_msg(base64_dec_str, base64_dec_length);
@ -194,7 +193,7 @@ void send_tcp(char *msg) {
printf("SENDING TCP!\n"); printf("SENDING TCP!\n");
pthread_mutex_lock(&tcp_array_mutex); pthread_mutex_lock(&tcp_array_mutex);
if(network_config.use_symm_enc) { if (network_config.use_symm_enc) {
int length_enc; int length_enc;
size_t msglen = strlen(msg); size_t msglen = strlen(msg);
char *enc = gcrypt_encrypt_msg(msg, msglen + 1, &length_enc); char *enc = gcrypt_encrypt_msg(msg, msglen + 1, &length_enc);