[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 8b2a4ab: Query: small segmentation fault with
[gnuastro-commits] master 8b2a4ab: Query: small segmentation fault with no dataset and NED fixed
Wed, 20 Jan 2021 20:21:32 -0500 (EST)
Author: Mohammad Akhlaghi <firstname.lastname@example.org>
Commit: Mohammad Akhlaghi <email@example.com>
Query: small segmentation fault with no dataset and NED fixed
Until now, when NED was queried without any dataset, 'astrquery' would
crash! This was because I was assuming that a dataset always exists.
With this commit, it is corrected by first checking if a dataset is set at
all or not, then checking its value.
bin/query/ned.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/bin/query/ned.c b/bin/query/ned.c
index 9feb4f0..f2fd24f 100644
@@ -53,14 +53,14 @@ ned_sanity_checks(struct queryparams *p)
/* Currently NED only has a single table for TAP access, so warn the
users about this if they ask for any other table. */
- if( strcmp(p->datasetstr, "NEDTAP.objdir") && p->cp.quiet==0 )
- error(EXIT_FAILURE, 0, "WARNING: NED currently only supports "
- "a single dataset called 'NEDTAP.objdir' (which you can "
- "also call in Query with 'objdir'). TAP access to more "
- "tables will be provided in the future");
+ if( p->datasetstr==NULL || strcmp(p->datasetstr, "NEDTAP.objdir") )
+ error(EXIT_FAILURE, 0, "NED currently only supports a single "
+ "dataset with the TAP protocol called 'NEDTAP.objdir' "
+ "(which you can also call in Query with '--dataset=objdir'). "
+ "TAP access to more datasets/tables will be provided in "
+ "the future. To see all the column information and select "
+ "the columns you want for your work, please run this command:\n\n"
+ " astquery %s --dataset=objdir --info", p->databasestr);
|[Prev in Thread]
||[Next in Thread]|
- [gnuastro-commits] master 8b2a4ab: Query: small segmentation fault with no dataset and NED fixed,
Mohammad Akhlaghi <=