* iconv/gconv_db.c (gen_steps): Respect error return value from
init functions and abort.
1998-12-17 Ulrich Drepper <drepper@cygnus.com>
+ * iconv/gconv_db.c (gen_steps): Respect error return value from
+ init functions and abort.
+
* iconvdata/iso646.c: Recognize NF_Z_62-010_1973 as charset name.
1998-12-17 H.J. Lu <hjl@gnu.org>
{
int failed = 0;
+ status = GCONV_OK;
*nsteps = step_cnt;
current = best;
while (step_cnt-- > 0)
/* Call the init function. */
if (result[step_cnt].init_fct != NULL)
- _CALL_DL_FCT (result[step_cnt].init_fct, (&result[step_cnt]));
+ {
+ status = _CALL_DL_FCT (result[step_cnt].init_fct,
+ (&result[step_cnt]));
+
+ if (status != GCONV_OK)
+ {
+ failed = 1;
+ /* Make sure we unload this modules. */
+ --step_cnt;
+ break;
+ }
+ }
current = current->last;
}
free (result);
*nsteps = 0;
*handle = NULL;
- status = GCONV_NOCONV;
+ if (status == GCONV_OK)
+ status = GCONV_NOCONV;
}
else
- {
- *handle = result;
- status = GCONV_OK;
- }
+ *handle = result;
}
else
{