diff --git a/Segfault-award b/Segfault-award index fc75cac5f..d29286fe5 100644 --- a/Segfault-award +++ b/Segfault-award @@ -1,7 +1,15 @@ -This is the "Hamlib Segfault Honor Roll". +This is the "Hamlib Segfault Honor Roll". hi. + +The distinctive HSHR is granted to people who were able to make Hamlib +issue segmentation faults (Bus errors and alike are valid too). +The HSHR can only be claimed on identified releases. +A developer cannot apply for HSHR for segfaul on his/her own code. -The distinctive HSHR is granted to people that were able to segfault Hamlib. Here is the list of the brave fellows: * David Kjellquist WB5NHL, v1.1.3, 09/2002, kenwood/ts570.c caught on TS570D backend startup. + +* Chuck Hemker N2POR, v1.1.3, 09/2002, src/event.c + when using rig_set_trn() and receiving a SIGIO, + and having a second non serial rig open. diff --git a/src/event.c b/src/event.c index 35c3579dd..0d21577db 100644 --- a/src/event.c +++ b/src/event.c @@ -2,7 +2,7 @@ * Hamlib Interface - event handling * Copyright (c) 2000-2002 by Stephane Fillod and Frank Singleton * - * $Id: event.c,v 1.12 2002-09-08 22:30:09 fillods Exp $ + * $Id: event.c,v 1.13 2002-09-29 19:40:56 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -120,7 +120,7 @@ int remove_trn_rig(RIG *rig) * to find out which rig generated this event, * and decode/process it. * - * assumes rig!=NULL, rig->state.rigport.fd>=0 + * assumes rig!=NULL */ static int search_rig_and_decode(RIG *rig, rig_ptr_t data) { @@ -128,6 +128,14 @@ static int search_rig_and_decode(RIG *rig, rig_ptr_t data) struct timeval tv; int retval; + /* + * so far, only file oriented ports have event reporting support + */ + if (rig->state.rigport.type != RIG_PORT_SERIAL || + rig->state.rigport.fd == -1) + return -1; + + /* FIXME: siginfo is not portable, however use it where available */ #if 0&&defined(HAVE_SIGINFO_T) siginfo_t *si = (siginfo_t*)data;