Archived
3
0

pubsubd cleaning names

This commit is contained in:
Philippe PITTOLI 2018-10-04 00:18:08 +02:00
parent 66b821be62
commit 40109f439c
3 changed files with 11 additions and 11 deletions

View File

@ -16,8 +16,8 @@ struct channels chans;
void handle_signal (int signalnumber)
{
// the application will shut down, and remove the service named pipe
if (server_close (&srv) < 0) {
handle_error("server_close < 0");
if (ipc_server_close (&srv) < 0) {
handle_error("ipc_server_close < 0");
}
pubsubd_channels_del_all (&chans);
@ -40,8 +40,8 @@ main(int argc, char **argv, char **env)
memset (&chans, 0, sizeof (struct channels));
pubsubd_channels_init (&chans);
if (server_init (argc, argv, env, &srv, PUBSUBD_SERVICE_NAME) < 0) {
handle_error("server_init < 0");
if (ipc_server_init (argc, argv, env, &srv, PUBSUBD_SERVICE_NAME) < 0) {
handle_error("ipc_server_init < 0");
return EXIT_FAILURE;
}
printf ("Listening on %s.\n", srv.spath);
@ -52,8 +52,8 @@ main(int argc, char **argv, char **env)
pubsubd_main_loop (&srv, &chans);
// the application will shut down, and remove the service named pipe
if (server_close (&srv) < 0) {
handle_error("server_close < 0");
if (ipc_server_close (&srv) < 0) {
handle_error("ipc_server_close < 0");
}
return EXIT_SUCCESS;

View File

@ -61,7 +61,7 @@ int pubsub_message_send (struct service *srv, const struct pubsub_msg * m)
memset (&m_data, 0, sizeof (struct ipc_message));
// format the connection msg
if (msg_format_data (&m_data, buf, msize) < 0) {
if (ipc_message_format_data (&m_data, buf, msize) < 0) {
handle_err ("pubsub_message_send", "msg_format_data");
if (buf != NULL)
free (buf);

View File

@ -64,7 +64,7 @@ void handle_new_connection (struct service *srv, struct ipc_process_array *ap)
struct ipc_process *p = malloc(sizeof(struct ipc_process));
memset(p, 0, sizeof(struct ipc_process));
if (server_accept (srv, p) < 0) {
if (ipc_server_accept (srv, p) < 0) {
handle_error("server_accept < 0");
} else {
printf("new connection\n");
@ -83,7 +83,7 @@ void handle_new_msg (struct channels *chans
int i;
for (i = 0; i < proc_to_read->size; i++) {
// printf ("loop handle_new_msg\n");
if (server_read (proc_to_read->tab_proc[i], &m) < 0) {
if (ipc_server_read (proc_to_read->tab_proc[i], &m) < 0) {
handle_error("server_read < 0");
}
@ -99,7 +99,7 @@ void handle_new_msg (struct channels *chans
pubsubd_channels_unsubscribe_everywhere (chans, p);
// close the connection to the process
if (server_close_proc (p) < 0)
if (ipc_server_close_proc (p) < 0)
handle_error( "server_close_proc < 0");
@ -190,7 +190,7 @@ void pubsubd_main_loop (struct service *srv, struct channels *chans)
}
for (i = 0; i < ap.size; i++) {
if (server_close_proc (ap.tab_proc[i]) < 0) {
if (ipc_server_close_proc (ap.tab_proc[i]) < 0) {
handle_error( "server_close_proc < 0");
}
}