> On 12 Oct 2015, at 11:57, Neels Hofmeyr <[email protected]> wrote:
Dear Neels,
> diff --git a/openbsc/src/gprs/gprs_gsup_client.c
> b/openbsc/src/gprs/gprs_gsup_client.c
> index 1f9e34c..a332fa7 100644
> --- a/openbsc/src/gprs/gprs_gsup_client.c
> +++ b/openbsc/src/gprs/gprs_gsup_client.c
>
> static int gsup_client_read_cb(struct ipa_client_conn *link, struct msgb *msg)
> {
>
> - OSMO_ASSERT(gsupc->read_cb != NULL);
> - gsupc->read_cb(gsupc, msg);
> + if (he->proto == IPAC_PROTO_EXT_GSUP) {
> + OSMO_ASSERT(gsupc->read_cb != NULL);
> + gsupc->read_cb(gsupc, msg);
> + /* expecting read_cb() to free msg */
> + }
> + else
> + if (he->proto == IPAC_PROTO_EXT_OAP) {
> + return gsup_client_oap_handle(gsupc, msg);
> + /* gsup_client_oap_handle frees msg */
> + }
> + else
> + goto invalid;
the coding style would not have else and if on two different lines. I will fix
this myself
right now.
cheers
holger