Fixed bug with logger_log

This commit is contained in:
Bazsalanszky 2019-11-18 08:58:56 +01:00
parent fae36833fa
commit 98e49d3d65
No known key found for this signature in database
GPG key ID: 7BC6C5C44078ACB4
2 changed files with 3 additions and 1 deletions

View file

@ -103,7 +103,7 @@ int peer_ConnetctTo(char* ip, int port, PeerList* peerList, Node_data my, fd_set
tmp = strtok(NULL,",");
}
}
//free(m.pairs);
free(m.pairs);
logger_log("Peer validated (%s->%s)!",inet_ntoa(hint.sin_addr),node.id);
return 0;
}

View file

@ -71,6 +71,8 @@ void logger_log(const char* _Format, ...){
va_list args;
va_start (args, _Format);
vprintf(_Format,args);
va_end(args);
va_start (args, _Format);
vfprintf(fp,_Format,args);
va_end(args);
fprintf(fp,"\n");