Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
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
savoirfairelinux
jami-daemon
Commits
06803cb1
Commit
06803cb1
authored
1 year ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
conversation: add more logs in case of download failure
GitLab:
#972
Change-Id: I99b96231864878d4e2a17c8923d7578d9709b4c9
parent
1feb6873
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/jamidht/conversation.cpp
+6
-4
6 additions, 4 deletions
src/jamidht/conversation.cpp
with
6 additions
and
4 deletions
src/jamidht/conversation.cpp
+
6
−
4
View file @
06803cb1
...
@@ -1976,8 +1976,10 @@ Conversation::onFileChannelRequest(const std::string& member,
...
@@ -1976,8 +1976,10 @@ Conversation::onFileChannelRequest(const std::string& member,
auto
commit
=
getCommit
(
interactionId
);
auto
commit
=
getCommit
(
interactionId
);
if
(
commit
==
std
::
nullopt
||
commit
->
find
(
"type"
)
==
commit
->
end
()
if
(
commit
==
std
::
nullopt
||
commit
->
find
(
"type"
)
==
commit
->
end
()
||
commit
->
find
(
"tid"
)
==
commit
->
end
()
||
commit
->
find
(
"sha3sum"
)
==
commit
->
end
()
||
commit
->
find
(
"tid"
)
==
commit
->
end
()
||
commit
->
find
(
"sha3sum"
)
==
commit
->
end
()
||
commit
->
at
(
"type"
)
!=
"application/data-transfer+json"
)
||
commit
->
at
(
"type"
)
!=
"application/data-transfer+json"
)
{
JAMI_WARNING
(
"[Account {:s}] {} requested invalid file transfer commit {}"
,
pimpl_
->
accountId_
,
member
,
interactionId
);
return
false
;
return
false
;
}
auto
path
=
dataTransfer
()
->
path
(
fileId
);
auto
path
=
dataTransfer
()
->
path
(
fileId
);
...
@@ -1986,7 +1988,7 @@ Conversation::onFileChannelRequest(const std::string& member,
...
@@ -1986,7 +1988,7 @@ Conversation::onFileChannelRequest(const std::string& member,
if
(
std
::
filesystem
::
is_symlink
(
path
))
{
if
(
std
::
filesystem
::
is_symlink
(
path
))
{
dhtnet
::
fileutils
::
remove
(
path
,
true
);
dhtnet
::
fileutils
::
remove
(
path
,
true
);
}
}
JAMI_
DEBU
G
(
"[Account {:s}] {:s} asked for non existing file {} in {:s}"
,
JAMI_
WARNIN
G
(
"[Account {:s}] {:s} asked for non existing file {} in {:s}"
,
pimpl_
->
accountId_
,
pimpl_
->
accountId_
,
member
,
member
,
fileId
,
fileId
,
...
@@ -1995,8 +1997,8 @@ Conversation::onFileChannelRequest(const std::string& member,
...
@@ -1995,8 +1997,8 @@ Conversation::onFileChannelRequest(const std::string& member,
}
}
// Check that our file is correct before sending
// Check that our file is correct before sending
if
(
verifyShaSum
&&
commit
->
at
(
"sha3sum"
)
!=
fileutils
::
sha3File
(
path
))
{
if
(
verifyShaSum
&&
commit
->
at
(
"sha3sum"
)
!=
fileutils
::
sha3File
(
path
))
{
JAMI_
DEBU
G
(
JAMI_
WARNIN
G
(
"[Account {:s}] {:s} asked for file {:s} in {:s}, but our version is not complete"
,
"[Account {:s}] {:s} asked for file {:s} in {:s}, but our version is not complete
or corrupted
"
,
pimpl_
->
accountId_
,
pimpl_
->
accountId_
,
member
,
member
,
fileId
,
fileId
,
...
...
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