Exemplo n.º 1
0
int json_send_backup_list(struct asfd *asfd,
	struct cstat *clist, struct cstat *cstat)
{
	int ret=-1;
	struct bu *bu;
	if(json_send_client_start(asfd, clist, cstat)) return -1;
	for(bu=cstat->bu; bu; bu=bu->prev)
	{
		if(json_send_backup(asfd, bu))
			goto end;
	}
	ret=0;
end:
	if(json_send_client_end(asfd)) ret=-1;
	return ret;
}
Exemplo n.º 2
0
static int json_send_client_backup(struct asfd *asfd,
	struct cstat *cstat, struct bu *bu1, struct bu *bu2,
	const char *logfile, const char *browse, int use_cache)
{
	int ret=-1;
	if(json_send_client_start(asfd, cstat)) return -1;
	if((ret=json_send_backup(asfd, cstat,
		bu1, 1 /* print flags */, logfile, browse, use_cache)))
			goto end;
	if((ret=json_send_backup(asfd, cstat,
		bu2, 1 /* print flags */, logfile, browse, use_cache)))
			goto end;
end:
	if(json_send_client_end(asfd)) ret=-1;
	return ret;
}
Exemplo n.º 3
0
static int json_send_client_backup_list(struct asfd *asfd,
	struct cstat *cstat, int use_cache)
{
	int ret=-1;
	struct bu *bu;
	if(json_send_client_start(asfd, cstat)) return -1;
	for(bu=cstat->bu; bu; bu=bu->prev)
	{
		if(json_send_backup(asfd, cstat, bu,
			1 /* print flags */, NULL, NULL, use_cache))
				goto end;
	}
	ret=0;
end:
	if(json_send_client_end(asfd)) ret=-1;
	return ret;
}