@ -90,8 +90,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
# ifdef IMAP_STORAGE
AST_MUTEX_DEFINE_STATIC ( curhstusr_lock ) ;
static char * curhst = NI L; /* currently connected host */
static char * curusr = NI L; /* current login user */
static char * curhst = NUL L; /* currently connected host */
static char * curusr = NUL L; /* current login user */
static char temp [ 1024 ] ;
@ -8178,7 +8178,6 @@ void mm_dlog(char *string)
void mm_login ( NETMBX * mb , char * user , char * pwd , long trial )
{
char tmp [ MAILTMPLEN ] ;
if ( option_debug > 3 )
ast_log ( LOG_DEBUG , " Entering callback mm_login \n " ) ;
ast_mutex_lock ( & curhstusr_lock ) ;
@ -8186,22 +8185,13 @@ void mm_login(NETMBX * mb, char *user, char *pwd, long trial)
fs_give ( ( void * * ) & curhst ) ;
curhst = ( char * ) fs_get ( 1 + strlen ( mb - > host ) ) ;
strcpy ( curhst , mb - > host ) ;
if ( * mb - > user ) {
strcpy ( user , mb - > user ) ;
sprintf ( tmp , " {%s/%s/user= \" %s \" } password: " , mb - > host , mb - > service , mb - > user ) ;
} else {
/* strcpy (tmp, "Password for jar: ");*/
strcpy ( user , curusr ) ;
}
if ( curusr )
strcpy ( user , S_OR ( mb - > user , curusr ) ) ;
fs_give ( ( void * * ) & curusr ) ;
ast_mutex_unlock ( & curhstusr_lock ) ;
/* strcpy (pwd, getpass (tmp));*/
/* We should only do this when necessary */
if ( strlen( authpassword ) > 0 ) {
if ( ! ast_strlen_zero ( authpassword ) )
strcpy ( pwd , authpassword ) ;
}
}
void mm_critical ( MAILSTREAM * stream )