buf[sizeof buf - 2] = '\n';
client_write(buf, strlen(buf));
va_end(arg_ptr);
-}
+}
/*
}
-int HaveMoreLinesWaiting(CitContext *CCC)
-{
+int HaveMoreLinesWaiting(CitContext *CCC) {
if ((CCC->kill_me != 0) ||
( (CCC->RecvBuf.ReadWritePointer == NULL) &&
(StrLength(CCC->RecvBuf.Buf) == 0) &&
* (This is implemented in terms of client_read_to() and could be
* justifiably moved out of sysdep.c)
*/
-INLINE int client_read(char *buf, int bytes)
-{
+INLINE int client_read(char *buf, int bytes) {
return(client_read_to(buf, bytes, CtdlGetConfigInt("c_sleeping")));
}
-int CtdlClientGetLine(StrBuf *Target)
-{
+int CtdlClientGetLine(StrBuf *Target) {
CitContext *CCC=CC;
const char *Error;
int rc;
* (This is implemented in terms of client_read() and could be
* justifiably moved out of sysdep.c)
*/
-int client_getln(char *buf, int bufsize)
-{
+int client_getln(char *buf, int bufsize) {
int i, retval;
CitContext *CCC=CC;
const char *pCh;
/*
* Cleanup any contexts that are left lying around
*/
-
-
-void close_masters (void)
-{
+void close_masters(void) {
struct ServiceFunctionHook *serviceptr;
const char *Text;
for (serviceptr = ServiceHookTable; serviceptr != NULL;
serviceptr = serviceptr->next ) {
- if (serviceptr->tcp_port > 0)
- {
+ if (serviceptr->tcp_port > 0) {
if (serviceptr->msock == -1) {
Text = "not closing again";
}
serviceptr->tcp_port = 0;
}
- if (serviceptr->sockpath != NULL)
- {
+ if (serviceptr->sockpath != NULL) {
if (serviceptr->msock == -1) {
Text = "not closing again";
}
);
}
- if (serviceptr->msock != -1)
- {
+ if (serviceptr->msock != -1) {
close(serviceptr->msock);
serviceptr->msock = -1;
}
* The system-dependent part of master_cleanup() - close the master socket.
*/
void sysdep_master_cleanup(void) {
-
close_masters();
-
context_cleanup();
-
#ifdef HAVE_OPENSSL
destruct_ssl();
#endif
- CtdlDestroyProtoHooks();
- CtdlDestroyDeleteHooks();
- CtdlDestroyXmsgHooks();
- CtdlDestroyUserHooks();
- CtdlDestroyMessageHook();
- CtdlDestroyCleanupHooks();
- CtdlDestroyFixedOutputHooks();
- CtdlDestroySessionHooks();
- CtdlDestroyServiceHook();
- CtdlDestroyRoomHooks();
- CtdlDestroySearchHooks();
}
}
-
-void checkcrash(void)
-{
- if (nFireUpsNonRestart != nFireUps)
- {
+void checkcrash(void) {
+ if (nFireUpsNonRestart != nFireUps) {
StrBuf *CrashMail;
CrashMail = NewStrBuf();
syslog(LOG_ALERT, "sysdep: posting crash message");
}
-
-void HuntBadSession(void)
-{
+void HuntBadSession(void) {
int highest;
CitContext *ptr;
fd_set readfds;