aboutsummaryrefslogtreecommitdiff
path: root/sim/common/dv-sockser.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-04-13 20:58:54 +0000
committerMike Frysinger <vapier@gentoo.org>2010-04-13 20:58:54 +0000
commite8a761519bd9067830a80b554b8babcca09e42bd (patch)
tree27e8e23fdd00501a7bbfedc295bf451bdcf14a34 /sim/common/dv-sockser.c
parent6f2bc2ee5d9d7c968de49810535e401ee0f6d8a7 (diff)
downloadgdb-e8a761519bd9067830a80b554b8babcca09e42bd.zip
gdb-e8a761519bd9067830a80b554b8babcca09e42bd.tar.gz
gdb-e8a761519bd9067830a80b554b8babcca09e42bd.tar.bz2
sim: dv-sockser: pass up connected state
A few ports rely on internal dv-sockser state in order to detect whether a connection has been made (look for 'extern sockser_addr'). Rather than continuing that tradition, extend the existing status function to return the socket connection status. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/common/dv-sockser.c')
-rw-r--r--sim/common/dv-sockser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index 1e530e2..a8626cd 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -298,7 +298,8 @@ dv_sockser_status (SIM_DESC sd)
fd_set readfds,writefds;
/* status to return if the socket isn't set up, or select fails */
- status = DV_SOCKSER_INPUT_EMPTY | DV_SOCKSER_OUTPUT_EMPTY;
+ status = DV_SOCKSER_INPUT_EMPTY | DV_SOCKSER_OUTPUT_EMPTY |
+ DV_SOCKSER_DISCONNECTED;
if (! connected_p (sd))
return status;