sync_client and seenptr

Rudy Gevaert Rudy.Gevaert at UGent.be
Fri Apr 22 03:15:26 EDT 2011


Hi Antonia, please check the devel list :)

On 04/22/2011 07:08 AM, Antonio wrote:
> hi all,
>
> sometimes the sync_client die with the message that a assert failed ...
> I've seen that seen_open() in seen_db.c returns a code != 0 if
> something failed, and the sync_client simply ignore and return 0 in this case ...
>
> is necessary the assert check into the code or can i comment out it ?
>
> [CODE]
> sync_client.c
>
> static int do_seen(char *user, char *uniqueid)
> {
>      int r = 0;
>      struct seen *seendb;
>      struct seendata sd;
>
>      /* ignore read failures */
>      r = seen_open(user, SEEN_SILENT,&seendb);
>      if (r) return 0;
> ...
>
> seen_db.c
>
> int seen_open(const char *user,
>      int flags,
>      struct seen **seendbptr)
> {
>      struct seen *seendb = NULL;
>      char *fname = NULL;
>      int dbflags = (flags&  SEEN_CREATE) ? CYRUSDB_CREATE : 0;
>      int r;
>
>      assert(user);
>      assert(*seendbptr == NULL);
> [/CODE]
>
> tanks in advance
>



More information about the Info-cyrus mailing list