home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1820 / talkdiff < prev   
Encoding:
Text File  |  1990-12-28  |  1.3 KB  |  50 lines

  1. *** announce.c.orig    Sat Jun 18 17:10:48 1988
  2. --- announce.c    Fri Sep 14 11:33:11 1990
  3. ***************
  4. *** 28,33 ****
  5. --- 28,34 ----
  6.   #include <sys/wait.h>
  7.   #include <errno.h>
  8.   #include <syslog.h>
  9. + #include <pwd.h>
  10.   
  11.   #include <protocols/talkd.h>
  12.   
  13. ***************
  14. *** 83,88 ****
  15. --- 84,96 ----
  16.       FILE *tf;
  17.       struct stat stbuf;
  18.   
  19. +     if (request->r_tty[0] == '/')
  20. +      {
  21. +       /* Answering machine. */
  22. +       execlp("talkanswer","talkanswer",request->r_name,
  23. +           request->l_name,remote_machine,(char *) 0);
  24. +       return(FAILED);
  25. +      }
  26.       (void)sprintf(full_tty, "/dev/%s", request->r_tty);
  27.       if (access(full_tty, 0) != 0)
  28.           return (FAILED);
  29. *** process.c.orig    Sat Jun 18 17:10:49 1988
  30. --- process.c    Fri Sep 14 11:33:06 1990
  31. ***************
  32. *** 122,129 ****
  33.       /* see if the user is logged */
  34.       result = find_user(mp->r_name, mp->r_tty);
  35.       if (result != SUCCESS) {
  36. !         rp->answer = result;
  37. !         return;
  38.       }
  39.   #define    satosin(sa)    ((struct sockaddr_in *)(sa))
  40.       hp = gethostbyaddr(&satosin(&mp->ctl_addr)->sin_addr,
  41. --- 122,129 ----
  42.       /* see if the user is logged */
  43.       result = find_user(mp->r_name, mp->r_tty);
  44.       if (result != SUCCESS) {
  45. !       mp->r_tty[0] = '/';
  46. !       result = SUCCESS;
  47.       }
  48.   #define    satosin(sa)    ((struct sockaddr_in *)(sa))
  49.       hp = gethostbyaddr(&satosin(&mp->ctl_addr)->sin_addr,
  50.