int
event_store_recover(struct event_store *es)
{
- struct event_queue *eq_l = NULL, *eq_b, *eq_b_new;
+ struct event_queue *eq_l = NULL, *eq_b;
struct server_msg *msg;
char *event_s;
int fd, ret;
assert(es != NULL);
#if defined(IL_NOTIFICATIONS)
- eq_b = queue_list_get(es->dest);
+ /* destination queue has to be found for each message separately */
#else
/* find bookkepping server queue */
eq_b = queue_list_get(es->job_id_s);
}
#ifdef IL_NOTIFICATIONS
- eq_b_new = queue_list_get(msg->dest);
- if (eq_b_new != eq_b) {
- free(es->dest);
- es->dest = strdup(msg->dest);
- eq_b = eq_b_new;
- }
+ eq_b = queue_list_get(msg->dest);
#endif
/* now enqueue to the BS, if neccessary */
goto out;
}
-#if defined(IL_NOTIFICATIONS)
- es->dest = dest_name;
-#endif
-
if((es->last_committed_ls == 0) &&
(es->last_committed_bs == 0) &&
(es->offset == 0)) {
if(notifid_map_set_dest(msg->job_id_s, eq) < 0)
return(-1);
/* move all events with this notif_id from eq_known to eq */
- if(eq_known != NULL)
+ if(eq_known != NULL) {
event_queue_move_events(eq_known, eq, msg->job_id_s);
+ /* XXX - we should kill the old queue too */
+ }
}
#endif