Obsolete
/
libipc-old
Archived
3
0
Fork 0

pubsubd: test

more_to_read
Philippe PITTOLI 2016-09-08 13:23:07 +02:00
parent e9169a633d
commit 4065b1ab0a
1 changed files with 6 additions and 2 deletions

View File

@ -18,6 +18,10 @@ struct worker_params {
void * pubsubd_worker_thread (void *params) void * pubsubd_worker_thread (void *params)
{ {
struct worker_params *wp = (struct worker_params *) params; struct worker_params *wp = (struct worker_params *) params;
if (wp == NULL) {
fprintf (stderr, "error pubsubd_worker_thread : params NULL\n");
return NULL;
}
while (1) { while (1) {
// each chan has a list of subscribers // each chan has a list of subscribers
@ -30,7 +34,7 @@ void * pubsubd_worker_thread (void *params)
struct pubsub_msg m; struct pubsub_msg m;
memset (&m, 0, sizeof (struct pubsub_msg)); memset (&m, 0, sizeof (struct pubsub_msg));
sleep (5); sleep (5); // TODO DEBUG
pubsubd_msg_recv (wp->ale->p, &m); pubsubd_msg_recv (wp->ale->p, &m);
pubsubd_msg_print (&m); pubsubd_msg_print (&m);