gnats-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to gnats/gnats/client.c


From: Yngve Svendsen
Subject: Changes to gnats/gnats/client.c
Date: Fri, 08 Nov 2002 14:38:35 -0500

Index: gnats/gnats/client.c
diff -c gnats/gnats/client.c:1.44 gnats/gnats/client.c:1.45
*** gnats/gnats/client.c:1.44   Thu Oct 31 18:43:27 2002
--- gnats/gnats/client.c        Fri Nov  8 14:38:34 2002
***************
*** 1260,1285 ****
        cmd = "REPL";
      }
    fprintf (serv_write, "%s %s %s\r\n", cmd, prnum, fieldname);
!   /* Have to send the field-change reason here. */
!   reply = get_reply (stdout);
!   if (reply == CODE_SEND_CHANGE_REASON)
!     {
!       if (reason)
!       fprintf (serv_write, "%s\r\n.\r\n", reason);
!       else
!       {
!         fprintf (stderr, "%s: server wants a change-reason for %s,"
!                  " but none was supplied.\n", program_name, fieldname);
          safe_exit ();
!       }
!     }
!   while ((line = read_line (fp, NULL)) != NULL)
!     {
!       write_multitext (serv_write, line, "\r\n");
!       free (line);
!     }
!   fprintf (serv_write, ".\r\n");
!   get_reply (stdout);
  }
  
  void
--- 1260,1300 ----
        cmd = "REPL";
      }
    fprintf (serv_write, "%s %s %s\r\n", cmd, prnum, fieldname);
! 
!   do {
!     reply = get_reply (stdout);
!     switch (reply)
!       {
!         case CODE_SEND_TEXT:
!           while ((line = read_line (fp, NULL)) != NULL)
!             {
!               write_multitext (serv_write, line, "\r\n");
!               free (line);
!             }
!           fprintf (serv_write, ".\r\n");
!         break;
! 
!         case CODE_SEND_CHANGE_REASON:
!           if (reason)
!           fprintf (serv_write, "%s\r\n.\r\n", reason);
!           else
!           {
!             fprintf (stderr, "%s: server wants a change-reason for %s,"
!                " but none was supplied.\n", program_name, fieldname);
!             safe_exit ();
!           }
!         break;
!     
!       case CODE_OK:
!         break;
! 
!         default:
!         fprintf (stderr, "%s: bad reply from server: %d.\n",
!                  program_name, reply);
          safe_exit ();
!         break;
!       }
!   } while (reply != CODE_OK);
  }
  
  void




reply via email to

[Prev in Thread] Current Thread [Next in Thread]