Code freezes if dsl line is down

Thanks SurferTim. Appreciate the pointers.

I came across this site http://biskandar.com/2012/10/10/make-your-arduino-talks-to-the-world/ and used the code to add a ping check to my sketch.

So whenever I want to upload the log data, I first run the ping ( all 2 lines of code ) and if the ping returns "Request Timed Out" then I skip the log upload for 1 minute and then try again.

The ping appears really fast ( compared to trying to 'connect' to a web server ) so it has little effect on the execution of the rest of the code.

Thanks to all for the help.