FreeCalypso > hg > ice1-trau-tester
comparison ater/tx_func.c @ 23:0d70444b5070
ater: more robust msgb handling in TRAU-UL output
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 24 Jun 2024 18:21:01 +0000 |
parents | 1e375472d5a5 |
children | 237687e2be6c |
comparison
equal
deleted
inserted
replaced
22:bacc590ec839 | 23:0d70444b5070 |
---|---|
46 } | 46 } |
47 msg = msgb_alloc_c(g_ctx, 640, "TRAU-UL-frame"); | 47 msg = msgb_alloc_c(g_ctx, 640, "TRAU-UL-frame"); |
48 if (!msg) | 48 if (!msg) |
49 return; | 49 return; |
50 len = osmo_trau_frame_encode(msg->tail, msgb_tailroom(msg), fr); | 50 len = osmo_trau_frame_encode(msg->tail, msgb_tailroom(msg), fr); |
51 if (len <= 0) { | |
52 msgb_free(msg); | |
53 return; | |
54 } | |
51 msgb_put(msg, len); | 55 msgb_put(msg, len); |
52 osmo_i460_mux_enqueue(at->schan, msg); | 56 osmo_i460_mux_enqueue(at->schan, msg); |
53 } | 57 } |
54 | 58 |
55 void transmit_e1_ts(void) | 59 void transmit_e1_ts(void) |