Lines Matching full:sendreq
212 struct send_request *sendreq;
251 for (sendreq = server->qhead; sendreq; sendreq = sendreq->next)
260 for (sendreq = server->qhead; sendreq; sendreq = sendreq->next)
262 vec[n].iov_base = (char *) sendreq->data;
263 vec[n].iov_len = sendreq->len;
281 sendreq = server->qhead;
283 scount = swrite(server->tcp_socket, sendreq->data, sendreq->len);
301 struct send_request *sendreq;
304 sendreq = server->qhead;
305 if ((size_t)num_bytes >= sendreq->len) {
306 num_bytes -= sendreq->len;
307 server->qhead = sendreq->next;
308 if (sendreq->data_storage)
309 free(sendreq->data_storage);
310 free(sendreq);
320 sendreq->data += num_bytes;
321 sendreq->len -= num_bytes;
727 struct send_request *sendreq;
746 sendreq = calloc(1, sizeof(struct send_request));
747 if (!sendreq)
755 * then we give the sendreq its own copy of the request packet
756 * and put it in sendreq->data_storage.
758 sendreq->data_storage = NULL;
759 sendreq->data = query->tcpbuf;
760 sendreq->len = query->tcplen;
761 sendreq->owner_query = query;
762 sendreq->next = NULL;
764 server->qtail->next = sendreq;
768 server->qhead = sendreq;
770 server->qtail = sendreq;
1218 struct send_request *sendreq;
1219 for (sendreq = server->qhead; sendreq; sendreq = sendreq->next)
1220 if (sendreq->owner_query == query)
1222 sendreq->owner_query = NULL;
1223 assert(sendreq->data_storage == NULL);
1227 * sendreq points into this soon-to-be-gone query's
1240 sendreq->data_storage = malloc(sendreq->len);
1241 if (sendreq->data_storage != NULL)
1243 memcpy(sendreq->data_storage, sendreq->data, sendreq->len);
1244 sendreq->data = sendreq->data_storage;
1247 if ((status != ARES_SUCCESS) || (sendreq->data_storage == NULL))
1259 /* Just to be paranoid, zero out this sendreq... */
1260 sendreq->data = NULL;
1261 sendreq->len = 0;