forked from premiere/premiere-libtorrent
printf formatting fixes
This commit is contained in:
parent
762d7627b7
commit
2cfb4e8205
12
src/upnp.cpp
12
src/upnp.cpp
|
@ -488,15 +488,15 @@ void upnp::on_reply(udp::endpoint const& from, char* buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
char msg[200];
|
char msg[200];
|
||||||
snprintf(msg, sizeof(msg), "found rootdevice: %s (%lu)"
|
snprintf(msg, sizeof(msg), "found rootdevice: %s (%d)"
|
||||||
, d.url.c_str(), m_devices.size());
|
, d.url.c_str(), int(m_devices.size()));
|
||||||
log(msg);
|
log(msg);
|
||||||
|
|
||||||
if (m_devices.size() >= 50)
|
if (m_devices.size() >= 50)
|
||||||
{
|
{
|
||||||
char msg[200];
|
char msg[200];
|
||||||
snprintf(msg, sizeof(msg), "too many rootdevices: (%lu). Ignoring %s"
|
snprintf(msg, sizeof(msg), "too many rootdevices: (%d). Ignoring %s"
|
||||||
, m_devices.size(), d.url.c_str());
|
, int(m_devices.size()), d.url.c_str());
|
||||||
log(msg);
|
log(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -569,11 +569,11 @@ void upnp::post(upnp::rootdevice const& d, char const* soap
|
||||||
snprintf(header, sizeof(header), "POST %s HTTP/1.0\r\n"
|
snprintf(header, sizeof(header), "POST %s HTTP/1.0\r\n"
|
||||||
"Host: %s:%u\r\n"
|
"Host: %s:%u\r\n"
|
||||||
"Content-Type: text/xml; charset=\"utf-8\"\r\n"
|
"Content-Type: text/xml; charset=\"utf-8\"\r\n"
|
||||||
"Content-Length: %lu\r\n"
|
"Content-Length: %d\r\n"
|
||||||
"Soapaction: \"%s#%s\"\r\n\r\n"
|
"Soapaction: \"%s#%s\"\r\n\r\n"
|
||||||
"%s"
|
"%s"
|
||||||
, d.path.c_str(), d.hostname.c_str(), d.port
|
, d.path.c_str(), d.hostname.c_str(), d.port
|
||||||
, strlen(soap), d.service_namespace, soap_action
|
, int(strlen(soap)), d.service_namespace, soap_action
|
||||||
, soap);
|
, soap);
|
||||||
|
|
||||||
d.upnp_connection->sendbuffer = header;
|
d.upnp_connection->sendbuffer = header;
|
||||||
|
|
Loading…
Reference in New Issue