diff --git a/src/contentdir.c b/src/contentdir.c index e1e7547..efbad5d 100644 --- a/src/contentdir.c +++ b/src/contentdir.c @@ -18,6 +18,7 @@ * */ +#include #include #include /* Gnulib/C99 */ #include /* ? */ diff --git a/src/upnp.c b/src/upnp.c index 19aba6a..cf32e4c 100644 --- a/src/upnp.c +++ b/src/upnp.c @@ -265,7 +265,7 @@ handle_get_var_request(struct Upnp_State_Var_Request *request) say(3, _("Event device UDN: %s\n"), quotearg(request->DevUDN)); say(3, _("Event service ID: %s\n"), quotearg(request->ServiceID)); say(3, _("Event variable name: %s\n"), quotearg(request->StateVarName)); - say(3, _("Event source: %s\n"), inet_ntoa(request->CtrlPtIPAddr)); + say(3, _("Event source: %s\n"), inet_ntoa(((struct sockaddr_in *)&request->CtrlPtIPAddr)->sin_addr)); if (strcmp(request->DevUDN, device_udn) != 0) { say(1, _("Discarding event - event device UDN (%s) not recognized\n"), quotearg(request->DevUDN)); @@ -306,7 +306,7 @@ handle_action_request(struct Upnp_Action_Request *request) say(3, _("Event device UDN: %s\n"), quotearg(request->DevUDN)); say(3, _("Event service ID: %s\n"), quotearg(request->ServiceID)); say(3, _("Event action name: %s\n"), quotearg(request->ActionName)); - say(3, _("Event source: %s\n"), inet_ntoa(request->CtrlPtIPAddr)); + say(3, _("Event source: %s\n"), inet_ntoa(((struct sockaddr_in *)&request->CtrlPtIPAddr)->sin_addr)); say_document(4, _("Event action request:\n"), request->ActionRequest); if (strcmp(request->DevUDN, device_udn) != 0) {