Commit graph

444 commits

Author SHA1 Message Date
junglecow
e1ad5b15d0 - Removed unnecessary import
- Fixed name of transport_nb's logger
2006-12-28 11:15:44 +00:00
junglecow
c16642c838 Catch socket.gaierror. Fixes #2840. 2006-12-27 22:45:23 +00:00
junglecow
e816b38a0f Check if self._sock exists before trying to close it. Fixes #2839. 2006-12-27 20:44:21 +00:00
junglecow
5f16eb633b Re-deleted exc_clear. Reason:
- It's unnecessary
 - It confuses people

See [7433] and #1575. This is an old workaround for psyco braindeadness, which
we don't use anymore. If there's a reason this should stay in code, please
document clearly, and re-add. Thanks.
2006-12-27 18:57:30 +00:00
junglecow
847d9fe6e9 - Enhanced parsing of -l/--loglevel option
- Demote one message w/exception to debug
 - Hopefully improved user error message when fingerprint is bad
2006-12-27 18:38:50 +00:00
Nikos Kouremenos
64dec82bb6 readd something, unless there is a reason it got removed in [7706] 2006-12-27 06:09:15 +00:00
junglecow
9deb76a8ad - Started new way of logging, with configurable level for each subsystem
- Added -q, --quiet (speaks for itself)
   - Added -l, --loglevel subsystem=LEVEL,subsystem2=LEVEL2,...
 - Quell winsock 10035 error. (Equivalent of EINPROGRESS, but winsock likes to have its own error numbers.)
 - Hide SSL certificate debug stuff unless gajim.c.x.transports loglevel is DEBUG or lower
 - Avoid unicode problems if we set a profile
 - Move fingerprint checks from _register_handlers to _connect_success
 - Some enhancements to fpr checking code
2006-12-23 21:18:07 +00:00
junglecow
44674f7e75 - Implement matching of fingerprints against servers.xml
- Add support for fingerprints to servers.xml parser.
 - Add support for 'hidden' servers to servers.xml parser.
 - Add some fingerprints to servers.xml, for testing and as example for the new format.
 - Force asynchronous (nonblocking) SSL handshake in all case
 - Add logging to c/connection.py

Known issues:
 - Checking of fingerprints doesn't work on in-band SSL (Typically port 5222) because of stuff happening out of sequence. Workaround: use immediate SSL mode ("Legacy SSL" option in server config). Because there is as of yet no other way to /force/ SSL, this is also the most secure setting.
 - A lot of code is still looking for a better place to live.
2006-12-22 23:30:23 +00:00
junglecow
35ecad1188 - Switch back to TLSv1 method
- Remove debug prints in stdlib ssl compatibility code
2006-12-21 18:08:17 +00:00
junglecow
62350adb36 - PyOpenSSL branch merged to trunk
Welcome to the world of PyOpenSSL! Please install PyOpenSSL, thanks!

svn merge -r 7426:HEAD svn://svn.gajim.org/gajim/branches/pyopenssl
2006-12-20 21:52:40 +00:00
junglecow
fddb000a89 [Trunk]
- In verbose mode, print encodings. (Especially for Windows users who don't have Python) (gajim.py)
 - Attempt at fixing traceback when getting user's home directory in Windows. See #2812. (c/configpaths.py)
 - Show 'error' icon next to account while waiting for reconnect. Fixes #2786. (c/connection_handlers.py, c/gajim.py, c/connection.py)
[PyOpenSSL]
 - Fix 100% CPU usage and hanging connection when server closes connection on us. (c/x/transports_nb.py)
 - Fix 'hanging' connection when server closes the connection on us before we can open the XML stream. (Disconnect handler didn't get called.) (c/x/client_nb.py)
 - Change prints to logger calls, various enhancements to debug printing, reduce spam (c/x/transports_nb.py)
 - this → self (c/x/transports_nb.py)
 - Call _do_receive() once to collect error message from socket, when error flag is raised in scheduler. (c/x/transports_nb.py)
2006-12-20 20:40:08 +00:00
junglecow
8c78a14c3c - In [7647], reading of PID file was moved out of try..except block. Fixed.
- [PyOpenSSL] Small fix to error handling.
2006-12-15 10:57:25 +00:00
junglecow
c09e6e0b93 [PyOpenSSL]
- Improved data extraction from exceptions
 - Clearer error messages
 - Reduced exception spam
2006-12-13 20:15:22 +00:00
junglecow
7c0696093a - Trying to connect to server every 20 seconds forever is extremely rude to its owner. Let's be polite and do exponential back-off. (See #2411)
- [PyOpenSSL] Ported [7443] to pyopenssl branch.
2006-12-08 21:19:01 +00:00
junglecow
4a58bc4797 [pyopenssl] Yet more exception fixes 2006-12-01 22:23:45 +00:00
junglecow
236ed0463a [pyopenssl] More exception fixes 2006-11-28 22:12:03 +00:00
junglecow
5cb241b8c0 [trunk]
- Typo
[pyopenssl]
- Better exception handling
- Prevent 100% cpu usage when ssl handshake is slow
2006-11-28 01:02:31 +00:00
Yann Leboulanger
a37b946098 [sgala] IPV6 support for connection fith server. see #1969 2006-11-25 11:50:31 +00:00
Yann Leboulanger
7cdb177558 show error message when we try to register to an unavailable transport. fixes #1574 2006-11-22 19:49:41 +00:00
Jean-Marie Traissard
6775c3a43d Some errors spoted by file source checkers 2006-11-20 19:11:31 +00:00
Tomasz Melcer
b9f5755ad6 Use iterators, better for memory usage. 2006-11-20 16:51:35 +00:00
Yann Leboulanger
2ebf1309de fix logic for #2680 2006-11-19 23:58:14 +00:00
Yann Leboulanger
483ccdf35a use isinstance instead of type. fixes #2680 2006-11-19 23:55:06 +00:00
Tomasz Melcer
d9d5f5a841 Fixed last fix. 2006-11-18 21:04:24 +00:00
Tomasz Melcer
4b97eddee4 Comparing types: type(x)==type(self) => isinstance(x, self.__class__) 2006-11-18 21:01:41 +00:00
Tomasz Melcer
175a792cfe Merging changes from trunk (6774:7465) 2006-11-18 20:52:28 +00:00
Tomasz Melcer
68703a1d5d 'Server' part switched to use new forms. 2006-11-18 18:39:02 +00:00
junglecow
3c77ffd406 [PyOpenSSL branch]
- Close connection after creating account. Fixes #2676
- Handle normal connection close by server. Fixes #2671
- Do not disconnect if we haven't received starttag yet. Fixes #2668. Fixes unticketed bug causing account creation not to work with PyOpenSSL and asynchronous handshake (see also #2671). Behaviour of #2634 is also improved but now results in deadlock.
2006-11-18 15:09:40 +00:00
junglecow
321020751d Bugfix 2006-11-14 06:39:08 +00:00
junglecow
be1b58aa79 Handle OpenSSL.SSL.SysCallError 2006-11-13 22:17:16 +00:00
junglecow
4617618463 Removing all calls to sys.exc_clear(). This is only necessary in very rare circumstances, and if there is such a circumstance, it should be clearly documented in code. 2006-11-13 15:07:47 +00:00
junglecow
9e3e14dd78 Fixed a bug in compatibility code 2006-11-13 14:44:17 +00:00
junglecow
c5ffc7bf5d - Added support for PyOpenSSL (with fallback to old library if not found)
- Also added a wrapper for cleaner compatibility handling of old SSL library
- Changed exception handling to be more precise. (Catching Exception. Ish.)
- Added lots of debug printing

You will need to install pyopenssl (Debian unstable: python-pyopenssl) to try this.
2006-11-13 14:24:41 +00:00
Stefan Bethge
27849fc3d7 fix #2586, cleanup 2006-11-10 20:43:23 +00:00
Stefan Bethge
bf69759900 fix #2649 2006-11-06 22:47:25 +00:00
Stefan Bethge
745434fdab give error messages when local message could not be sent, see #2586 2006-11-06 21:30:39 +00:00
Tomasz Melcer
289928050c Reworked dataforms, not finished yet. 2006-11-06 12:23:39 +00:00
Dimitur Kirov
59b6ae468a merge from trunk
automake based instalation
2006-10-04 00:10:49 +00:00
Dimitur Kirov
5fc8cf20f3 merge from trunk 2006-09-26 15:57:47 +00:00
Dimitur Kirov
57779a6ad3 drop connection after certain time of
inactivity
set timout on connect attempts
transleted russian comment
2006-09-20 11:01:47 +00:00
Dimitur Kirov
da309569e3 add possibility to overide StremInit by _owner 2006-09-19 15:14:53 +00:00
Dimitur Kirov
e9a855007b better xmmpppy plugin integration.
fixed xml error with iChats
2006-09-19 12:46:09 +00:00
Dimitur Kirov
1a325833c3 add listening server for incomming messages 2006-09-17 22:57:41 +00:00
Stefan Bethge
2b3120244f merged trunk r6780
removed i18n imports from zeroconf/connection files
2006-09-14 16:48:03 +00:00
Tomasz Melcer
9b29c4c8b8 Merging changes from trunk (6561:6774) 2006-09-13 16:47:58 +00:00
Tomasz Melcer
585ab90e92 Merging changes from trunk (6496:6561) 2006-07-17 19:30:53 +00:00
Tomasz Melcer
c75bdcb63c Ad-Hoc commands window now uses new dataform wrapper. /me dances 2006-07-07 15:49:44 +00:00
Yann Leboulanger
59c3b7b3c8 JEP 172 support (user nickname) Fixes #464 and #884 2006-06-01 15:23:38 +00:00
Dimitur Kirov
f9e874a1a3 make sure NBClientCommon, dispatcher and
NodeBuilder are callected when we close the
connection
2006-05-03 16:12:10 +00:00
Dimitur Kirov
9c37887ea0 handle challenge response multiple qops: #1907 2006-04-30 17:33:10 +00:00