[Nbd] [PATCH 1/2] nbd-server: check the right socket variable for an invalid value
- To: nbd-general@lists.sourceforge.net
- Subject: [Nbd] [PATCH 1/2] nbd-server: check the right socket variable for an invalid value
- From: Tuomas Räsänen <tuomasjjrasanen@...1261...>
- Date: Sat, 1 Jun 2013 21:19:50 +0300
- Message-id: <b9e7328ef2b854cae63230eabf408dd0447142ad.1370110565.git.tuomasjjrasanen@...1261...>
The previous check referred to a variable which was used only for
initializing the fd set and wasn't meaningful in the context of the
invalidity check.
Signed-off-by: Tuomas Räsänen <tuomasjjrasanen@...1261...>
---
nbd-server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nbd-server.c b/nbd-server.c
index 6c80599..f3c78bd 100644
--- a/nbd-server.c
+++ b/nbd-server.c
@@ -2450,7 +2450,7 @@ void serveloop(GArray* servers) {
SERVER *serve;
serve=&(g_array_index(servers, SERVER, i));
- if(sock < 0) {
+ if(serve->socket < 0) {
continue;
}
if(FD_ISSET(serve->socket, &rset)) {
--
1.7.10.4
Reply to: