NS2: rework handling of unknown primitive
Use prim_str() method to get the human readable string.
Define unhandled events with a nop in the switch()
Depends-on: Ibf610fbd929dddc4a4e235152447caff522d4eb2 (libosmocore)
Change-Id: I50188afb83ac142e22d4bda4e8050eb4de962e70
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index cb47998..934d8fc 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -574,11 +574,13 @@
the_pcu.bvc_unblocked = 0;
}
break;
+ case NS_AFF_CAUSE_SNS_FAILURE:
+ break;
default:
- LOGP(DPCU, LOGL_NOTICE,
- "NS: %s Unknown prim %d from NS\n",
+ LOGP(DPCU, LOGL_DEBUG,
+ "NS: %s Unknown affecting cause %s / %d from NS\n",
get_value_string(osmo_prim_op_names, nsp->oph.operation),
- nsp->oph.primitive);
+ gprs_ns2_aff_cause_prim_str(nsp->u.status.cause), nsp->u.status.cause);
break;
}
}
@@ -613,11 +615,13 @@
case PRIM_NS_STATUS:
gprs_ns_prim_status_cb(nsp);
break;
+ case PRIM_NS_CONGESTION:
+ break;
default:
- LOGP(DPCU, LOGL_NOTICE,
- "NS: %s Unknown prim %d from NS\n",
+ LOGP(DPCU, LOGL_DEBUG,
+ "NS: %s Unknown prim %s / %d from NS\n",
get_value_string(osmo_prim_op_names, oph->operation),
- oph->primitive);
+ gprs_ns2_prim_str((gprs_ns2_prim) oph->primitive), oph->primitive);
break;
}