}
int send_and_free_mncc(void *instance, unsigned int msg_type, void *data)
{
- int ret;
+ int ret = 0;
+ if (instance) {
#ifdef WITH_GSM_BS
- ret = mncc_send((struct gsm_network *)instance, msg_type, data);
+ ret = mncc_send((struct gsm_network *)instance, msg_type, data);
#endif
#ifdef WITH_GSM_MS
- ret = mncc_send((struct osmocom_ms *)instance, msg_type, data);
+ ret = mncc_send((struct osmocom_ms *)instance, msg_type, data);
#endif
+ }
free(data);
return ret;
if (port) {
switch(port->p_type) {
case PORT_TYPE_GSM_BS_OUT:
- SCAT(msgtext, " LCR->BSC");
- break;
case PORT_TYPE_GSM_BS_IN:
- SCAT(msgtext, " LCR<-BSC");
+ SCAT(msgtext, " LCR<->BSC");
break;
case PORT_TYPE_GSM_MS_OUT:
- SCAT(msgtext, " LCR->MS");
- break;
case PORT_TYPE_GSM_MS_IN:
- SCAT(msgtext, " LCR<-MS");
+ SCAT(msgtext, " LCR<->MS");
break;
}
} else