Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
nat_traversal
Commits
f46a0b39
Commit
f46a0b39
authored
May 16, 2017
by
Fong
Browse files
don't call pthread_join
parent
f4a0e4e3
Changes
2
Show whitespace changes
Inline
Side-by-side
main.c
View file @
f46a0b39
...
@@ -104,7 +104,7 @@ int main(int argc, char** argv)
...
@@ -104,7 +104,7 @@ int main(int argc, char** argv)
}
}
if
(
peer_id
)
{
if
(
peer_id
)
{
printf
(
"connecting to peer %d"
,
peer_id
);
printf
(
"connecting to peer %d
\n
"
,
peer_id
);
if
(
connect_to_peer
(
&
c
,
peer_id
)
<
0
)
{
if
(
connect_to_peer
(
&
c
,
peer_id
)
<
0
)
{
printf
(
"failed to connect to peer %d
\n
"
,
peer_id
);
printf
(
"failed to connect to peer %d
\n
"
,
peer_id
);
...
@@ -112,5 +112,8 @@ int main(int argc, char** argv)
...
@@ -112,5 +112,8 @@ int main(int argc, char** argv)
}
}
}
}
for
(;
;)
{
}
return
0
;
return
0
;
}
}
nat_traversal.c
View file @
f46a0b39
...
@@ -328,7 +328,7 @@ int init(struct peer_info self, struct sockaddr_in punch_server, client* c) {
...
@@ -328,7 +328,7 @@ int init(struct peer_info self, struct sockaddr_in punch_server, client* c) {
pthread_t
thread_id
;
pthread_t
thread_id
;
pthread_create
(
&
thread_id
,
NULL
,
server_notify_handler
,
(
void
*
)
&
server_sock
);
pthread_create
(
&
thread_id
,
NULL
,
server_notify_handler
,
(
void
*
)
&
server_sock
);
pthread_join
(
thread_id
,
NULL
);
//
pthread_join(thread_id, NULL);
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment