/[anubis]/anubis/src/tunnel.c
ViewVC logotype

Diff of /anubis/src/tunnel.c

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

revision 1.22 by gray, Sat Jul 26 07:41:08 2003 UTC revision 1.23 by gray, Fri Nov 21 01:23:39 2003 UTC
# Line 276  send_body(MESSAGE *msg, void *sd_server) Line 276  send_body(MESSAGE *msg, void *sd_server)
276  *******************/  *******************/
277    
278  void  void
279  smtp_session()  smtp_session_transparent()
280  {  {
281          char command[LINEBUFFER+1];          char command[LINEBUFFER+1];
282          MESSAGE msg;          MESSAGE msg;
# Line 318  smtp_session() Line 318  smtp_session()
318    
319          message_init(&msg);          message_init(&msg);
320          while (recvline(SERVER, remote_client, command, sizeof(command) - 1)) {          while (recvline(SERVER, remote_client, command, sizeof(command) - 1)) {
321                    if (process_command(&msg, command))
322                            continue;
323    
324                    if (topt & T_ERROR)
325                            break;
326                    
327                    if (transfer_command(&msg, command) == 0)
328                            break;
329            }
330    
331            message_free(&msg);
332            return;
333    }
334    
335    void
336    smtp_begin ()
337    {
338            char command[LINEBUFFER+1];
339    
340            get_response_smtp(CLIENT, remote_server, command, sizeof(command) - 1);
341            snprintf(command, sizeof command, "EHLO %s" CRLF, get_localdomain());
342            swrite(CLIENT, remote_server, command);
343            /* FIXME: Eventually start TLS and/or authenticate to the
344               remote */
345            get_response_smtp(CLIENT, remote_server, command, sizeof(command) - 1);
346    }
347    
348    void
349    smtp_session()
350    {
351            char command[LINEBUFFER+1];
352            MESSAGE msg;
353    
354            info(VERBOSE, _("Starting SMTP session..."));
355            smtp_begin ();
356            info(VERBOSE, _("Transferring message(s)..."));
357    
358            message_init(&msg);
359            while (recvline(SERVER, remote_client, command, sizeof(command) - 1)) {
360                  if (process_command(&msg, command))                  if (process_command(&msg, command))
361                          continue;                          continue;
362    

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

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