summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/luci-lib-httpprotoutils/luasrc/http/mime.lua3
-rw-r--r--libs/rpcd-mod-luci/src/luci.c14
2 files changed, 10 insertions, 7 deletions
diff --git a/libs/luci-lib-httpprotoutils/luasrc/http/mime.lua b/libs/luci-lib-httpprotoutils/luasrc/http/mime.lua
index 0bcff8a36b..90176b5a77 100644
--- a/libs/luci-lib-httpprotoutils/luasrc/http/mime.lua
+++ b/libs/luci-lib-httpprotoutils/luasrc/http/mime.lua
@@ -45,10 +45,13 @@ MIME_TYPES = {
["mp3"] = "audio/mpeg";
["ogg"] = "audio/x-vorbis+ogg";
["wav"] = "audio/x-wav";
+ ["aac"] = "audio/aac";
["mpg"] = "video/mpeg";
["mpeg"] = "video/mpeg";
["avi"] = "video/x-msvideo";
+ ["mov"] = "video/quicktime";
+ ["mp4"] = "video/mp4";
}
-- "application/octet-stream" if the extension is unknown.
diff --git a/libs/rpcd-mod-luci/src/luci.c b/libs/rpcd-mod-luci/src/luci.c
index 422555453d..e21105d3c6 100644
--- a/libs/rpcd-mod-luci/src/luci.c
+++ b/libs/rpcd-mod-luci/src/luci.c
@@ -791,13 +791,13 @@ rpc_luci_parse_network_device_sys(const char *name, struct ifaddrs *ifaddr)
blobmsg_close_table(&blob, o2);
o2 = blobmsg_open_table(&blob, "flags");
- blobmsg_add_u8(&blob, "up", ifa_flags & IFF_UP);
- blobmsg_add_u8(&blob, "broadcast", ifa_flags & IFF_BROADCAST);
- blobmsg_add_u8(&blob, "promisc", ifa_flags & IFF_PROMISC);
- blobmsg_add_u8(&blob, "loopback", ifa_flags & IFF_LOOPBACK);
- blobmsg_add_u8(&blob, "noarp", ifa_flags & IFF_NOARP);
- blobmsg_add_u8(&blob, "multicast", ifa_flags & IFF_MULTICAST);
- blobmsg_add_u8(&blob, "pointtopoint", ifa_flags & IFF_POINTOPOINT);
+ blobmsg_add_u8(&blob, "up", !!(ifa_flags & IFF_UP));
+ blobmsg_add_u8(&blob, "broadcast", !!(ifa_flags & IFF_BROADCAST));
+ blobmsg_add_u8(&blob, "promisc", !!(ifa_flags & IFF_PROMISC));
+ blobmsg_add_u8(&blob, "loopback", !!(ifa_flags & IFF_LOOPBACK));
+ blobmsg_add_u8(&blob, "noarp", !!(ifa_flags & IFF_NOARP));
+ blobmsg_add_u8(&blob, "multicast", !!(ifa_flags & IFF_MULTICAST));
+ blobmsg_add_u8(&blob, "pointtopoint", !!(ifa_flags & IFF_POINTOPOINT));
blobmsg_close_table(&blob, o2);
o2 = blobmsg_open_table(&blob, "link");