diff --git a/kenwood/kenwood.c b/kenwood/kenwood.c index db2b2a285..62fbc6e20 100644 --- a/kenwood/kenwood.c +++ b/kenwood/kenwood.c @@ -2,7 +2,7 @@ * Hamlib Kenwood backend - main file * Copyright (c) 2000-2004 by Stephane Fillod and others * - * $Id: kenwood.c,v 1.80 2004-12-20 22:58:19 jrinas Exp $ + * $Id: kenwood.c,v 1.81 2004-12-27 12:53:01 f4dwv 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 @@ -188,8 +188,8 @@ transaction_read: /* Command recognised by rig but invalid data entered. */ if (strlen(data) == 2 && data[0] == 'N') { - rig_debug(RIG_DEBUG_ERR, "%s: NegAck for '%s'\n", __FUNCTION__, cmdstr); - retval = -RIG_ERJCTED; + rig_debug(RIG_DEBUG_VERBOSE, "%s: NegAck for '%s'\n", __FUNCTION__, cmdstr); + retval = -RIG_ENAVAIL; goto transaction_quit; } diff --git a/tests/memcsv.c b/tests/memcsv.c index 789a00c6a..7402caf4d 100644 --- a/tests/memcsv.c +++ b/tests/memcsv.c @@ -4,7 +4,7 @@ * This program exercises the backup and restore of a radio * using Hamlib. CSV primitives * - * $Id: memcsv.c,v 1.4 2004-05-17 21:09:45 fillods Exp $ + * $Id: memcsv.c,v 1.5 2004-12-27 12:53:02 f4dwv Exp $ * * * This program is free software; you can redistribute it and/or @@ -81,6 +81,11 @@ int csv_save (RIG *rig, const char *outfilename) chan.channel_num = j; status=rig_get_channel(rig, &chan); + if (status == -RIG_ENAVAIL ) { + /* empty channel */ + return RIG_OK; + } + if (status != RIG_OK ) { printf("rig_get_channel: error = %s \n", rigerror(status)); return status; @@ -313,7 +318,7 @@ void dump_csv_chan(const channel_cap_t *mem_caps, const channel_t *chan, FILE *f fprintf(f, "%s;", rig_strptrshift(chan->rptr_shift)); } if (mem_caps->rptr_offs) { - fprintf(f,"%d",(int)chan->rptr_offs); + fprintf(f,"%d;",(int)chan->rptr_offs); } if (mem_caps->tuning_step) { fprintf(f,"%d;",(int)chan->tuning_step); diff --git a/tests/memsave.c b/tests/memsave.c index 68b16129b..0bfaee575 100644 --- a/tests/memsave.c +++ b/tests/memsave.c @@ -2,7 +2,7 @@ * memsave.c - Copyright (C) 2003-2004 Thierry Leconte * * - * $Id: memsave.c,v 1.6 2004-12-22 16:03:19 f4dwv Exp $ + * $Id: memsave.c,v 1.7 2004-12-27 12:53:02 f4dwv Exp $ * * * This program is free software; you can redistribute it and/or @@ -93,6 +93,11 @@ int dump_xml_chan(RIG *rig, xmlNodePtr root, int i, int chan_num) chan.channel_num = chan_num; status=rig_get_channel(rig, &chan); + if (status == -RIG_ENAVAIL ) { + /* empty channel */ + return RIG_OK; + } + if (status != RIG_OK ) { printf("rig_get_channel: error = %s \n", rigerror(status)); return status;