struct buffer buf; /* input buffer, raw HTTP */
} res;
struct {
- /* callbacks used to send the request, */
+ /* callbacks used to send the request, */
void (*req_payload)(struct httpclient *hc); /* send a payload */
/* callbacks used to receive the response, if not set, the IO
void (*res_end)(struct httpclient *hc); /* end of the response */
} ops;
struct sockaddr_storage *dst; /* destination address */
- struct appctx *appctx; /* HTTPclient appctx */
+ struct appctx *appctx; /* HTTP client appctx */
int timeout_server; /* server timeout in ms */
void *caller; /* ptr of the caller */
unsigned int flags; /* other flags */
#define HTTPCLIENT_FS_ENDED 0x00020000 /* the httpclient is stopped */
/* options */
-#define HTTPCLIENT_O_HTTPPROXY 0x00000001 /* the request must be use an absolute URI */
+#define HTTPCLIENT_O_HTTPPROXY 0x00000001 /* the request must use an absolute URI */
#define HTTPCLIENT_O_RES_HTX 0x00000002 /* response is stored in HTX */
/* States of the HTTP Client Appctx */
#define HTTPCLIENT_USERAGENT "HAProxy"
-#endif /* ! _HAPROXY_HTTCLIENT__T_H */
+#endif /* !_HAPROXY_HTTPCLIENT_T_H */
return !!(hc->flags & HTTPCLIENT_FS_STARTED);
}
-#endif /* ! _HAPROXY_HTTCLIENT_H */
+#endif /* !_HAPROXY_HTTPCLIENT_H */
struct ist myist;
myist = ist2(buf, len);
- ret = dns_ring_write(ns->stream->ring_req, DNS_TCP_MSG_MAX_SIZE, NULL, 0, &myist, 1);
+ ret = dns_ring_write(ns->stream->ring_req, DNS_TCP_MSG_MAX_SIZE, NULL, 0, &myist, 1);
if (!ret) {
ns->counters->snd_error++;
return -1;
*/
ssize_t dns_recv_nameserver(struct dns_nameserver *ns, void *data, size_t size)
{
- ssize_t ret = -1;
+ ssize_t ret = -1;
if (ns->dgram) {
struct dgram_conn *dgram = &ns->dgram->conn;
{
struct dns_stream_server *dss = NULL;
- dss = calloc(1, sizeof(*dss));
- if (!dss) {
+ dss = calloc(1, sizeof(*dss));
+ if (!dss) {
ha_alert("memory allocation error initializing dns tcp server '%s'.\n", srv->id);
goto out;
}
if (!dns_msg_trash)
return 0;
- return 1;
+ return 1;
}
void deinit_dns_buffers()
* This function tries to destroy the httpclient if it wasn't running.
* If it was running, stop the client and ask it to autodestroy itself.
*
- * Once this function is used, all pointer sto the client must be removed
+ * Once this function is used, all pointers to the client must be removed
*
*/
void httpclient_stop_and_destroy(struct httpclient *hc)