Earlier DTLS transmit patch, moved local variable definition to top of block