[Evolution-hackers] Getting libebook working (1.4.5)



I have the following code:

// Initialize cables and ports and calcs and all
void initialize()
{
    char*   mythin = malloc(sizeof(int));
    if (initialized)
        return;

    g_type_init();
    book = e_book_new();
    char* localPath = g_strdup_printf (
            "file://%s/evolution/local/Contacts/addressbook.db", g_get_home_dir());
    e_book_load_uri(book, localPath, loaded_cb, mythin);

    g_free(localPath);

    initialized = 1;
    return;
}

when run, it gives the following error and segfaults:
 
** (process:13781): CRITICAL **: file bonobo-activation-activate.c: line 276 (bonobo_activation_query): assertion `ac != NULL' failed
Segmentation fault


The error goes away when I comment out the e_book_load_uri() call.
Any pointers?  Do I need to initialize something?  And does anyone know
what that last gpointer "closure" argument is to e_book_load_uri()?

Thanks,
John




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]