strncpy(lsess.name, iter->name, sizeof(lsess.name));
lsess.name[sizeof(lsess.name) - 1] = '\0';
memcpy(<[i], &lsess, sizeof(lsess));
strncpy(lsess.name, iter->name, sizeof(lsess.name));
lsess.name[sizeof(lsess.name) - 1] = '\0';
memcpy(<[i], &lsess, sizeof(lsess));