[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/protocols/msn
From: Olivier Goffart <ogoffart () kde ! org>
Date: 2005-06-19 21:58:41
Message-ID: 1119218321.754217.5163.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 427184 by ogoffart:
Some change to the old protocol that allow to send file when we are under a router \
(but still need to forward the port) this refer to Bug 57931 (Define Hostname/IP for \
File Transfers) and Bug 96205 (kopete is unable to send files via msn behind a nat \
router)
This is not really usefull in trunk since i plan to drop the support of the old \
protocol over the new one in KDE 3.5. but i'm commiting it so backport will be more \
usefull
M +7 -1 msnfiletransfersocket.cpp
M +6 -0 msnnotifysocket.cpp
M +3 -0 msnnotifysocket.h
--- trunk/KDE/kdenetwork/kopete/protocols/msn/msnfiletransfersocket.cpp \
#427183:427184 @@ -34,6 +34,8 @@
#include "kopetemetacontact.h"
#include "msnchatsession.h"
#include "msnswitchboardsocket.h"
+#include "msnnotifysocket.h"
+#include "msnaccount.h"
using namespace KNetwork;
@@ -381,19 +383,23 @@
MSNChatSession* manager=dynamic_cast<MSNChatSession*>(m_contact->manager());
if(manager && manager->service())
{
+ MSNNotifySocket \
*notify=static_cast<MSNAccount*>(manager->account())->notifySocket(); \
+ if(notify){ +
QCString message=QString(
"MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: ACCEPT\r\n"
"Invitation-Cookie: " + QString::number(cookie()) + "\r\n"
- "IP-Address: " + manager->service()->getLocalIP() + "\r\n"
+ "IP-Address: " + notify->localIP() + "\r\n"
"Port: 6891\r\n"
"AuthCookie: "+QString::number(auth)+"\r\n"
"Launch-Application: FALSE\r\n"
"Request-Data: IP-Address:\r\n\r\n").utf8();
manager->service()->sendCommand( "MSG" , "N", true, message );
+ }
}
listen(6891);
--- trunk/KDE/kdenetwork/kopete/protocols/msn/msnnotifysocket.cpp #427183:427184
@@ -692,6 +692,12 @@
m_isHotmailAccount = (rx.cap(1).toUInt() == 1);
emit hotmailSeted(m_isHotmailAccount);
}
+ if(msg.contains("ClientIP:"))
+ {
+ QRegExp rx("ClientIP: ([0-9.]*)");
+ rx.search(msg);
+ m_localIP = rx.cap(1);
+ }
}
}
--- trunk/KDE/kdenetwork/kopete/protocols/msn/msnnotifysocket.h #427183:427184
@@ -69,6 +69,8 @@
*/
int disconnectReason() { return m_disconnectReason; }
+ QString localIP() { return m_localIP; }
+
public slots:
void slotOpenInbox();
@@ -168,6 +170,7 @@
QString m_kv;
QString m_sid;
QString m_loginTime;
+ QString m_localIP;
SslLoginHandler *m_sslLoginHandler;
QTimer *m_keepaliveTimer;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic