Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DISCOS
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
Container registry
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
INAF
DISCOS
Commits
273f8af5
Unverified
Commit
273f8af5
authored
1 year ago
by
Giuseppe Carboni
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Plain Diff
Porting latest hotfix onto master
parents
c0bdaddc
5f52c09a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Common/Servers/CalibrationTool/src/ReceiverCallback.cpp
+4
-1
4 additions, 1 deletion
Common/Servers/CalibrationTool/src/ReceiverCallback.cpp
Common/Servers/FitsWriter/src/ReceiverCallback.cpp
+4
-1
4 additions, 1 deletion
Common/Servers/FitsWriter/src/ReceiverCallback.cpp
with
8 additions
and
2 deletions
Common/Servers/CalibrationTool/src/ReceiverCallback.cpp
+
4
−
1
View file @
273f8af5
...
...
@@ -41,11 +41,13 @@ int ReceiverCallback::cbReceive(ACE_Message_Block * frame_p)
char *buffer;
DDWORD headerSize=sizeof(Backends::TDumpHeader);*/
Backends
::
TDumpHeader
*
dumpH
;
DDWORD
totalBytes
;
if
(
flowNumber_m
==
1
)
{
if
(
m_buffer
==
NULL
)
{
m_buffer
=
new
char
[
frame_p
->
total_length
()];
m_bufferLen
=
frame_p
->
total_length
();
totalBytes
=
frame_p
->
total_length
();
m_bufferPointer
=
0
;
}
else
{
...
...
@@ -53,6 +55,7 @@ int ReceiverCallback::cbReceive(ACE_Message_Block * frame_p)
memcpy
(
newBuff
,
m_buffer
,
m_bufferPointer
);
// save the old buffer;
delete
[]
m_buffer
;
//get rid of the old buffer;
m_bufferLen
+=
frame_p
->
total_length
();
//update the buffer length;
totalBytes
=
frame_p
->
total_length
();
m_buffer
=
newBuff
;
// now keep track of the buffer pointer;
}
while
(
frame_p
!=
NULL
)
{
...
...
@@ -74,7 +77,7 @@ int ReceiverCallback::cbReceive(ACE_Message_Block * frame_p)
m_bufferLen
=
0
;
m_bufferPointer
=
0
;
}
m_receivedBytes
+=
frame_p
->
total_length
()
;
m_receivedBytes
+=
totalBytes
;
}
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Common/Servers/FitsWriter/src/ReceiverCallback.cpp
+
4
−
1
View file @
273f8af5
...
...
@@ -44,11 +44,13 @@ int ReceiverCallback::cbReceive(ACE_Message_Block * frame_p)
char *buffer;
DDWORD headerSize=sizeof(Backends::TDumpHeader);*/
Backends
::
TDumpHeader
*
dumpH
;
DDWORD
totalBytes
;
if
(
flowNumber_m
==
1
)
{
if
(
m_buffer
==
NULL
)
{
m_buffer
=
new
char
[
frame_p
->
total_length
()];
m_bufferLen
=
frame_p
->
total_length
();
totalBytes
=
frame_p
->
total_length
();
m_bufferPointer
=
0
;
}
else
{
...
...
@@ -56,6 +58,7 @@ int ReceiverCallback::cbReceive(ACE_Message_Block * frame_p)
memcpy
(
newBuff
,
m_buffer
,
m_bufferPointer
);
// save the old buffer;
delete
[]
m_buffer
;
//get rid of the old buffer;
m_bufferLen
+=
frame_p
->
total_length
();
//update the buffer length;
totalBytes
=
frame_p
->
total_length
();
m_buffer
=
newBuff
;
// now keep track of the buffer pointer;
}
while
(
frame_p
!=
NULL
)
{
...
...
@@ -76,7 +79,7 @@ int ReceiverCallback::cbReceive(ACE_Message_Block * frame_p)
m_bufferLen
=
0
;
m_bufferPointer
=
0
;
}
m_receivedBytes
+=
frame_p
->
total_length
()
;
m_receivedBytes
+=
totalBytes
;
}
return
0
;
}
...
...
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