@@ -73,7 +73,7 @@ static const char _ssdp_packet_template[] PROGMEM =
7373 " SERVER: Arduino/1.0 UPNP/1.1 %s/%s\r\n " // _modelName, _modelNumber
7474 " USN: %s\r\n " // _uuid
7575 " %s: %s\r\n " // "NT" or "ST", _deviceType
76- " LOCATION: http://%u.%u.%u.%u :%u/%s\r\n " // WiFi.localIP(), _port, _schemaURL
76+ " LOCATION: http://%s :%u/%s\r\n " // WiFi.localIP(), _port, _schemaURL
7777 " \r\n " ;
7878
7979static const char _ssdp_schema_template[] PROGMEM =
@@ -88,7 +88,7 @@ static const char _ssdp_schema_template[] PROGMEM =
8888 " <major>1</major>"
8989 " <minor>0</minor>"
9090 " </specVersion>"
91- " <URLBase>http://%u.%u.%u.%u :%u/</URLBase>" // WiFi.localIP(), _port
91+ " <URLBase>http://%s :%u/</URLBase>" // WiFi.localIP(), _port
9292 " <device>"
9393 " <deviceType>%s</deviceType>"
9494 " <friendlyName>%s</friendlyName>"
@@ -247,7 +247,7 @@ void SSDPClass::_send(ssdp_method_t method) {
247247 _uuid,
248248 (method == NONE) ? " ST" : " NT" ,
249249 (_st_is_uuid) ? _uuid : _deviceType,
250- ip[ 0 ], ip[ 1 ], ip[ 2 ], ip[ 3 ] , _port, _schemaURL
250+ ip. toString (). c_str () , _port, _schemaURL
251251 );
252252
253253 _server->append (buffer, len);
@@ -276,12 +276,12 @@ void SSDPClass::_send(ssdp_method_t method) {
276276 _server->send (remoteAddr, remotePort);
277277}
278278
279- void SSDPClass::schema (WiFiClient client) {
279+ void SSDPClass::schema (Print & client) const {
280280 IPAddress ip = WiFi.localIP ();
281281 char buffer[strlen_P (_ssdp_schema_template) + 1 ];
282282 strcpy_P (buffer, _ssdp_schema_template);
283283 client.printf (buffer,
284- ip[ 0 ], ip[ 1 ], ip[ 2 ], ip[ 3 ] , _port,
284+ ip. toString (). c_str () , _port,
285285 _deviceType,
286286 _friendlyName,
287287 _presentationURL,
0 commit comments