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
Erik Huelsmann
gajim
Commits
54ad65c7
Commit
54ad65c7
authored
15 years ago
by
steve-e
Browse files
Options
Downloads
Patches
Plain Diff
Show warning if calculated and received caps hash are different.
parent
306519f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/caps_cache.py
+3
-2
3 additions, 2 deletions
src/common/caps_cache.py
src/common/protocol/caps.py
+4
-1
4 additions, 1 deletion
src/common/protocol/caps.py
with
7 additions
and
3 deletions
src/common/caps_cache.py
+
3
−
2
View file @
54ad65c7
...
...
@@ -251,7 +251,8 @@ class NullClientCaps(AbstractClientCaps):
def
_lookup_in_cache
(
self
,
caps_cache
):
# lookup something which does not exist to get a new CacheItem created
cache_item
=
caps_cache
[(
'
dummy
'
,
''
)]
assert
cache_item
.
status
!=
CACHED
# Mark the item as cached so that protocol/caps.py does not update it
cache_item
.
status
=
CACHED
return
cache_item
def
_discover
(
self
,
connection
,
jid
):
...
...
@@ -390,4 +391,4 @@ class CapsCache(object):
else
:
q
.
update_last_seen
()
# vim: se ts=3:
\ No newline at end of file
# vim: se ts=3:
This diff is collapsed.
Click to expand it.
src/common/protocol/caps.py
+
4
−
1
View file @
54ad65c7
...
...
@@ -90,6 +90,8 @@ class ConnectionCaps(object):
cache_item
=
lookup
(
self
.
_capscache
)
if
cache_item
.
is_valid
():
# we already know that the hash is fine and have already cached
# the identities and features
return
else
:
validate
=
contact
.
client_caps
.
get_hash_validation_strategy
()
...
...
@@ -101,8 +103,9 @@ class ConnectionCaps(object):
node
=
caps_hash
=
hash_method
=
None
contact
.
client_caps
=
self
.
_create_suitable_client_caps
(
node
,
caps_hash
,
hash_method
)
log
.
warn
(
"
Computed and retrieved caps hash differ.
"
+
"
Ignoring caps of contact %s
"
%
contact
.
get_full_jid
())
self
.
_dispatch_event
(
'
CAPS_RECEIVED
'
,
(
jid
,))
# vim: se ts=3:
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