X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd-tg.c;h=71814a2955357a9a07df0390be43152c9e659060;hb=49ac868d2346c77335272b8a643bca295db9feaa;hp=9fec340214f4505cf96d9ab0d69fa3b1a800a81a;hpb=96e0f2341bace029acefe0a88bab96ae326c0ff5;p=collectd.git diff --git a/src/collectd-tg.c b/src/collectd-tg.c index 9fec3402..71814a29 100644 --- a/src/collectd-tg.c +++ b/src/collectd-tg.c @@ -1,19 +1,24 @@ /** - * collectd-td - collectd traffic generator + * collectd-tg - src/collectd-tg.c * Copyright (C) 2010-2012 Florian octo Forster * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; only version 2 of the License is applicable. + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * * Authors: * Florian Forster @@ -23,18 +28,6 @@ # include "config.h" #endif -#ifndef _ISOC99_SOURCE -# define _ISOC99_SOURCE -#endif - -#ifndef _POSIX_C_SOURCE -# define _POSIX_C_SOURCE 200809L -#endif - -#ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE 700 -#endif - #if !__GNUC__ # define __attribute__(x) /**/ #endif @@ -94,7 +87,7 @@ static void exit_usage (int exit_status) /* {{{ */ " -h Print usage information (this output).\n" "\n" "Copyright (C) 2010-2012 Florian Forster\n" - "Licensed under the GNU General Public License, version 2 (GPLv2)\n", + "Licensed under the MIT license.\n", DEF_NUM_VALUES, DEF_NUM_HOSTS, DEF_NUM_PLUGINS, DEF_INTERVAL, NET_DEFAULT_V6_ADDR, NET_DEFAULT_PORT); @@ -183,6 +176,7 @@ static lcc_value_list_t *create_value_list (void) /* {{{ */ strncpy (vl->identifier.type, (vl->values_types[0] == LCC_TYPE_GAUGE) ? "gauge" : "derive", sizeof (vl->identifier.type)); + vl->identifier.type[sizeof (vl->identifier.type) - 1] = 0; snprintf (vl->identifier.type_instance, sizeof (vl->identifier.type_instance), "ti%li", random ());