diff options
| author | 2015-12-09 11:58:53 +0000 | |
|---|---|---|
| committer | 2015-12-19 02:40:22 +0000 | |
| commit | 7d4516afc4cd194f9224dcd5e07e0f234c162fdf (patch) | |
| tree | a1a165c897339fcbd35a27108fe16c999a3041e2 /src/modules/upnp | |
| parent | Merge pull request #1776 from TheReign/issue_1754_2 (diff) | |
| download | KVIrc-7d4516afc4cd194f9224dcd5e07e0f234c162fdf.tar.gz KVIrc-7d4516afc4cd194f9224dcd5e07e0f234c162fdf.tar.bz2 KVIrc-7d4516afc4cd194f9224dcd5e07e0f234c162fdf.zip | |
src/modules typos: capitalize, formatting, consistency and syntax fixes
Diffstat (limited to 'src/modules/upnp')
| -rw-r--r-- | src/modules/upnp/Manager.cpp | 6 | ||||
| -rw-r--r-- | src/modules/upnp/RootService.cpp | 4 | ||||
| -rw-r--r-- | src/modules/upnp/Service.cpp | 14 | ||||
| -rw-r--r-- | src/modules/upnp/SsdpConnection.cpp | 6 | ||||
| -rw-r--r-- | src/modules/upnp/WanConnectionService.cpp | 8 | ||||
| -rw-r--r-- | src/modules/upnp/XmlFunctions.cpp | 4 | ||||
| -rw-r--r-- | src/modules/upnp/igdcontrolpoint.cpp | 12 | ||||
| -rw-r--r-- | src/modules/upnp/libkviupnp.cpp | 12 |
8 files changed, 33 insertions, 33 deletions
diff --git a/src/modules/upnp/Manager.cpp b/src/modules/upnp/Manager.cpp index 7d80ae177..4bb41969b 100644 --- a/src/modules/upnp/Manager.cpp +++ b/src/modules/upnp/Manager.cpp @@ -73,7 +73,7 @@ Manager::~Manager() // Initialize the manager, detect all devices void Manager::initialize() { - qDebug() << "UPnP::Manager: Initiating a broadcast to detect UPnP devices..." << endl; + qDebug() << "UPnP::Manager: initiating a broadcast to detect UPnP devices..." << endl; // Create the SSDP object to detect devices @@ -144,7 +144,7 @@ void Manager::slotBroadcastTimeout() { if(!m_bBroadcastFoundIt) { - qDebug() << "UPnP::Manager: Timeout, no broadcast response received!" << endl; + qDebug() << "UPnP::Manager: timeout, no broadcast response received!" << endl; m_bBroadcastFailed = true; } @@ -155,7 +155,7 @@ void Manager::slotBroadcastTimeout() // A device was discovered by the SSDP broadcast void Manager::slotDeviceFound(const QString &hostname, int port, const QString &rootUrl) { - qDebug() << "UPnP::Manager: Device found, initializing IgdControlPoint to query it." << endl; + qDebug() << "UPnP::Manager: device found, initializing IgdControlPoint to query it." << endl; // this blocks the action of our timeout timer m_bBroadcastFoundIt = true; diff --git a/src/modules/upnp/RootService.cpp b/src/modules/upnp/RootService.cpp index 08fc3b7cd..abf945da8 100644 --- a/src/modules/upnp/RootService.cpp +++ b/src/modules/upnp/RootService.cpp @@ -158,7 +158,7 @@ RootService::~RootService() // Recursively add all devices and embedded devices to the deviceServices_ map void RootService::addDeviceServices(const QDomNode &device) { - qDebug() << "UPnP Discovered device " << XmlFunctions::getNodeValue(device, "/UDN") << endl; + qDebug() << "UPnP discovered device " << XmlFunctions::getNodeValue(device, "/UDN") << endl; if(XmlFunctions::getNodeValue(device, "/deviceType") == InternetGatewayDeviceType) { @@ -173,7 +173,7 @@ void RootService::addDeviceServices(const QDomNode &device) qDebug() << "Model: " << description << endl; - g_pApp->activeConsole()->output(KVI_OUT_GENERICSTATUS,__tr2qs_ctx("[UPNP]: Found gateway device: %s","upnp"), description.toUtf8().data()); + g_pApp->activeConsole()->output(KVI_OUT_GENERICSTATUS,__tr2qs_ctx("[UPNP]: found gateway device: %s","upnp"), description.toUtf8().data()); } diff --git a/src/modules/upnp/Service.cpp b/src/modules/upnp/Service.cpp index 6d44d3dbf..747250531 100644 --- a/src/modules/upnp/Service.cpp +++ b/src/modules/upnp/Service.cpp @@ -58,7 +58,7 @@ Service::Service(const QString &hostname, int port, const QString &informationUr , m_iPort(port) { m_szInformationUrl = informationUrl; - qDebug() << "UPnP::Service: Created information service url='" << m_szInformationUrl << "'." << endl; + qDebug() << "UPnP::Service: created information service url='" << m_szInformationUrl << "'." << endl; } @@ -239,7 +239,7 @@ void Service::slotRequestFinished() { QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender()); - qDebug() << "UPnP::Service: Got HTTP response for request " << endl; + qDebug() << "UPnP::Service: received HTTP response for request " << endl; if(!reply) { @@ -289,7 +289,7 @@ void Service::slotRequestFinished() if(cutAt > -1) { baseNamespace.truncate(cutAt); - qDebug() << "Device is using " << baseNamespace << " as xml namespace" << endl; + qDebug() << "Device is using " << baseNamespace << " as XML namespace" << endl; m_szBaseXmlPrefix = baseNamespace; } } @@ -297,7 +297,7 @@ void Service::slotRequestFinished() // Determine how to process the data if(xml.namedItem(m_szBaseXmlPrefix + ":Envelope").isNull()) { - qDebug() << "UPnP::Service: Plain XML detected, calling gotInformationResponse()." << endl; + qDebug() << "UPnP::Service: plain XML detected, calling gotInformationResponse()." << endl; // No SOAP envelope found, this is a normal response to callService() gotInformationResponse( xml.lastChild() ); } else { @@ -311,7 +311,7 @@ void Service::slotRequestFinished() { if(resultNode.nodeName().startsWith("m:") || resultNode.nodeName().startsWith("u:")) { - qDebug() << "UPnP::Service: SOAP Envelope detected, calling gotActionResponse()." << endl; + qDebug() << "UPnP::Service: SOAP envelope detected, calling gotActionResponse()." << endl; // Action success, return SOAP body QMap<QString,QString> resultValues; @@ -329,14 +329,14 @@ void Service::slotRequestFinished() gotActionResponse(resultNode.nodeName().mid(2), resultValues); } } else { - qDebug() << "UPnP::Service: SOAP Error detected, calling gotActionResponse()." << endl; + qDebug() << "UPnP::Service: SOAP error detected, calling gotActionResponse()." << endl; // Action failed gotActionErrorResponse(resultNode); } } } else { - qWarning() << "UPnP::Service - XML Parsing failed: " << errorMessage << endl; + qWarning() << "UPnP::Service - XML parsing failed: " << errorMessage << endl; } // Only emit when bytes>0 diff --git a/src/modules/upnp/SsdpConnection.cpp b/src/modules/upnp/SsdpConnection.cpp index d4fdaf717..7440d10d1 100644 --- a/src/modules/upnp/SsdpConnection.cpp +++ b/src/modules/upnp/SsdpConnection.cpp @@ -118,7 +118,7 @@ void SsdpConnection::slotDataReceived() // Send a broadcast to detect all devices void SsdpConnection::queryDevices(int bindPort) { - qDebug() << "UPnP::SsdpConnection: Sending broadcast packet." << endl; + qDebug() << "UPnP::SsdpConnection: sending broadcast packet." << endl; // Send a packet to a broadcast address QHostAddress address("239.255.255.250"); @@ -134,7 +134,7 @@ void SsdpConnection::queryDevices(int bindPort) bool success = m_pSocket->bind(bindPort); if(! success) { - qDebug() << "UPnP::SsdpConnection: Failed to bind to port " << bindPort << "." << endl; + qDebug() << "UPnP::SsdpConnection: failed to bind to port " << bindPort << "." << endl; } // Send the data @@ -143,7 +143,7 @@ void SsdpConnection::queryDevices(int bindPort) if(bytesWritten == -1) { - qDebug() << "UPnP::SsdpConnection: Failed to send the UPnP broadcast packet." << endl; + qDebug() << "UPnP::SsdpConnection: failed to send the UPnP broadcast packet." << endl; } } diff --git a/src/modules/upnp/WanConnectionService.cpp b/src/modules/upnp/WanConnectionService.cpp index 9c900f9b6..9073bb89a 100644 --- a/src/modules/upnp/WanConnectionService.cpp +++ b/src/modules/upnp/WanConnectionService.cpp @@ -113,7 +113,7 @@ const KviPointerList<PortMapping>& WanConnectionService::getPortMappings() const // The control point received a response to callAction() void WanConnectionService::gotActionResponse(const QString &responseType, const QMap<QString,QString> &resultValues) { - qDebug() << "UPnP::WanConnectionService: Parsing action response:" + qDebug() << "UPnP::WanConnectionService: parsing action response:" << " type='" << responseType << "'." << endl; // Check the message type @@ -149,17 +149,17 @@ void WanConnectionService::gotActionResponse(const QString &responseType, const // Register the mapping m_lPortMappings.append(map); - qDebug() << "UPnP::WanConnectionService - Got mapping: " << map->protocol << " " << map->remoteHost << ":" << map->externalPort + qDebug() << "UPnP::WanConnectionService - Received mapping: " << map->protocol << " " << map->remoteHost << ":" << map->externalPort << " to " << map->internalClient << ":" << map->internalPort << " max " << map->leaseDuration << "s '" << map->description << "' " << (map->enabled ? "enabled" : "disabled") << endl; } else if(responseType == "AddPortMappingResponse") { - qDebug() << "UPnP::WanConnectionService - Got mapping enabled" << endl; + qDebug() << "UPnP::WanConnectionService - Received mapping enabled" << endl; } else if(responseType == "DeletePortMappingResponse") { - qDebug() << "UPnP::WanConnectionService - Got mapping disabled" << endl; + qDebug() << "UPnP::WanConnectionService - Received mapping disabled" << endl; } else { diff --git a/src/modules/upnp/XmlFunctions.cpp b/src/modules/upnp/XmlFunctions.cpp index 1fe7d0a7a..39927fe74 100644 --- a/src/modules/upnp/XmlFunctions.cpp +++ b/src/modules/upnp/XmlFunctions.cpp @@ -56,7 +56,7 @@ QDomNode XmlFunctions::getNode( const QDomNode &rootNode, const QString &path ) } if( childNode.isNull() ) { - qDebug() << "XmlFunctions::getNode() - notice: node '" << pathItems[ i - 1 ] << "'" + qDebug() << "XmlFunctions::getNode() - Notice: node '" << pathItems[ i - 1 ] << "'" << " does not exist (root=" << rootNode.nodeName() << " path=" << path << ")." << endl; } @@ -106,7 +106,7 @@ QString XmlFunctions::getNodeValue( const QDomNode &rootNode, const QString &pat // Added code to avoid more assertion errors, and trace the cause. if( rootNode.isNull() ) { - qWarning() << "XmlFunctions::getNodeValue: Attempted to request '" << path << "' on null root node." << endl; + qWarning() << "XmlFunctions::getNodeValue: attempted to request '" << path << "' on null root node." << endl; return QString(); } diff --git a/src/modules/upnp/igdcontrolpoint.cpp b/src/modules/upnp/igdcontrolpoint.cpp index b34ade01f..7ed70ed92 100644 --- a/src/modules/upnp/igdcontrolpoint.cpp +++ b/src/modules/upnp/igdcontrolpoint.cpp @@ -52,7 +52,7 @@ IgdControlPoint::IgdControlPoint(const QString &hostname, int port, const QStrin , m_pRootService(0) , m_pWanConnectionService(0) { - qDebug() << "CREATED UPnP::IgdControlPoint: Created control point" + qDebug() << "CREATED UPnP::IgdControlPoint: created control point" << " url='" << hostname << ":" << port << "/" << rootUrl << "'." << endl; qDebug() << "UPnP::IgdControlPoint: querying services..." << endl; @@ -123,15 +123,15 @@ void IgdControlPoint::slotDeviceQueried(bool error) m_bGatewayAvailable = true; - qDebug() << "UPnP::IgdControlPoint: wan/ipconnection service found, " - << "querying service '" << params.serviceId << "' for external ip address..." << endl; + qDebug() << "UPnP::IgdControlPoint: WAN/IP connection service found, " + << "querying service '" << params.serviceId << "' for external IP address..." << endl; // Call the service m_pWanConnectionService = new WanConnectionService(params); connect(m_pWanConnectionService, SIGNAL(queryFinished(bool)), this, SLOT(slotWanQueryFinished(bool))); m_pWanConnectionService->queryExternalIpAddress(); } else { - qDebug() << "UPnP::IgdControlPoint: no ppp/ipconnection service found :(" << endl; + qDebug() << "UPnP::IgdControlPoint: no PPP/IP connection service found :(" << endl; } } } @@ -142,10 +142,10 @@ void IgdControlPoint::slotWanQueryFinished(bool error) { if(! error) { - qDebug() << "IgdControlPoint: UPnP Gateway Device found." << endl; + qDebug() << "IgdControlPoint: UPnP gateway device found." << endl; } else { // Just started, the request for the external IP failed. This should succeed, abort portation - qDebug() << "Requesting external IP address failed, leaving UPnP Gateway Device untouched." << endl; + qDebug() << "Requesting external IP address failed, leaving UPnP gateway device untouched." << endl; } } diff --git a/src/modules/upnp/libkviupnp.cpp b/src/modules/upnp/libkviupnp.cpp index bf44bac5b..bd04abf84 100644 --- a/src/modules/upnp/libkviupnp.cpp +++ b/src/modules/upnp/libkviupnp.cpp @@ -40,13 +40,13 @@ UPnP::Manager* g_pManager = 0; @title: $upnp.getExternalIpAddress @short: - Return the external ip address using UPnP + Return the external IP address using UPnP @syntax: <string> $upnp.getExternalIpAddress() @description: - During the loading of the UPnP module (and during a [cmd]upnp.refresh[/cmd]), KVIrc searches the gateway of your local network. If a gateway is found, KVIrc requests it the external Ip address associated to the router and caches it.[br] + During the loading of the UPnP module (and during a [cmd]upnp.refresh[/cmd]), KVIrc searches the gateway of your local network. If a gateway is found, KVIrc requests it the external IP address associated to the router and caches it.[br] Using this function you can get this cached value.[br] - Take care that if no gateway have been found or it returned no external Ip address (this can happens if its upstream (wan) link is not connected), this function returns an empty string.[br] + Take care that if no gateway have been found or it returned no external IP address (this can happens if its upstream (WAN) link is not connected), this function returns an empty string.[br] It's better to check is a gateway has been found using [fnc]$upnp.isGatewayAvailable[/fnc] before using this function. @seealso: [fnc]$upnp.isGatewayAvailable[/fnc] @@ -73,7 +73,7 @@ static bool upnp_kvs_fnc_getExternalIpAddress(KviKvsModuleFunctionCall * c) <bool> $upnp.isGatewayAvailable() @description: Returns if a UPnP-capable gateway has been found on the local network.[br] - If this function returns false (0), no other command or function from the upnp module will work. + If this function returns false (0), no other command or function from the UPnP module will work. */ static bool upnp_kvs_fnc_isGatewayAvailable(KviKvsModuleFunctionCall * c) { @@ -101,7 +101,7 @@ static bool upnp_kvs_fnc_isGatewayAvailable(KviKvsModuleFunctionCall * c) interface.[br] @description: Makes a request to the gateway of the local network using UPnP; the request asks the gateway to add an entry in its port mapping table.[br] - If the gateway accepts the request, it will forward packets received on <port> on its external (wan) ip address to the host KVIrc is running at, on the same <port>. + If the gateway accepts the request, it will forward packets received on <port> on its external (WAN) IP address to the host KVIrc is running at, on the same <port>. Depending on vendors, this is called with different names: Port forwarding, SUA, Virtual Server, PAT, ... It's better to check is a gateway has been found using [fnc]$upnp.isGatewayAvailable[/fnc] before using this function. @seealso: @@ -170,7 +170,7 @@ static bool upnp_kvs_cmd_delPortMapping(KviKvsModuleCommandCall * c) upnp.refresh @description: Rescan the local network for a gateway using UPnP.[br] - This command is automatically executed when KVIrc loads the upnp module. + This command is automatically executed when KVIrc loads the UPnP module. @seealso: [fnc]$upnp.isGatewayAvailable[/fnc] */ |
