src/siri/db/servers.c
/*
 * Return a llist_t object containing all servers except 'this' server.
 *
 * Note: this function does not increase the servers reference counter.
 *
 * In case of an error, NULL is returned.
 */
Return a llist_t object containing all servers except 'this' server.
Note: this function does not increase the servers reference counter.

In case of an error, NULL is returned.
Return a llist_t object containing all servers except ' this ' server . Note : this function does not increase the servers reference counter . In case of an error NULL is returned .
slist_t * siridb_servers_other2slist(siridb_t * siridb)
{
    siridb_server_t * server;
    slist_t * servers = slist_new(siridb->servers->len - 1);
    if (servers == NULL)
    {
        return NULL;
    }
    for (   llist_node_t * node = siridb->servers->first;
            node != NULL;
            node = node->next)
    {
        server = node->data;
        if (server != siridb->server)
        {
            slist_append(servers, server);
        }
    }
    return servers;
}
slist_t * siridb_servers_other2slist ( siridb_t * siridb ) { siridb_server_t * server ; slist_t * servers = slist_new ( siridb -> servers -> len - 1 ) ; if ( servers == NULL ) { return NULL ; } for ( llist_node_t * node = siridb -> servers -> first ; node != NULL ; node = node -> next ) { server = node -> data ; if ( server != siridb -> server ) { slist_append ( servers , server ) ; } } return servers ; }
Return a llist_t object containing all servers except 'this' server.
Return a llist_t object containing all servers except ' this ' server .