Exemplo n.º 1
0
static int ssmpingd_sock_read(struct thread *t)
{
	struct ssmpingd_sock *ss;
	int result;

	ss = THREAD_ARG(t);

	result = ssmpingd_read_msg(ss);

	/* Keep reading */
	ssmpingd_read_on(ss);

	return result;
}
Exemplo n.º 2
0
static int ssmpingd_sock_read(struct thread *t)
{
  struct ssmpingd_sock *ss;
  int sock_fd;
  int result;

  zassert(t);

  ss = THREAD_ARG(t);
  zassert(ss);

  sock_fd = THREAD_FD(t);
  zassert(sock_fd == ss->sock_fd);

  result = ssmpingd_read_msg(ss);

  /* Keep reading */
  ss->t_sock_read = 0;
  ssmpingd_read_on(ss);

  return result;
}