Some functions in std.c were using
const char *prefix = sdi->driver->name;
but were called from input/output modules as well (which don't have
a "driver" field).
As a temporary workaround, use "unknown" as prefix in such cases until
a more permanent solution is implemented.
This fixes bug #813.
*/
SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi)
{
- const char *prefix = sdi->driver->name;
+ const char *prefix = (sdi->driver) ? sdi->driver->name : "unknown";
int ret;
struct sr_datafeed_packet packet;
struct sr_datafeed_header header;
*/
SR_PRIV int std_session_send_df_end(const struct sr_dev_inst *sdi)
{
- const char *prefix = sdi->driver->name;
+ const char *prefix = (sdi->driver) ? sdi->driver->name : "unknown";
int ret;
struct sr_datafeed_packet packet;