-/* $Id: zebraapi.c,v 1.120.2.5 2005-05-06 18:59:23 adam Exp $
+/* $Id: zebraapi.c,v 1.120.2.6 2005-05-12 10:01:54 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
xfree (zh->user_perm);
zh->user_perm = xstrdup(p ? p : "r");
+ yaz_log(LOG_LOG, "User perm for %s: %s", u, zh->user_perm);
+
/* users that don't require a password .. */
if (zh->user_perm && strchr(zh->user_perm, 'a'))
return 0;
-/* $Id: zserver.c,v 1.117.2.2 2005-01-16 23:13:29 adam Exp $
+/* $Id: zserver.c,v 1.117.2.3 2005-05-12 10:01:54 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
Index Data Aps
Z_IUUpdateEsRequest *esRequest = up->u.esRequest;
Z_IUOriginPartToKeep *toKeep = esRequest->toKeep;
Z_IUSuppliedRecords *notToKeep = esRequest->notToKeep;
+ int res;
yaz_log (LOG_LOG, "action");
if (toKeep->action)
rr->errstring = "database";
return 0;
}
- if (notToKeep)
+ res = zebra_begin_trans (zh, 1);
+ if (res)
+ zebra_result(zh, &rr->errcode, &rr->errstring);
+ else
{
int i;
- zebra_begin_trans (zh, 1);
- for (i = 0; i < notToKeep->num; i++)
+ for (i = 0; notToKeep && i < notToKeep->num; i++)
{
Z_External *rec = notToKeep->elements[i]->record;
struct oident *oident = 0;
}
}
}
- zebra_end_trans (zh);
+ zebra_end_trans (zh);
}
}
}