-/* $Id: http.c,v 1.40 2007-09-26 09:09:15 adam Exp $
+/* $Id: http.c,v 1.41 2007-10-02 12:11:14 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
struct http_channel_observer_s {
void *data;
- void (*destroy)(void *data, struct http_channel *chan);
+ void *data2;
+ http_channel_destroy_t destroy;
struct http_channel_observer_s *next;
struct http_channel *chan;
};
http_channel_observer_t p = c->observers;
while (p)
{
- p->destroy(p->data, c);
+ p->destroy(p->data, c, p->data2);
p = p->next;
}
}
http_channel_observer_t obs = xmalloc(sizeof(*obs));
obs->chan = c;
obs->data = data;
+ obs->data2 = 0;
obs->destroy= des;
obs->next = c->observers;
c->observers = obs;
return obs->chan;
}
+void http_observer_set_data2(http_channel_observer_t obs, void *data2)
+{
+ obs->data2 = data2;
+}
+
+
/*
* Local variables:
* c-basic-offset: 4