 	wifly.println('"');
 	wifly.println(F("Content-Type: text/xml; charset=\"utf-8\""));
 	wifly.print(F("Content-Length: "));
-	wifly.println(strlen_P((const prog_char *)xmlreq));
+	wifly.println(strlen_P((const char *)xmlreq));
 	wifly.println();
 	wifly.println(xmlreq);
 	wifly.println();
     } else {
         Serial.println(F("Failed to connect"));
+        return false;
     }
+    return true;
 }

	wifly.gets(date, dateSize);
    }

    if (!wifly.match(F("<NewByteSendRate>"))) {
        Serial.println(F("failed to find NewByteSendRate"));
	return false;
    }

    *txRate = wifly.parseInt();

    if (!wifly.match(F("<NewByteReceiveRate>"))) {
        Serial.println(F("failed to find NewByteReceiveRate"));
	return false;
    }


// Send a SOAP request
bool sendSoapReq(
    const char *host, 
    uint16_t port, 
    const __FlashStringHelper *path, 
    const __FlashStringHelper *action, 
