src/siri/db/series.c
/*
 * Calculate the server id.
 * Returns 0 or 1, representing a server in a pool)
 */
Calculate the server id.
Returns 0 or 1, representing a server in a pool)
Calculate the server id . Returns 0 or 1 representing a server in a pool )
uint8_t siridb_series_server_id_by_name(const char * name)
{
    uint32_t n;
    for (n = 0; *name; name++)
    {
        n += *name;
    }
   return (uint8_t) ((n / 11) % 2);
}
uint8_t siridb_series_server_id_by_name ( const char * name ) { uint32_t n ; for ( n = 0 ; * name ; name ++ ) { n += * name ; } return ( uint8_t ) ( ( n / 11 ) % 2 ) ; }
Calculate the server id.
Calculate the server id .
/* get sum series name to calculate series mask (for sharding) */