kopia lustrzana https://github.com/Hamlib/Hamlib
fix a potential seg fault on backend open failure, removed useless rot_get_position in open
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1357 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.4
rodzic
f6c7db3e03
commit
d1aa1f385b
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib Interface - main file
|
* Hamlib Interface - main file
|
||||||
* Copyright (c) 2000-2002 by Stephane Fillod and Frank Singleton
|
* Copyright (c) 2000-2002 by Stephane Fillod and Frank Singleton
|
||||||
*
|
*
|
||||||
* $Id: rotator.c,v 1.9 2002-11-28 22:33:48 fillods Exp $
|
* $Id: rotator.c,v 1.10 2003-01-29 23:00:56 fillods Exp $
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Library General Public License as
|
* it under the terms of the GNU Library General Public License as
|
||||||
|
@ -262,8 +262,6 @@ int rot_open(ROT *rot)
|
||||||
const struct rot_caps *caps;
|
const struct rot_caps *caps;
|
||||||
struct rot_state *rs;
|
struct rot_state *rs;
|
||||||
int status;
|
int status;
|
||||||
azimuth_t az;
|
|
||||||
elevation_t el;
|
|
||||||
|
|
||||||
rot_debug(RIG_DEBUG_VERBOSE,"rot:rot_open called \n");
|
rot_debug(RIG_DEBUG_VERBOSE,"rot:rot_open called \n");
|
||||||
|
|
||||||
|
@ -321,16 +319,10 @@ int rot_open(ROT *rot)
|
||||||
if (caps->rot_open != NULL) {
|
if (caps->rot_open != NULL) {
|
||||||
status = caps->rot_open(rot);
|
status = caps->rot_open(rot);
|
||||||
if (status != RIG_OK) {
|
if (status != RIG_OK) {
|
||||||
rot_close(rot);
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* trigger state->current_az/current_el first retrieval
|
|
||||||
*/
|
|
||||||
rot_get_position(rot, &az, &el);
|
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue