VERBOSE (simul, TRACE, PRINTF ("no morep found '%s'\n", line));
continue;
}
- VERBOSE (simul, DEBUG, PRINTF ("work with %c[%s]\n", comm->mode ? 'T' : 'R', serv->name));
+ VERBOSE (simul, DEBUG, PRINTF ("service %c:%s\n", comm->mode ? 'T' : 'R', serv->name));
/* skip space */
tmp = line + offset;
msg = m;
}
}
+ /* avoid null pointer */
+ if (msg == NULL) {
+ VERBOSE (simul, WARNING, PRINTF ("can't find msgtype %d for service %s\n", msgtype, serv->name));
+ continue;
+ }
+
}
/* check message and service */
VERBOSE (simul, WARNING, PRINTF ("message %s is not allowed for service %s (line '%s')\n", msg->name, serv->name, line));
continue;
}
- VERBOSE (simul, DEBUG, PRINTF ("work with message %s\n", msg->name));
+ VERBOSE (simul, DEBUG, PRINTF ("message %s\n", msg->name));
CHANNEL_t pdu_channel = {0};
CLEAR_DATA_t pdu_clear_data = {0};
}
/* check msg type */
if (msg == NULL) {
- VERBOSE (simul, WARNING, PRINTF ("R:%s[%s] [SEQ=%d MSG=%d LEN=%d PDU=%d] message type is not allowed for this service\n", serv->name, comm->etype, seqnum, msg->msgtype, len, pdu));
+ VERBOSE (simul, WARNING, PRINTF ("R:%s[%s] [SEQ=%d MSG=%d LEN=%d PDU=%d] message type is not allowed for this service\n", serv->name, comm->etype, seqnum, msgtype, len, pdu));
continue;
}
if (exp_msg->msgtype != msg->msgtype) {