Misc. cleanups.
* daemon.h: * gnuserv.c: (syslog_message), (syslog_io_message): * main.c: (handle_parent_connection): * slave.c: (handle_slave_connection), (handle_slave_command): Misc. cleanups.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2005-02-15 Benoît Dejean <TazForEver@dlfp.org>
|
||||
|
||||
* daemon.h:
|
||||
* gnuserv.c: (syslog_message), (syslog_io_message):
|
||||
* main.c: (handle_parent_connection):
|
||||
* slave.c: (handle_slave_connection), (handle_slave_command): Misc. cleanups.
|
||||
|
||||
2004-09-19 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* gnuserv.c: (setup_table): 'screen' is only defined when AUTH_MAGIC_COOKIE
|
||||
|
@@ -60,17 +60,17 @@ G_BEGIN_DECLS
|
||||
#define MSG_BUFSZ sizeof (struct _glibtop_ipc_message)
|
||||
#define MSG_MSGSZ (MSG_BUFSZ - sizeof (long))
|
||||
|
||||
void handle_parent_connection (int s);
|
||||
void handle_slave_connection (int input, int output);
|
||||
void handle_parent_connection (int s) G_GNUC_INTERNAL;
|
||||
void handle_slave_connection (int input, int output) G_GNUC_INTERNAL;
|
||||
void handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
|
||||
const void *parameter);
|
||||
const void *parameter) G_GNUC_INTERNAL ;
|
||||
|
||||
void do_output (int s, glibtop_response *resp, off_t offset,
|
||||
size_t data_size, const void *data);
|
||||
int do_read (int s, void *ptr, size_t total_size);
|
||||
size_t data_size, const void *data) G_GNUC_INTERNAL;
|
||||
int do_read (int s, void *ptr, size_t total_size) G_GNUC_INTERNAL;
|
||||
|
||||
void syslog_message (int priority, char *format, ...);
|
||||
void syslog_io_message (int priority, char *format, ...);
|
||||
void syslog_message (int priority, const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(2, 3);
|
||||
void syslog_io_message (int priority, const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(2, 3);
|
||||
|
||||
extern int enable_debug;
|
||||
extern int verbose_output;
|
||||
|
@@ -65,8 +65,6 @@ char *program_invocation_short_name;
|
||||
char *program_invocation_name;
|
||||
#endif
|
||||
|
||||
void handle_parent_connection (int s);
|
||||
void handle_slave_connection (int input, int output);
|
||||
|
||||
#if !defined(INTERNET_DOMAIN_SOCKETS)
|
||||
#error "Internet Domain sockets are required"
|
||||
@@ -87,7 +85,7 @@ static int invoked_from_inetd = 0;
|
||||
static int changed_uid = 0;
|
||||
|
||||
void
|
||||
syslog_message (int priority, char *format, ...)
|
||||
syslog_message (int priority, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char buffer [BUFSIZ];
|
||||
@@ -100,7 +98,7 @@ syslog_message (int priority, char *format, ...)
|
||||
}
|
||||
|
||||
void
|
||||
syslog_io_message (int priority, char *format, ...)
|
||||
syslog_io_message (int priority, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char buffer [BUFSIZ];
|
||||
|
@@ -67,8 +67,8 @@ handle_parent_connection (int s)
|
||||
|
||||
if (cmnd->data_size >= BUFSIZ) {
|
||||
syslog_message (LOG_WARNING,
|
||||
"Client sent %d bytes, but buffer is %d",
|
||||
cmnd->data_size, BUFSIZ);
|
||||
"Client sent %d bytes, but buffer is %lu",
|
||||
(int)cmnd->data_size, (unsigned long)BUFSIZ);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -229,8 +229,8 @@ handle_parent_connection (int s)
|
||||
0, NULL);
|
||||
break;
|
||||
default:
|
||||
syslog_message (LOG_ERR, "Parent received unknown command %u.",
|
||||
cmnd->command);
|
||||
syslog_message (LOG_ERR, "Parent received unknown command %d.",
|
||||
(int)cmnd->command);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -47,8 +47,8 @@ handle_slave_connection (int input, int output)
|
||||
|
||||
if (cmnd->data_size >= BUFSIZ)
|
||||
glibtop_error ("Client sent %d bytes, "
|
||||
"but buffer is %d",
|
||||
cmnd->size, BUFSIZ);
|
||||
"but buffer is %lu",
|
||||
cmnd->size, (unsigned long)BUFSIZ);
|
||||
|
||||
memset (resp, 0, sizeof (glibtop_response));
|
||||
|
||||
@@ -249,7 +249,7 @@ handle_slave_command (glibtop_command *cmnd, glibtop_response *resp,
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
glibtop_error ("Child received unknown command %u",
|
||||
glibtop_error ("Child received unknown command %d",
|
||||
cmnd->command);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user