[1440] in Moira

home help back first fref pref prev next nref lref last post

Re: moira client patch for default IMAP

daemon@ATHENA.MIT.EDU (Jonathon Weiss)
Tue Mar 14 01:36:11 2000

Message-Id: <200003140636.BAA00934@stratton-forty-eight.mit.edu>
From: Jonathon Weiss <jweiss@MIT.EDU>
To: Garry Zacheiss <zacheiss@MIT.EDU>
cc: moiradev@MIT.EDU
In-reply-to: Your message of "Mon, 13 Mar 2000 21:14:42 EST."
             <200003140214.VAA31761@alice-whacker.mit.edu> 
Date: Tue, 14 Mar 2000 01:36:08 EST


> --- 587,602 ----
>       }
>     Put_message("KERBEROS code not added, did not reserve name with kerberos.");
>     args[1] = login;
> !   
> !   Prompt_input("What type of P.O. Box for this user? ", temp_buf, BUFSIZ);
> !   potype = strdup(temp_buf);

This code should put a default value in potype and use
GetValueFromUser passing in a pointer to it, so the user gets a
reasonable default along with their question.


> !   if (strcmp(potype, "POP") && strcmp(potype, "IMAP"))
> !     {
> !       sprintf(temp_buf, "Unknown P.O. type.  Assuming IMAP.");
> !       Put_message(temp_buf);
> !       potype = strdup("IMAP");

I believe this is a memory leak.  I'm also tempted to say that the
request should fail if someone types OIO because their fingers are
shifted, rather than assuming they mean IMAP.


	Jonathon

home help back first fref pref prev next nref lref last post