Fixed occurred spelling error fixes: #96
This commit is contained in:
10
src/event.c
10
src/event.c
@@ -104,8 +104,8 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
|
|||||||
ret = tls_clear_pending_write(conn->tls);
|
ret = tls_clear_pending_write(conn->tls);
|
||||||
|
|
||||||
if (ret < 0 && !tls_is_recoverable(tls_error(conn->tls))) {
|
if (ret < 0 && !tls_is_recoverable(tls_error(conn->tls))) {
|
||||||
/* an error occured */
|
/* an error occurred */
|
||||||
xmpp_debug(ctx, "xmpp", "Send error occured, disconnecting.");
|
xmpp_debug(ctx, "xmpp", "Send error occurred, disconnecting.");
|
||||||
conn->error = ECONNABORTED;
|
conn->error = ECONNABORTED;
|
||||||
conn_disconnect(conn);
|
conn_disconnect(conn);
|
||||||
}
|
}
|
||||||
@@ -120,7 +120,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
|
|||||||
ret = tls_write(conn->tls, &sq->data[sq->written], towrite);
|
ret = tls_write(conn->tls, &sq->data[sq->written], towrite);
|
||||||
|
|
||||||
if (ret < 0 && !tls_is_recoverable(tls_error(conn->tls))) {
|
if (ret < 0 && !tls_is_recoverable(tls_error(conn->tls))) {
|
||||||
/* an error occured */
|
/* an error occurred */
|
||||||
conn->error = tls_error(conn->tls);
|
conn->error = tls_error(conn->tls);
|
||||||
break;
|
break;
|
||||||
} else if (ret < towrite) {
|
} else if (ret < towrite) {
|
||||||
@@ -133,7 +133,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
|
|||||||
ret = sock_write(conn->sock, &sq->data[sq->written], towrite);
|
ret = sock_write(conn->sock, &sq->data[sq->written], towrite);
|
||||||
|
|
||||||
if (ret < 0 && !sock_is_recoverable(sock_error())) {
|
if (ret < 0 && !sock_is_recoverable(sock_error())) {
|
||||||
/* an error occured */
|
/* an error occurred */
|
||||||
conn->error = sock_error();
|
conn->error = sock_error();
|
||||||
break;
|
break;
|
||||||
} else if (ret < towrite) {
|
} else if (ret < towrite) {
|
||||||
@@ -160,7 +160,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
|
|||||||
if (conn->error) {
|
if (conn->error) {
|
||||||
/* FIXME: need to tear down send queues and random other things
|
/* FIXME: need to tear down send queues and random other things
|
||||||
* maybe this should be abstracted */
|
* maybe this should be abstracted */
|
||||||
xmpp_debug(ctx, "xmpp", "Send error occured, disconnecting.");
|
xmpp_debug(ctx, "xmpp", "Send error occurred, disconnecting.");
|
||||||
conn->error = ECONNABORTED;
|
conn->error = ECONNABORTED;
|
||||||
conn_disconnect(conn);
|
conn_disconnect(conn);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
|
|||||||
len = res_query(fulldomain, C_IN, T_SRV, buf, sizeof(buf));
|
len = res_query(fulldomain, C_IN, T_SRV, buf, sizeof(buf));
|
||||||
|
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
fprintf(stderr, "res_query(): Error occured (errno=%d)\n", errno);
|
fprintf(stderr, "res_query(): Error occurred (errno=%d)\n", errno);
|
||||||
}
|
}
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
fprintf(stderr, "res_query(): Empty result\n");
|
fprintf(stderr, "res_query(): Empty result\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user