Lines Matching defs:read_buf
244 recv_data(int sockfd, unsigned char *read_buf, uint32 size)
264 nbytes = read(sockfd, &(read_buf[totalread]), size);
274 read_buf[totalread] = '\0';
288 unsigned char *read_buf = NULL;
302 read_buf = (unsigned char *)malloc(sizeof(unsigned char) * ((size-VIS_LEN_FIELD_SZ) + 1));
303 if (read_buf == NULL) {
304 VIS_DEBUG("Failed to allocate read_buf buffer of size : %d\n",
309 sz = recv_data(sockfd, read_buf, (size-VIS_LEN_FIELD_SZ));
311 if (read_buf != NULL) {
312 free(read_buf);
313 read_buf = NULL;
318 *data = read_buf;