src/siri/db/servers.c
/*
 * Returns the numbers of servers with a version less than the given version.
 * If all servers are at least running the given version 0 is returned.
 *
 * Note: *this* server is not checked and is expected to have at least the
 *       required version.
 */
Returns the numbers of servers with a version less than the given version.
If all servers are at least running the given version 0 is returned.

*this* server is not checked and is expected to have at least the
required version.
Returns the numbers of servers with a version less than the given version . If all servers are at least running the given version 0 is returned . * this * server is not checked and is expected to have at least the required version .
int siridb_servers_check_version(siridb_t * siridb, char * version)
{
    siridb_server_t * server;
    int n = 0;
    for (   llist_node_t * node = siridb->servers->first;
            node != NULL;
            node = node->next)
    {
        server = (siridb_server_t *) node->data;
        if (server != siridb->server)
        {
            n += (server->version == NULL ||
                  siri_version_cmp(server->version, version) < 0) ? 1 : 0;
        }
    }
    return n;
}
int siridb_servers_check_version ( siridb_t * siridb , char * version ) { siridb_server_t * server ; int n = 0 ; for ( llist_node_t * node = siridb -> servers -> first ; node != NULL ; node = node -> next ) { server = ( siridb_server_t * ) node -> data ; if ( server != siridb -> server ) { n += ( server -> version == NULL || siri_version_cmp ( server -> version , version ) < 0 ) ? 1 : 0 ; } } return n ; }
Returns the numbers of servers with a version less than the given version.
Returns the numbers of servers with a version less than the given version .