X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fpolicer.c;h=21257ea153fc675d3a0a9b118934343dd261dfa4;hb=HEAD;hp=62b9253fae5b0f15526cfc8d2cc997f54c06bd6f;hpb=222e1b0003536cf7b47858961d4b56d45c6d6606;p=srvx.git diff --git a/src/policer.c b/src/policer.c index 62b9253..21257ea 100644 --- a/src/policer.c +++ b/src/policer.c @@ -1,11 +1,12 @@ /* policer.c - Leaky bucket * Copyright 2000-2002 srvx Development Team * - * This program is free software; you can redistribute it and/or modify + * This file is part of srvx. + * + * srvx 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; either version 2 of the License, or - * (at your option) any later version. Important limitations are - * listed in the COPYING file that accompanies this software. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,13 +14,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, email srvx-maintainers@srvx.net. + * along with srvx; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "common.h" #include "policer.h" -/* This policer uses the "leaky bucket" (GCRA) algorithm. */ +/* This policer uses the "leaky bucket" (GCRA) algorithm. */ struct policer_params { double bucket_size; @@ -39,11 +41,11 @@ int policer_params_set(struct policer_params *params, const char *param, const char *value) { if (!irccasecmp(param, "size")) { - params->bucket_size = strtod(value, NULL); + params->bucket_size = strtod(value, NULL); } else if (!irccasecmp(param, "drain-rate")) { - params->drain_rate = strtod(value, NULL); + params->drain_rate = strtod(value, NULL); } else { - return 0; + return 0; } return 1; }