Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
501e72c3
Commit
501e72c3
authored
15 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
Remove temporary debug tracing, and add nasty error explanation
parent
a450efb4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/server/sockfilt.c
+4
-7
4 additions, 7 deletions
tests/server/sockfilt.c
with
4 additions
and
7 deletions
tests/server/sockfilt.c
+
4
−
7
View file @
501e72c3
...
...
@@ -765,13 +765,11 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
#endif
la_size
=
sizeof
(
localaddr4
);
localaddr
=
(
struct
sockaddr
*
)
&
localaddr4
;
logmsg
(
"debug: IPv4 la_size = %zu
\n
"
,
(
size_t
)
la_size
);
#ifdef ENABLE_IPV6
}
else
{
la_size
=
sizeof
(
localaddr6
);
localaddr
=
(
struct
sockaddr
*
)
&
localaddr6
;
logmsg
(
"debug: IPv6 la_size = %zu
\n
"
,
(
size_t
)
la_size
);
}
#endif
memset
(
localaddr
,
0
,
(
size_t
)
la_size
);
...
...
@@ -782,25 +780,24 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
sclose
(
sock
);
return
CURL_SOCKET_BAD
;
}
logmsg
(
"debug: localaddr->sa_family = %d
\n
"
,
(
int
)
localaddr
->
sa_family
);
switch
(
localaddr
->
sa_family
)
{
case
AF_INET
:
logmsg
(
"debug: AF_INET localaddr4.sin_port = %hu
\n
"
,
localaddr4
.
sin_port
);
*
listenport
=
ntohs
(
localaddr4
.
sin_port
);
break
;
#ifdef ENABLE_IPV6
case
AF_INET6
:
logmsg
(
"debug: AF_INET6 localaddr6.sin6_port = %hu
\n
"
,
localaddr6
.
sin6_port
);
*
listenport
=
ntohs
(
localaddr6
.
sin6_port
);
break
;
#endif
default:
logmsg
(
"debug: AF_UNKNOWN
\n
"
);
break
;
}
if
(
!*
listenport
)
{
/* Real failure, listener port shall not be zero beyond this point. */
logmsg
(
"Successfull getsockname() but unknown listener port."
);
logmsg
(
"Apparently getsockname() succeeded, with listener port zero."
);
logmsg
(
"A valid reason for this failure is a binary built without"
);
logmsg
(
"proper network library linkage. This might not be the only"
);
logmsg
(
"reason, but double check it before anything else."
);
sclose
(
sock
);
return
CURL_SOCKET_BAD
;
}
...
...
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