* track which amp is opened (with amp_open) * needed at least for transceive mode */
| 87 | * needed at least for transceive mode |
| 88 | */ |
| 89 | static int add_opened_amp(AMP *amp) |
| 90 | { |
| 91 | struct opened_amp_l *p; |
| 92 | p = (struct opened_amp_l *)calloc(1, sizeof(struct opened_amp_l)); |
| 93 | |
| 94 | if (!p) |
| 95 | { |
| 96 | return -RIG_ENOMEM; |
| 97 | } |
| 98 | |
| 99 | p->amp = amp; |
| 100 | p->next = opened_amp_list; |
| 101 | opened_amp_list = p; |
| 102 | return RIG_OK; |
| 103 | } |
| 104 | |
| 105 | |
| 106 | static int remove_opened_amp(const AMP *amp) |