X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=textclient%2Fipc_c_tcp.c;h=9124cf943785c7f7621aaf6d23956370d7e37f8c;hb=HEAD;hp=93edebcdb4a0e0be7850e819e6fc16dd8a27fd18;hpb=2dfd5bee542a9d635e380097e63c307bd6c27d65;p=citadel.git diff --git a/textclient/ipc_c_tcp.c b/textclient/ipc_c_tcp.c index 93edebcdb..9124cf943 100644 --- a/textclient/ipc_c_tcp.c +++ b/textclient/ipc_c_tcp.c @@ -1,17 +1,8 @@ -/* - * Client-side IPC functions - * - * Copyright (c) 1987-2018 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - +// Client-side IPC functions +// +// Copyright (c) 1987-2018 by the citadel.org team +// +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License version 3. #include "textclient.h" @@ -19,7 +10,7 @@ /* Note that some of these functions may not work with multiple instances. */ static void (*deathHook)(void) = NULL; -int (*error_printf)(char *s, ...) = (int (*)(char *, ...))printf; +int (*error_printf)(char *s, ...) = (int (*)(char *, ...)) printf; void setIPCDeathHook(void (*hook)(void)) { deathHook = hook; @@ -29,7 +20,7 @@ void setIPCErrorPrintf(int (*func)(char *s, ...)) { error_printf = func; } -void connection_died(CtdlIPC* ipc, int using_ssl) { +void connection_died(CtdlIPC * ipc, int using_ssl) { if (deathHook != NULL) { deathHook(); } @@ -43,7 +34,8 @@ void connection_died(CtdlIPC* ipc, int using_ssl) { fprintf(stderr, "Last error: %s\n", ERR_reason_error_string(ERR_get_error())); SSL_free(ipc->ssl); ipc->ssl = NULL; - } else + } + else #endif fprintf(stderr, "Last error: %s\n", strerror(errno)); @@ -52,5 +44,5 @@ void connection_died(CtdlIPC* ipc, int using_ssl) { fflush(stdout); shutdown(ipc->sock, 2); ipc->sock = -1; - exit(1); + exit(1); }