diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-19 20:33:37 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-07-19 20:33:37 +0200 |
commit | d40d4d6071eaffb16794fc88354939ff0b3dd973 (patch) | |
tree | ac079c21414abdceb0a150b5f043f710e33910d5 /src/osmo-bts-sysmo/l1_if.c | |
parent | 08fce19cfce84432fbf8293318486a96437a3427 (diff) |
Allow L1 forward proxy to provide all 4 queues to seperate applications
Different applications can now connect to L1 forward proxy or access DSP
directly, if they use different message queues.
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 51d410bf..b219c41d 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -821,7 +821,7 @@ static int l1if_handle_ind(struct femtol1_hdl *fl1, struct msgb *msg) return rc; } -int l1if_handle_l1prim(struct femtol1_hdl *fl1h, struct msgb *msg) +int l1if_handle_l1prim(int wq, struct femtol1_hdl *fl1h, struct msgb *msg) { GsmL1_Prim_t *l1p = msgb_l1prim(msg); struct wait_l1_conf *wlc; @@ -832,8 +832,8 @@ int l1if_handle_l1prim(struct femtol1_hdl *fl1h, struct msgb *msg) /* silent, don't clog the log file */ break; default: - LOGP(DL1P, LOGL_DEBUG, "Rx L1 prim %s\n", - get_value_string(femtobts_l1prim_names, l1p->id)); + LOGP(DL1P, LOGL_DEBUG, "Rx L1 prim %s on queue %d\n", + get_value_string(femtobts_l1prim_names, l1p->id), wq); } /* check if this is a resposne to a sync-waiting request */ @@ -1140,12 +1140,19 @@ struct femtol1_hdl *l1if_open(void *priv) /* default clock source: OCXO */ fl1h->clk_src = SuperFemto_ClkSrcId_Ocxo; - rc = l1if_transport_open(fl1h); + rc = l1if_transport_open(MQ_SYS_WRITE, fl1h); if (rc < 0) { talloc_free(fl1h); return NULL; } + rc = l1if_transport_open(MQ_L1_WRITE, fl1h); + if (rc < 0) { + l1if_transport_close(MQ_SYS_WRITE, fl1h); + talloc_free(fl1h); + return NULL; + } + fl1h->gsmtap = gsmtap_source_init("localhost", GSMTAP_UDP_PORT, 1); if (fl1h->gsmtap) gsmtap_source_add_sink(fl1h->gsmtap); @@ -1155,5 +1162,7 @@ struct femtol1_hdl *l1if_open(void *priv) int l1if_close(struct femtol1_hdl *fl1h) { - return l1if_transport_close(fl1h); + l1if_transport_close(MQ_L1_WRITE, fl1h); + l1if_transport_close(MQ_SYS_WRITE, fl1h); + return 0; } |