Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
884e66e5
Commit
884e66e5
authored
18 years ago
by
dkirov
Browse files
Options
Downloads
Patches
Plain Diff
some bugs fixed
parent
da309569
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/zeroconf/client_zeroconf.py
+4
-6
4 additions, 6 deletions
src/common/zeroconf/client_zeroconf.py
src/common/zeroconf/connection_handlers_zeroconf.py
+2
-1
2 additions, 1 deletion
src/common/zeroconf/connection_handlers_zeroconf.py
with
6 additions
and
7 deletions
src/common/zeroconf/client_zeroconf.py
+
4
−
6
View file @
884e66e5
...
@@ -91,7 +91,8 @@ class P2PClient(IdleObject):
...
@@ -91,7 +91,8 @@ class P2PClient(IdleObject):
self
.
_owner
=
self
self
.
_owner
=
self
self
.
Namespace
=
'
jabber:client
'
self
.
Namespace
=
'
jabber:client
'
self
.
defaultNamespace
=
self
.
Namespace
self
.
defaultNamespace
=
self
.
Namespace
self
.
_component
=
0
self
.
_component
=
0
self
.
_registered_name
=
None
self
.
_caller
=
caller
self
.
_caller
=
caller
self
.
Server
=
host
self
.
Server
=
host
self
.
DBG
=
'
client
'
self
.
DBG
=
'
client
'
...
@@ -163,9 +164,6 @@ class P2PConnection(IdleObject, PlugIn):
...
@@ -163,9 +164,6 @@ class P2PConnection(IdleObject, PlugIn):
self
.
on_connect
=
on_connect
self
.
on_connect
=
on_connect
self
.
writable
=
False
self
.
writable
=
False
self
.
readable
=
False
self
.
readable
=
False
# waiting for first bytes
# start waiting for data
self
.
_registered_name
=
None
self
.
_exported_methods
=
[
self
.
send
,
self
.
disconnect
,
self
.
onreceive
]
self
.
_exported_methods
=
[
self
.
send
,
self
.
disconnect
,
self
.
onreceive
]
self
.
on_receive
=
None
self
.
on_receive
=
None
if
_sock
:
if
_sock
:
...
@@ -220,8 +218,8 @@ class P2PConnection(IdleObject, PlugIn):
...
@@ -220,8 +218,8 @@ class P2PConnection(IdleObject, PlugIn):
r
=
stanza
r
=
stanza
if
isinstance
(
r
,
unicode
):
if
isinstance
(
r
,
unicode
):
r
=
r
.
encode
(
'
utf-8
'
)
r
=
r
.
encode
(
'
utf-8
'
)
#~
elif not isinstance(r, str):
elif
not
isinstance
(
r
,
str
):
#~
r = ustr(r).encode('utf-8')
r
=
ustr
(
r
).
encode
(
'
utf-8
'
)
self
.
sendqueue
.
append
(
r
)
self
.
sendqueue
.
append
(
r
)
self
.
_plug_idle
()
self
.
_plug_idle
()
...
...
This diff is collapsed.
Click to expand it.
src/common/zeroconf/connection_handlers_zeroconf.py
+
2
−
1
View file @
884e66e5
...
@@ -235,11 +235,12 @@ class ConnectionHandlersZeroconf(ConnectionVcard):
...
@@ -235,11 +235,12 @@ class ConnectionHandlersZeroconf(ConnectionVcard):
tim
=
msg
.
getTimestamp
()
tim
=
msg
.
getTimestamp
()
tim
=
time
.
strptime
(
tim
,
'
%Y%m%dT%H:%M:%S
'
)
tim
=
time
.
strptime
(
tim
,
'
%Y%m%dT%H:%M:%S
'
)
tim
=
time
.
localtime
(
timegm
(
tim
))
tim
=
time
.
localtime
(
timegm
(
tim
))
frm
=
str
(
msg
.
getFrom
()
)
frm
=
msg
.
getFrom
()
if
frm
==
None
:
if
frm
==
None
:
for
key
in
self
.
zeroconf
.
contacts
:
for
key
in
self
.
zeroconf
.
contacts
:
if
ip
==
self
.
zeroconf
.
contacts
[
key
][
zeroconf
.
C_ADDRESS
]:
if
ip
==
self
.
zeroconf
.
contacts
[
key
][
zeroconf
.
C_ADDRESS
]:
frm
=
key
frm
=
key
frm
=
str
(
frm
)
jid
=
frm
jid
=
frm
no_log_for
=
gajim
.
config
.
get_per
(
'
accounts
'
,
self
.
name
,
no_log_for
=
gajim
.
config
.
get_per
(
'
accounts
'
,
self
.
name
,
'
no_log_for
'
).
split
()
'
no_log_for
'
).
split
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment