Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
ntpsec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
NTPsec
ntpsec
Commits
cb7a55a2
Commit
cb7a55a2
authored
8 years ago
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
Polish some instrumentation.
parent
70a0bf47
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pylib/packet.py
+5
-2
5 additions, 2 deletions
pylib/packet.py
with
5 additions
and
2 deletions
pylib/packet.py
+
5
−
2
View file @
cb7a55a2
...
...
@@ -835,7 +835,7 @@ class ControlSession:
while
len
(
xdata
)
%
4
:
xdata
+=
b
"
\x00
"
if
self
.
debug
>=
3
:
print
(
"
Sending %d octets
\n
"
%
len
(
xdata
))
print
(
"
Sending %d octets
"
%
len
(
xdata
))
try
:
self
.
sock
.
sendall
(
polybytes
(
xdata
))
except
socket
.
error
:
...
...
@@ -849,6 +849,9 @@ class ControlSession:
def
sendrequest
(
self
,
opcode
,
associd
,
qdata
,
auth
=
False
):
"
Ship an ntpq request packet to a server.
"
if
self
.
debug
:
sys
.
stderr
.
write
(
"
sendrequest(opcode=%d)
\n
"
%
opcode
)
# Check to make sure the data will fit in one packet
if
len
(
qdata
)
>
ntp
.
ntp_control
.
CTL_MAX_DATA_LEN
:
sys
.
stderr
.
write
(
"
***Internal error! Data too large (%d)
\n
"
%
...
...
@@ -1044,7 +1047,7 @@ class ControlSession:
continue
if
self
.
debug
>
2
:
warn
(
"
Recording fragment %d, size = %d offset = %d, end
=
%d, more=%s
\n
"
%
(
len
(
fragments
)
+
1
,
rpkt
.
count
,
rpkt
.
offset
,
rpkt
.
end
(),
rpkt
.
more
()))
warn
(
"
Recording fragment %d, size = %d offset = %d, end
=
%d, more=%s
\n
"
%
(
len
(
fragments
)
+
1
,
rpkt
.
count
,
rpkt
.
offset
,
rpkt
.
end
(),
rpkt
.
more
()))
# Passed all tests, insert it into the frag list.
fragments
.
append
(
rpkt
)
...
...
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