FreeCalypso > hg > themwi-system-sw
comparison sip-in/call_list.c @ 63:e5aee661e3b2
sip-in: beginning to handle incoming MNCC messages from themwi-mncc
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 18 Sep 2022 15:01:11 -0800 |
parents | 75b7a7b61824 |
children | 709b78a4ebf0 |
comparison
equal
deleted
inserted
replaced
62:75b7a7b61824 | 63:e5aee661e3b2 |
---|---|
32 uint32_t callref; | 32 uint32_t callref; |
33 { | 33 { |
34 struct call *call; | 34 struct call *call; |
35 | 35 |
36 for (call = call_list; call; call = call->next) | 36 for (call = call_list; call; call = call->next) |
37 if (call->mncc_active && call->mncc_callref == callref) | 37 if (call->mncc_state && call->mncc_callref == callref) |
38 return call; | 38 return call; |
39 return 0; | 39 return 0; |
40 } | 40 } |
41 | 41 |
42 allocate_mncc_callref(call) | 42 allocate_mncc_callref(call) |
45 static uint32_t next_callref; | 45 static uint32_t next_callref; |
46 | 46 |
47 for (;;) { | 47 for (;;) { |
48 next_callref++; | 48 next_callref++; |
49 if (!find_call_by_mncc_callref(next_callref)) { | 49 if (!find_call_by_mncc_callref(next_callref)) { |
50 call->mncc_active = 1; | |
51 call->mncc_callref = next_callref; | 50 call->mncc_callref = next_callref; |
52 return(0); | 51 return(0); |
53 } | 52 } |
54 } | 53 } |
55 } | 54 } |