X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/fe1de0d5fc9c60a74409f5095eeec1c2f14b7e77..31422b15ec8e775718ab1d5e08acfba7e04fb1a9:/uip/forwsbr.c diff --git a/uip/forwsbr.c b/uip/forwsbr.c index 87006620..cf043c40 100644 --- a/uip/forwsbr.c +++ b/uip/forwsbr.c @@ -54,6 +54,7 @@ build_form (char *form, char *digest, int *dat, char *from, char *to, register struct comp *cptr; struct format *fmt; char *cp = NULL; + m_getfld_state_t gstate = 0; /* * Open the message we'll be scanning for components @@ -86,9 +87,9 @@ build_form (char *form, char *digest, int *dat, char *from, char *to, * these routines? */ - for (state = FLD;;) { + for (;;) { int msg_count = sizeof msgbuf; - state = m_getfld(state, name, msgbuf, &msg_count, tmp); + state = m_getfld (&gstate, name, msgbuf, &msg_count, tmp); switch (state) { case FLD: case FLDPLUS: @@ -102,13 +103,14 @@ build_form (char *form, char *digest, int *dat, char *from, char *to, if (i != -1) { while (state == FLDPLUS) { msg_count = sizeof msgbuf; - state = m_getfld(state, name, msgbuf, &msg_count, tmp); + state = m_getfld (&gstate, name, msgbuf, &msg_count, tmp); fmt_appendcomp(i, name, msgbuf); } } - while (state == FLDPLUS) + while (state == FLDPLUS) { msg_count = sizeof msgbuf; - state = m_getfld(state, name, msgbuf, &msg_count, tmp); + state = m_getfld (&gstate, name, msgbuf, &msg_count, tmp); + } break; case LENERR: @@ -121,6 +123,7 @@ build_form (char *form, char *digest, int *dat, char *from, char *to, adios(NULL, "m_getfld() returned %d", state); } } + m_getfld_state_destroy (&gstate); /* * Override any components just in case they were included in the