check if server 'from' is not NULL. this prevented regular UDP messages to be sent (seg fault)
use macro MIN_ instead of math. fmin