From: gregor herrmann Date: Thu, 31 Dec 2009 01:53:27 +0000 (+0100) Subject: Die if no host is provided. X-Git-Url: https://git.toastfreeware.priv.at/gregoa/bti.git/commitdiff_plain/b142c320fa2abb0fc728a12028c874a7d1b0dd78?ds=sidebyside Die if no host is provided. Exit with an error message if no host is provided via the config or on the command line instead of running into a curl error. Adjust the manpage which said that host defaults to twitter. Bug reported at http://bugs.debian.org/563098 --- diff --git a/bti.c b/bti.c index 1f1279e..8447a9d 100644 --- a/bti.c +++ b/bti.c @@ -1127,6 +1127,11 @@ int main(int argc, char *argv[], char *envp[]) goto exit; } + if (!session->host) { + fprintf(stderr, "You need to provide a host either in ~/.bti or with --host.\n"); + goto exit; + } + if (session->host == HOST_TWITTER && session->action == ACTION_GROUP) { fprintf(stderr, "Groups only work in Identi.ca.\n"); goto exit; diff --git a/bti.xml b/bti.xml index 251f476..020c48c 100644 --- a/bti.xml +++ b/bti.xml @@ -100,9 +100,6 @@ you should specify the API URI. For example identi.ca's URI is: https://identi.ca/api/statuses - - If no host is specified, the default is to send to twitter.com. -