1 /*****************************************************************************\
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
10 \*****************************************************************************/
17 //#include <sys/types.h>
18 //#include <sys/stat.h>
21 //#define __u8 unsigned char
22 //#define __u16 unsigned short
23 //#define __u32 unsigned long
24 //#include "linux/isdnif.h"
26 unsigned long join_serial = 1; /* must be 1, because 0== no join */
30 class Join *join_first = NULL;
33 * find the join with join_id
35 class Join *find_join_id(unsigned long join_id)
37 class Join *join = join_first;
41 //printf("comparing: '%s' with '%s'\n", name, join->j_name);
42 if (join->j_serial == join_id)
52 * constructor for a new join
58 j_serial = join_serial++;
59 j_type = JOIN_TYPE_NONE;
65 joinp = &((*joinp)->next);
77 class Join *cl, **clp;
91 FATAL("software error, join not in chain!\n");
92 *clp = cl->next; /* detach from chain */
97 /* epoint sends a message to a join
100 void Join::message_epoint(unsigned long epoint_id, int message_type, union parameter *param)
105 /* join process is called from the main loop
106 * it processes the current calling state.
107 * returns 0 if nothing was done
109 int Join::handler(void)
114 /* free all join structures */
120 PDEBUG(DEBUG_JOIN, "no more pending join(s), done!\n");
125 if (options.deb & DEBUG_JOIN)
127 PDEBUG(DEBUG_JOIN, "freeing pending join\n");