Show
Ignore:
Timestamp:
07/03/08 01:29:10 (5 months ago)
Author:
tomk
Message:

moved bosh code from client_nb.py to bosh.py, replaced debug logging with debug.py by logging in whole xmpppy (debug.py is now unused)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/bosh_support/src/common/connection.py

    r9867 r9877  
    209209        def _disconnectedReconnCB(self): 
    210210                '''Called when we are disconnected''' 
    211                 log.error('disconnectedReconnCB') 
     211                log.info('disconnectedReconnCB called') 
    212212                if gajim.account_is_connected(self.name): 
    213213                        # we cannot change our status to offline or connecting 
     
    532532 
    533533                        if self._proxy and self._proxy['type'] == 'bosh':  
    534                                 clientClass = common.xmpp.BOSHClient 
     534                                clientClass = common.xmpp.bosh.BOSHClient 
    535535                        else: 
    536536                                clientClass = common.xmpp.NonBlockingClient 
    537537 
    538                         if gajim.verbose: 
    539                                 con = common.xmpp.NonBlockingClient( 
    540                                         hostname=self._current_host['host'], 
    541                                         port=port, 
    542                                         caller=self, 
    543                                         idlequeue=gajim.idlequeue) 
    544                         else: 
    545                                 con = common.xmpp.NonBlockingClient( 
    546                                         hostname=self._current_host['host'], 
    547                                         debug=[], 
    548                                         port=port, 
    549                                         caller=self, 
    550                                         idlequeue=gajim.idlequeue) 
     538                        # there was: 
     539                        # "if gajim.verbose:" 
     540                        # here 
     541                        con = clientClass( 
     542                                domain=self._hostname, 
     543                                caller=self, 
     544                                idlequeue=gajim.idlequeue) 
    551545 
    552546                        self.last_connection = con 
     
    556550                        if self.on_connect_success == self._on_new_account: 
    557551                                con.RegisterDisconnectHandler(self._on_new_account) 
     552 
     553                        # FIXME: BOSH properties should be in proxy dictionary - loaded from 
     554                        # config 
     555                        if self._proxy and self._proxy['type'] == 'bosh':  
     556                                self._proxy['bosh_hold'] = '1' 
     557                                self._proxy['bosh_wait'] = '60' 
     558 
    558559                         
    559560                        log.info('Connecting to %s: [%s:%d]', self.name, 
    560561                                self._current_host['host'], port) 
    561562                        con.connect( 
     563                                hostname=self._current_host['host'], 
     564                                port=port, 
    562565                                on_connect=self.on_connect_success, 
    563566                                on_proxy_failure=self.on_proxy_failure,