src/siri/db/series.c
/*
 * Returns 0 if successful or -1 in case or an error.
 * (a SIGNAL might be raised)
 */
Returns 0 if successful or -1 in case or an error.
(a SIGNAL might be raised)
Returns 0 if successful or - 1 in case or an error . ( a SIGNAL might be raised )
int siridb_series_load(siridb_t * siridb)
{
#ifdef DEBUG
    assert (siridb->server != NULL);
#endif
    log_info("Loading series");
    imap_t * dropped = imap_new();
    if (dropped == NULL)
    {
        return -1;
    }
    if (SERIES_read_dropped(siridb, dropped) ||
        SERIES_load(siridb, dropped))
    {
        imap_free(dropped, NULL);
        return -1;
    }
    imap_free(dropped, NULL);
    if (SERIES_update_max_id(siridb) ||
        SERIES_open_new_dropped_file(siridb) ||
        siridb_series_open_store(siridb))
    {
        return -1;
    }
    return 0;
}
int siridb_series_load ( siridb_t * siridb ) { #ifdef DEBUG assert ( siridb -> server != NULL ) ; #endif log_info ( " " ) ; imap_t * dropped = imap_new ( ) ; if ( dropped == NULL ) { return -1 ; } if ( SERIES_read_dropped ( siridb , dropped ) || SERIES_load ( siridb , dropped ) ) { imap_free ( dropped , NULL ) ; return -1 ; } imap_free ( dropped , NULL ) ; if ( SERIES_update_max_id ( siridb ) || SERIES_open_new_dropped_file ( siridb ) || siridb_series_open_store ( siridb ) ) { return -1 ; } return 0 ; }
Returns 0 if successful or -1 in case or an error.
Returns 0 if successful or - 1 in case or an error .
/* we must have a server because we need to know the pool id */