upload: increase buffer size to 4000 and fix size checks
upload: unlock mutex before quit
upload: change seqNo to unsigned int

plus cleanup
change get_per_second parameters to long
always terminate ESSIDs strings
make sure packet essid string is null terminated