main.c
/*
 * Read a queue entity from the descriptor.
 * Matched by entity_buffer_req().
 * The pointer must be passed entity_free().
 */
Read a queue entity from the descriptor.
Read a queue entity from the descriptor .
static void
entity_read_req(int fd, struct entity *ent)
{
	io_simple_read(fd, &ent->id, sizeof(size_t));
	io_simple_read(fd, &ent->type, sizeof(enum rtype));
	io_str_read(fd, &ent->uri);
	io_simple_read(fd, &ent->has_dgst, sizeof(int));
	if (ent->has_dgst)
		io_simple_read(fd, ent->dgst, sizeof(ent->dgst));
	io_simple_read(fd, &ent->has_pkey, sizeof(int));
	if (ent->has_pkey)
		io_buf_read_alloc(fd, (void **)&ent->pkey, &ent->pkeysz);
	io_simple_read(fd, &ent->has_descr, sizeof(int));
	if (ent->has_descr)
		io_str_read(fd, &ent->descr);
}
static void entity_read_req ( int fd , struct entity * ent ) { io_simple_read ( fd , & ent -> id , sizeof ( size_t ) ) ; io_simple_read ( fd , & ent -> type , sizeof ( enum rtype ) ) ; io_str_read ( fd , & ent -> uri ) ; io_simple_read ( fd , & ent -> has_dgst , sizeof ( int ) ) ; if ( ent -> has_dgst ) io_simple_read ( fd , ent -> dgst , sizeof ( ent -> dgst ) ) ; io_simple_read ( fd , & ent -> has_pkey , sizeof ( int ) ) ; if ( ent -> has_pkey ) io_buf_read_alloc ( fd , ( void * * ) & ent -> pkey , & ent -> pkeysz ) ; io_simple_read ( fd , & ent -> has_descr , sizeof ( int ) ) ; if ( ent -> has_descr ) io_str_read ( fd , & ent -> descr ) ; }
Read a queue entity from the descriptor.
Read a queue entity from the descriptor .