Branch: Tag:

2006-12-06

2006-12-06 15:57:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fix for infinite recursion in ProviderChoice.

Rev: server/etc/modules/Variable.pmod/module.pmod:1.96

1: - // $Id: module.pmod,v 1.95 2006/11/30 15:32:08 grubba Exp $ + // $Id: module.pmod,v 1.96 2006/12/06 15:57:35 grubba Exp $      #include <module.h>   #include <roxen.h>
1368:    RoxenModule query()    {    RoxenModule res = ::query(); -  if (!res && local_id) { +  if (!res) { +  if (local_id) {    // The module might have been reloaded.    // Try locating it again.    res = transform_from_form(local_id); -  low_set(res); +  } else { +  res = default_value();    } -  +  if (res || local_id) low_set(res); +  }    return res;    }   
1407:    // FIXME: Add sorting?    return providers[0];    } -  return 0; +  return UNDEFINED;    }    }