## Error Callback

Error Added Callback — Defining an Error Callback

## Error Callback

The "error" callback handles errors which might occur while executing the libdmapsharing mainloop. The parameters are a DmapConnection, GError, and pointer to user data.

The following is a simple "error" callback:

    static void
    error_cb(DmapConnection *connection, GError *error, gpointer user_data)
    {
    	fprintf(stderr, "%s\n", error->message);
    }