From 40109f439cd56bd0ecc890c7c446dfebb7d0003f Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Thu, 4 Oct 2018 00:18:08 +0200 Subject: [PATCH] pubsubd cleaning names --- pubsub/app/pubsubd.c | 12 ++++++------ pubsub/lib/pubsub.c | 2 +- pubsub/lib/pubsubd.c | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pubsub/app/pubsubd.c b/pubsub/app/pubsubd.c index c360dae..16d9832 100644 --- a/pubsub/app/pubsubd.c +++ b/pubsub/app/pubsubd.c @@ -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; diff --git a/pubsub/lib/pubsub.c b/pubsub/lib/pubsub.c index bb2661b..44d8040 100644 --- a/pubsub/lib/pubsub.c +++ b/pubsub/lib/pubsub.c @@ -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); diff --git a/pubsub/lib/pubsubd.c b/pubsub/lib/pubsubd.c index 4f7c8d8..fe1a0d6 100644 --- a/pubsub/lib/pubsubd.c +++ b/pubsub/lib/pubsubd.c @@ -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"); } }