pongd OK
parent
1377e6fd28
commit
e98b544539
|
@ -80,9 +80,6 @@ void main_loop ()
|
|||
if (ret.error_code != IPC_ERROR_NONE) {
|
||||
PRINTERR (ret, "server write");
|
||||
}
|
||||
if (verbosity > 1) {
|
||||
printf ("message sent\n");
|
||||
}
|
||||
};
|
||||
break;
|
||||
case IPC_EVENT_TYPE_TIMER:{
|
||||
|
@ -98,6 +95,13 @@ void main_loop ()
|
|||
fprintf (stderr, ", %d ctx remaining\n", cpt);
|
||||
};
|
||||
break;
|
||||
case IPC_EVENT_TYPE_TX:
|
||||
{
|
||||
if (verbosity > 1) {
|
||||
printf ("a message was sent\n");
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
fprintf (stderr, "there must be a problem, event not set\n");
|
||||
|
@ -132,15 +136,15 @@ void exit_program (int signal)
|
|||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
argc = argc; // warnings
|
||||
argv = argv; // warnings
|
||||
|
||||
if (argc > 1) {
|
||||
verbosity = atoi(argv[1]);
|
||||
}
|
||||
|
||||
printf ("pid = %d\n", getpid ());
|
||||
|
||||
ctx = malloc (sizeof (struct ipc_ctx));
|
||||
memset (ctx, 0, sizeof (struct ipc_ctx));
|
||||
|
||||
struct ipc_error ret = ipc_server_init (ctx, PONGD_SERVICE_NAME);
|
||||
if (ret.error_code != IPC_ERROR_NONE) {
|
||||
PRINTERR (ret, "server init");
|
||||
|
|
Reference in New Issue