BUG FIX: added copy_device_name() to ensure null-termination in networkmap/function.c, fixed wrong Array size in client_function.js