/[mailutils]/mailutils/imap4d/util.c
ViewVC logotype

Diff of /mailutils/imap4d/util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by gray, Sun Aug 4 08:15:00 2002 UTC revision 1.40 by gray, Mon Aug 5 08:12:11 2002 UTC
# Line 410  util_finish (struct imap4d_command *comm Line 410  util_finish (struct imap4d_command *comm
410    va_end (ap);    va_end (ap);
411    free (buf);    free (buf);
412    /* Reset the state.  */    /* Reset the state.  */
413    new_state = (rc == RESP_OK) ? command->success : command->failure;    if (rc == RESP_OK)
414        new_state = command->success;
415      else if (command->failure <= state)
416        new_state = command->failure;
417      else
418        new_state = STATE_NONE;
419      
420    if (new_state != STATE_NONE)    if (new_state != STATE_NONE)
421      state = new_state;      state = new_state;
422    return status;    return status;
# Line 553  util_do_command (char *prompt) Line 559  util_do_command (char *prompt)
559        nullcommand.tag = tag;        nullcommand.tag = tag;
560        return util_finish (&nullcommand, RESP_BAD,  "Invalid command");        return util_finish (&nullcommand, RESP_BAD,  "Invalid command");
561      }      }
562              
563    command->tag = tag;    command->tag = tag;
564    
565      if (command->states && (command->states & state) == 0)
566        return util_finish (command, RESP_BAD, "Wrong state");
567      
568    len = strlen (sp);    len = strlen (sp);
569    if (len  && sp[len - 1] == '\n')    if (len  && sp[len - 1] == '\n')
570      sp[len - 1] = '\0';      sp[len - 1] = '\0';

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26