By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 698
Collapse All | Expand All

(-)a/kopete/protocols/jabber/jabberconnector.cpp (-10 / +25 lines)
Lines 30-61 JabberConnector::JabberConnector ( TQObject *parent, const char */*name*/ ) Link Here
30
	mErrorCode = KNetwork::TDESocketBase::NoError;
30
	mErrorCode = KNetwork::TDESocketBase::NoError;
31
31
32
	mByteStream = new JabberByteStream ( this );
32
	mByteStream = new JabberByteStream ( this );
33
	mSrvResolver = new SrvResolver;
33
34
34
	connect ( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
35
	connect ( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) );
35
	connect ( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) );
36
	connect ( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) );
36
37
	connect ( mSrvResolver, TQT_SIGNAL( resultsReady() ), this, TQT_SLOT( slotSrvLookup() ) );
37
}
38
}
38
39
39
JabberConnector::~JabberConnector ()
40
JabberConnector::~JabberConnector ()
40
{
41
{
41
42
	delete mByteStream;
42
	delete mByteStream;
43
43
	delete mSrvResolver;
44
}
44
}
45
45
46
void JabberConnector::connectToServer ( const TQString &server )
46
void JabberConnector::connectToServer ( const TQString &server )
47
{
47
{
48
	kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Initiating connection to " << server << endl;
48
	kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Initiating connection to " << server << endl;
49
49
50
	/*
51
	 * FIXME: we should use a SRV lookup to determine the
52
	 * actual server to connect to. As this is currently
53
	 * not supported yet, we're using setOptHostPort().
54
	 * For XMPP 1.0, we need to enable this!
55
	 */
56
57
	mErrorCode = KNetwork::TDESocketBase::NoError;
50
	mErrorCode = KNetwork::TDESocketBase::NoError;
58
51
52
	if( mHost.isEmpty() ) {
53
		if( mSrvResolver->isBusy() ) {
54
			mSrvResolver->stop();
55
		}
56
		mSrvResolver->resolve(server, "xmpp-client", "tcp");
57
		return;
58
	}
59
59
	if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) )
60
	if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) )
60
	{
61
	{
61
		// Houston, we have a problem
62
		// Houston, we have a problem
Lines 86-91 void JabberConnector::slotError ( int code ) Link Here
86
87
87
}
88
}
88
89
90
void JabberConnector::slotSrvLookup()
91
{
92
	if( mSrvResolver->failed() ) {
93
		mErrorCode = KNetwork::TDESocketBase::LookupFailure;
94
		emit error ();
95
		return;
96
	}
97
98
	if( !mByteStream->connect( mSrvResolver->resultAddress().toString(), TQString::number( mSrvResolver->resultPort() ))) {
99
		mErrorCode = mByteStream->socket()->error ();
100
		emit error ();
101
	}
102
}
103
89
int JabberConnector::errorCode ()
104
int JabberConnector::errorCode ()
90
{
105
{
91
106
(-)a/kopete/protocols/jabber/jabberconnector.h (+3 lines)
Lines 22-27 Link Here
22
22
23
#include <xmpp.h>
23
#include <xmpp.h>
24
#include "jabberbytestream.h"
24
#include "jabberbytestream.h"
25
#include "libiris/cutestuff/network/srvresolver.h"
25
26
26
class ByteStream;
27
class ByteStream;
27
class KResolverEntry;
28
class KResolverEntry;
Lines 53-58 public: Link Here
53
private slots:
54
private slots:
54
	void slotConnected ();
55
	void slotConnected ();
55
	void slotError ( int );
56
	void slotError ( int );
57
	void slotSrvLookup ();
56
58
57
private:
59
private:
58
	TQString mHost;
60
	TQString mHost;
Lines 60-65 private: Link Here
60
	int mErrorCode;
62
	int mErrorCode;
61
63
62
	JabberByteStream *mByteStream;
64
	JabberByteStream *mByteStream;
65
	SrvResolver *mSrvResolver;
63
66
64
};
67
};
65
68

Return to bug 698