- PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
-}
-
-void vss_post_select(fd_set *rfds, fd_set *wfds)
-{
- int ret;
-
- if (FD_ISSET(afs_socket, rfds))
- recv_afs_result();
- if (afsss != AFS_SOCKET_CHECK_FOR_WRITE || !FD_ISSET(afs_socket, wfds))
- return;
- PARA_NOTICE_LOG("requesting new fd from afs\n");
- ret = send_buffer(afs_socket, "new");
- afsss = AFS_SOCKET_AFD_PENDING;
-}
-
-static void get_chunk(long unsigned chunk_num, char **buf, size_t *len)
-{
- size_t pos = mmd->afd.afhi.chunk_table[chunk_num];
- *buf = map + pos;
- *len = mmd->afd.afhi.chunk_table[chunk_num + 1] - pos;
-}
-
-/**
- * Get the data of the given chunk.
- *
- * \param chunk_num The number of the desired chunk.
- * \param buf Chunk data.
- * \param len Chunk length in bytes.
- *
- * \return Standard.
- */
-int vss_get_chunk(long unsigned chunk_num, char **buf, size_t *len)
-{
- if (!map || !vss_playing())
- return -E_CHUNK;
- if (chunk_num >= mmd->afd.afhi.chunks_total)
- return -E_CHUNK;
- get_chunk(chunk_num, buf, len);
- return 1;