/*
* sending
*/
-bool pktbuf_send_immidiate(PktBuf *buf, PgSocket *sk) _MUSTCHECK;
+bool pktbuf_send_immediate(PktBuf *buf, PgSocket *sk) _MUSTCHECK;
bool pktbuf_send_queued(PktBuf *buf, PgSocket *sk) _MUSTCHECK;
/*
} while (0)
/*
- * Shortcuts for immidiate send of one packet.
+ * Shortcuts for immediate send of one packet.
*/
#define SEND_wrap(buflen, pktfn, res, sk, args...) do { \
uint8_t _data[buflen]; PktBuf _buf; \
pktbuf_static(&_buf, _data, sizeof(_data)); \
pktfn(&_buf, ## args); \
- res = pktbuf_send_immidiate(&_buf, sk); \
+ res = pktbuf_send_immediate(&_buf, sk); \
} while (0)
#define SEND_RowDescription(res, sk, args...) \
pktbuf_static(&buf, tmp, sizeof(tmp));
pktbuf_write_CommandComplete(&buf, desc);
pktbuf_write_ReadyForQuery(&buf);
- return pktbuf_send_immidiate(&buf, admin);
+ return pktbuf_send_immediate(&buf, admin);
}
/*
}
case 'F': /* FunctionCall */
- /* request immidiate response from server */
+ /* request immediate response from server */
case 'H': /* Flush */
case 'S': /* Sync */
fatal("bad server state in release_server (%d)", server->state);
}
- /* enforce lifetime immidiately on release */
+ /* enforce lifetime immediately on release */
if (server->state != SV_LOGIN && life_over(server)) {
disconnect_server(server, true, "server_lifetime");
pool->last_lifetime_disconnect = get_cached_time();
return temp_pktbuf;
}
-bool pktbuf_send_immidiate(PktBuf *buf, PgSocket *sk)
+bool pktbuf_send_immediate(PktBuf *buf, PgSocket *sk)
{
int fd = sbuf_socket(&sk->sbuf);
uint8_t *pos = buf->buf + buf->send_pos;
return false;
res = safe_send(fd, pos, amount, 0);
if (res < 0) {
- log_debug("pktbuf_send_immidiate: %s", strerror(errno));
+ log_debug("pktbuf_send_immediate: %s", strerror(errno));
}
return res == amount;
}
'S', "ERROR", 'C', "08P01", 'M', msg, 0);
if (send_ready)
pktbuf_write_ReadyForQuery(&buf);
- return pktbuf_send_immidiate(&buf, client);
+ return pktbuf_send_immediate(&buf, client);
}
/*
}
/* send all together */
- res = pktbuf_send_immidiate(msg, client);
+ res = pktbuf_send_immediate(msg, client);
if (!res) {
disconnect_client(client, true, "failed to send welcome message");
return false;
pktbuf_write_StartupMessage(pkt, username,
db->startup_params->buf,
db->startup_params->write_pos);
- return pktbuf_send_immidiate(pkt, server);
+ return pktbuf_send_immediate(pkt, server);
}
int scan_text_result(struct MBuf *pkt, const char *tupdesc, ...)
/* launch connection */
res = safe_connect(sock, sa, sa_len);
if (res == 0) {
- /* unix socket gives connection immidiately */
+ /* unix socket gives connection immediately */
sbuf_connect_cb(sock, EV_WRITE, sbuf);
return true;
} else if (errno == EINPROGRESS) {
pktbuf_finish_packet(pkt);
slog_debug(server, "varcache_apply: %s", pkt->buf + sql_ofs);
- return pktbuf_send_immidiate(pkt, server);
+ return pktbuf_send_immediate(pkt, server);
}
void varcache_fill_unset(VarCache *src, PgSocket *dst)