示例#1
0
文件: file.c 项目: mario911/xrdp-ng
/* this function should be prefered over file_read_section because it can
 read any file size */
int file_by_name_read_section(const char *file_name, const char *section, xrdpList *names, xrdpList *values)
{
	int fd;
	int file_size;
	int rv;

	file_size = g_file_get_size(file_name);

	if (file_size < 1)
	{
		return 1;
	}

	fd = g_file_open(file_name);

	if (fd < 1)
	{
		return 1;
	}

	rv = l_file_read_section(fd, file_size, section, names, values);
	g_file_close(fd);

	return rv;
}
示例#2
0
文件: file.c 项目: mario911/xrdp-ng
/* 32 K file size limit */
int file_read_section(int fd, const char *section, xrdpList *names, xrdpList *values)
{
	return l_file_read_section(fd, 32 * 1024, section, names, values);
}
示例#3
0
文件: file.c 项目: 340211173/xrdp
/* 32 K file size limit */
int APP_CC
file_read_section(int fd, const char *section,
                  struct list *names, struct list *values)
{
    return l_file_read_section(fd, 32 * 1024, section, names, values);
}