-static void queuelike_completed(void *v, struct queue_entry *q) {
- struct callbackdata *cbd = v;
- struct queuelike *ql = cbd->u.ql;
-
- D(("queuelike_complete"));
- /* Install the new queue */
- update_queue(ql, ql->fixup ? ql->fixup(q) : q);
- /* Update the display */
- redisplay_queue(ql);
- if(ql->notify)
- ql->notify();
- /* Update sensitivity of main menu items */
- menu_update(-1);
+static void queuelike_completed(void *v,
+ const char *error,
+ struct queue_entry *q) {
+ if(error)
+ popup_protocol_error(0, error);
+ else {
+ struct queuelike *const ql = v;
+
+ D(("queuelike_complete"));
+ /* Install the new queue */
+ update_queue(ql, ql->fixup ? ql->fixup(q) : q);
+ /* Update the display */
+ redisplay_queue(ql);
+ if(ql->notify)
+ ql->notify();
+ /* Update sensitivity of main menu items */
+ menu_update(-1);
+ }