reds_init_net: report errors on watch setup failures

We used to be aborting in such situations, but this was changed
during the big spice_error/printerr cleanup. We are currently
outputting a warning but not reporting the error with the caller
when reds_init_net fails to register listening watches with the
mainloop. As it's unlikely that things will work as expected in
such cases, better to error out of the function instead of pretending
everything is all right.
This commit is contained in:
Christophe Fergeau 2012-09-11 18:07:06 +02:00
parent eb19ac081f
commit 5177c5fd09

View File

@ -3176,6 +3176,7 @@ static int reds_init_net(void)
reds_accept, NULL);
if (reds->listen_watch == NULL) {
spice_warning("set fd handle failed");
return -1;
}
}
@ -3190,6 +3191,7 @@ static int reds_init_net(void)
reds_accept_ssl_connection, NULL);
if (reds->secure_listen_watch == NULL) {
spice_warning("set fd handle failed");
return -1;
}
}
@ -3200,6 +3202,7 @@ static int reds_init_net(void)
reds_accept, NULL);
if (reds->listen_watch == NULL) {
spice_warning("set fd handle failed");
return -1;
}
}
return 0;