Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EtherBone Core
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Projects
EtherBone Core
Commits
7401d4b5
Commit
7401d4b5
authored
13 years ago
by
Wesley W. Terpstra
Browse files
Options
Downloads
Patches
Plain Diff
Nasty bug.
Calling poll invalidates all pointers. Don't cache them!
parent
fbcf7dab
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/glue/device.c
+7
-3
7 additions, 3 deletions
api/glue/device.c
with
7 additions
and
3 deletions
api/glue/device.c
+
7
−
3
View file @
7401d4b5
...
...
@@ -127,12 +127,16 @@ eb_status_t eb_device_open(eb_socket_t socketp, const char* address, eb_width_t
eb_transports
[
transport
->
link_type
].
send
(
transport
,
link
,
buf
,
sizeof
(
buf
));
timeout
=
3000000
;
/* 3 seconds */
while
(
timeout
>
0
&&
device
->
widths
==
0
)
{
while
(
timeout
>
0
&&
device
->
link
!=
EB_NULL
&&
device
->
widths
==
0
)
{
link
=
EB_LINK
(
device
->
link
);
got
=
eb_socket_block
(
socketp
,
timeout
);
timeout
-=
got
;
eb_socket_poll
(
socketp
);
eb_socket_poll
(
socketp
);
/* Invalidates all pointers */
device
=
EB_DEVICE
(
devicep
);
}
}
while
(
device
->
widths
==
0
&&
--
attempts
!=
0
);
}
while
(
device
->
widths
==
0
&&
device
->
link
!=
EB_NULL
&&
--
attempts
!=
0
);
if
(
device
->
widths
==
0
)
{
eb_device_close
(
devicep
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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