Show
Ignore:
Timestamp:
08/31/07 09:53:01 (15 months ago)
Author:
asterix
Message:

fix the to attribute of stream initiation in zeroconf network. see #3057

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11.1/src/common/zeroconf/client_zeroconf.py

    r8641 r8649  
    180180                self.Dispatcher._metastream.setNamespace(self.Namespace) 
    181181                # XXX TLS support 
    182                 #~ self._metastream.setAttr('version', '1.0') 
     182                self.Dispatcher._metastream.setAttr('version', '1.0') 
    183183                self.Dispatcher._metastream.setAttr('xmlns:stream', NS_STREAMS) 
    184184                self.Dispatcher._metastream.setAttr('from', self.conn_holder.zeroconf.name) 
    185                 self.Dispatcher._metastream.setAttr('to', self.to) 
     185                if self.to: 
     186                        self.Dispatcher._metastream.setAttr('to', self.to) 
    186187                self.Dispatcher.send("<?xml version='1.0'?>%s>" % str(self.Dispatcher._metastream)[:-2]) 
    187188         
     
    194195                        return 
    195196                if self.sock_type == TYPE_SERVER: 
     197                        if attrs.has_key('from'): 
     198                                self.to = attrs['from'] 
    196199                        self.send_stream_header() 
    197200                        while self.stanzaqueue: