1 /*****************************************************************************\
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
10 \*****************************************************************************/
13 //#define __u8 unsigned char
14 //#define __u16 unsigned short
15 //#define __u32 unsigned int
17 unsigned int join_serial = 1; /* must be 1, because 0== no join */
21 class Join *join_first = NULL;
24 * find the join with join_id
26 class Join *find_join_id(unsigned int join_id)
28 class Join *join = join_first;
32 //printf("comparing: '%s' with '%s'\n", name, join->j_name);
33 if (join->j_serial == join_id)
43 * constructor for a new join
49 j_serial = join_serial++;
50 j_type = JOIN_TYPE_NONE;
56 joinp = &((*joinp)->next);
68 class Join *cl, **clp;
82 FATAL("software error, join not in chain!\n");
83 *clp = cl->next; /* detach from chain */
88 /* epoint sends a message to a join
91 void Join::message_epoint(unsigned int epoint_id, int message_type, union parameter *param)
96 /* join process is called from the main loop
97 * it processes the current calling state.
98 * returns 0 if nothing was done
100 int Join::handler(void)
105 /* free all join structures */
111 PDEBUG(DEBUG_JOIN, "no more pending join(s), done!\n");
116 if (options.deb & DEBUG_JOIN)
118 PDEBUG(DEBUG_JOIN, "freeing pending join\n");