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
28afcbfd
Commit
28afcbfd
authored
2 months ago
by
Adrien Béraud
Committed by
Adrien Béraud
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
gitserver: improve logs
Change-Id: I940952e1f805a1a8bb3f3b0de9de626147e3c4e7
parent
33f42691
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/jamidht/gitserver.cpp
+18
-6
18 additions, 6 deletions
src/jamidht/gitserver.cpp
with
18 additions
and
6 deletions
src/jamidht/gitserver.cpp
+
18
−
6
View file @
28afcbfd
...
...
@@ -44,13 +44,19 @@ namespace jami {
class
GitServer
::
Impl
{
public:
Impl
(
const
std
::
string
&
repositoryId
,
Impl
(
const
std
::
string
&
accountId
,
const
std
::
string
&
repositoryId
,
const
std
::
string
&
repository
,
const
std
::
shared_ptr
<
dhtnet
::
ChannelSocket
>&
socket
)
:
repositoryId_
(
repositoryId
)
:
accountId_
(
accountId
)
,
repositoryId_
(
repositoryId
)
,
repository_
(
repository
)
,
socket_
(
socket
)
{
JAMI_DEBUG
(
"[Account {}] [Conversation {}] [GitServer {}] created"
,
accountId_
,
repositoryId_
,
fmt
::
ptr
(
this
));
// Check at least if repository is correct
git_repository
*
repo
;
if
(
git_repository_open
(
&
repo
,
repository_
.
c_str
())
!=
0
)
{
...
...
@@ -68,7 +74,13 @@ public:
return
len
;
});
}
~
Impl
()
{
stop
();
}
~
Impl
()
{
stop
();
JAMI_DEBUG
(
"[Account {}] [Conversation {}] [GitServer {}] destroyed"
,
accountId_
,
repositoryId_
,
fmt
::
ptr
(
this
));
}
void
stop
()
{
std
::
lock_guard
lk
(
destroyMtx_
);
...
...
@@ -86,6 +98,7 @@ public:
void
sendPackData
();
std
::
map
<
std
::
string
,
std
::
string
>
getParameters
(
std
::
string_view
pkt_line
);
std
::
string
accountId_
{};
std
::
string
repositoryId_
{};
std
::
string
repository_
{};
std
::
shared_ptr
<
dhtnet
::
ChannelSocket
>
socket_
{};
...
...
@@ -228,7 +241,7 @@ GitServer::Impl::sendReferenceCapabilities(bool sendVersion)
// **** with a version number (if "version=1" is sent as an Extra Parameter),
std
::
error_code
ec
;
if
(
sendVersion
)
{
auto
toSend
=
"000eversion 1
\0
"
sv
;
constexpr
auto
toSend
=
"000eversion 1
\0
"
sv
;
socket_
->
write
(
reinterpret_cast
<
const
unsigned
char
*>
(
toSend
.
data
()),
toSend
.
size
(),
ec
);
...
...
@@ -479,14 +492,13 @@ GitServer::GitServer(const std::string& accountId,
const
std
::
shared_ptr
<
dhtnet
::
ChannelSocket
>&
client
)
{
auto
path
=
(
fileutils
::
get_data_dir
()
/
accountId
/
"conversations"
/
conversationId
).
string
();
pimpl_
=
std
::
make_unique
<
GitServer
::
Impl
>
(
conversationId
,
path
,
client
);
pimpl_
=
std
::
make_unique
<
GitServer
::
Impl
>
(
accountId
,
conversationId
,
path
,
client
);
}
GitServer
::~
GitServer
()
{
stop
();
pimpl_
.
reset
();
JAMI_INFO
(
"GitServer destroyed"
);
}
void
...
...
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