Matthew T. O'Connor wrote:
> Matthew T. O'Connor wrote:
>> It appears that this block of code is the problem:
>>
>>        /* delete each message */
>>        for (i = 0; i < *affected_rows; i++) {
>>                message_id = db_get_result_u64(i, 0);
>>                if (db_delete_message(message_id) == -1) {
>>                        trace(TRACE_ERROR, "%s,%s: error deleting
>> message",
>>                              __FILE__, __func__);
>>                        db_free_result();
>>                        return DM_EQUERY;
>>                }
>>        }
>>
>> The symptom is that after the first loop, db_get_result_u64 is
>> returning 0 for a message_id, however, I'm not able to diagnose why. 
> 
> After a little more digging, it appears that what is happening is that
> the global variable res is getting over written, it's available the
> first time the above loop tries to get the message_id, but then after
> the delete query is issued by db_delete_message, then the global res has
> been overwritten.  Does this sound right?  If there is only one global
> result set, how do we work around this?  And why are we using globals at
> all?

My mistake. I have been working to get rid of those annoying globals,
but that's beside the point here.

The problem you ran into here is the result of a misguided attempt to
fix an OOM bug I ran into last friday.

Will fix asap.



-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl

Reply via email to