Merge pull request #128 from pyrl247/master

修复部分设备hostname过长,导致段错误
This commit is contained in:
Derry 2021-06-18 15:10:31 +08:00 committed by GitHub
commit ce258e5e08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -319,7 +319,7 @@ appfilter_handle_dev_list(struct ubus_context *ctx, struct ubus_object *obj,
json_object_object_add(dev_obj, "applist", app_array);
json_object_object_add(dev_obj, "mac", json_object_new_string(node->mac));
char hostname[32] = {0};
char hostname[128] = {0};
get_hostname_by_mac(node->mac, hostname);
json_object_object_add(dev_obj, "ip", json_object_new_string(node->ip));