crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs

stringtostate.c (571B)


      1 /*************************************************************************
      2  * This file is part of Crosroads 1.23, a load balancer and fail over
      3  * utility for TCP. Copyright (c) Karel Kubat, distributed under GPL.
      4  * Visit http://crossroads.e-tunity.com for information.
      5  *************************************************************************/
      6 #include "crossroads.h"
      7 
      8 Backendavail string_to_state (char const *str) {
      9     int i;
     10 
     11     for (i = 0; state_to_string_map[i]; i++)
     12 	if (!strcasecmp (str, state_to_string_map[i]))
     13 	    return (i);
     14     return (st_unknown);
     15 }