if (socket_write( &imap->buf.sock, buf, bufl ) != bufl) {
free( cmd->cmd );
free( cmd );
- if (cb && cb->data)
+ if (cb)
free( cb->data );
return NULL;
}
normal:
if (cmdp->cb.done)
cmdp->cb.done( ctx, cmdp, resp );
- if (cmdp->cb.data)
- free( cmdp->cb.data );
+ free( cmdp->cb.data );
free( cmdp->cmd );
free( cmdp );
if (!tcmd || tcmd == cmdp)
if (strncmp( key, imap_key, sizeof imap_key - 1 ))
return 0;
+
+ if (!val)
+ return config_error_nonbool(key);
+
key += sizeof imap_key - 1;
if (!strcmp( "folder", key )) {
fprintf( stderr, "no imap store specified\n" );
return 1;
}
+ if (!server.host) {
+ if (!server.tunnel) {
+ fprintf( stderr, "no imap host specified\n" );
+ return 1;
+ }
+ server.host = "tunnel";
+ }
/* read the messages */
if (!read_message( stdin, &all_msgs )) {