Example #1
0
int
utempter_remove_record(int master_fd)
{
	const char *const args[] =
		{ utempter_pathname ? : UTEMPTER_DEFAULT_PATHNAME, "del", 0 };
	int     status = execute_helper(master_fd, args);

	if (master_fd == saved_fd)
		saved_fd = -1;

	return status;
}
Example #2
0
int
utempter_add_record(int master_fd, const char *hostname)
{
	const char *const args[] =
		{ utempter_pathname ? : UTEMPTER_DEFAULT_PATHNAME, "add",
		  hostname, 0 };
	int     status = execute_helper(master_fd, args);

	if (status)
		saved_fd = master_fd;

	return status;
}
Example #3
0
int BBSClient::take_todo() {
	int type;
	char* rs;
	size_t n;
	while((type = get(0, TAKE_TODO)) == CONTEXT) {
		upkint(); // throw away userid
#if debug
printf("execute context\n");
fflush(stdout);
#endif
		rs = execute_helper(&n, -1);
		if (rs) { delete [] rs; }
	}
	return type;
}