You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2020/06/16 20:25:03 UTC
[GitHub] [guacamole-server] necouchman commented on a change in pull request #282: GUACAMOLE-513: Handle cases where socket open fails.
necouchman commented on a change in pull request #282:
URL: https://github.com/apache/guacamole-server/pull/282#discussion_r441120057
##########
File path: src/libguac/wol.c
##########
@@ -85,19 +86,31 @@ static ssize_t __guac_wol_send_packet(const char* broadcast_addr,
wol_dest.sin_family = AF_INET;
if (inet_pton(AF_INET, broadcast_addr, &(wol_dest.sin_addr)) == 0) {
wol_dest.sin_family = AF_INET6;
- if (inet_pton(AF_INET6, broadcast_addr, &(wol_dest.sin_addr)) == 0)
+ if (inet_pton(AF_INET6, broadcast_addr, &(wol_dest.sin_addr)) == 0) {
+ guac_error = GUAC_STATUS_SEE_ERRNO;
+ guac_error_message = "Wake-on-LAN address does not appear to be IPv4 or IPv6";
return 0;
+ }
Review comment:
Okay, I'll refactor this a bit to handle both of those cases.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org