[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 8b2a4ab: Query: small segmentation fault with

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 8b2a4ab: Query: small segmentation fault with no dataset and NED fixed
Date: Wed, 20 Jan 2021 20:21:32 -0500 (EST)

branch: master
commit 8b2a4ab91b05b8817b290fff75674aaa93ae9abc
Author: Mohammad Akhlaghi <>
Commit: Mohammad Akhlaghi <>

    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
--- a/bin/query/ned.c
+++ b/bin/query/ned.c
@@ -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 )
-    {
-      printf("\n\n");
-      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);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]