[BACK]Return to message.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rdistd

Diff for /src/usr.bin/rdistd/Attic/message.c between version 1.4 and 1.5

version 1.4, 1996/06/26 05:38:23 version 1.5, 1996/07/29 17:30:55
Line 119 
Line 119 
   
         debugmsg(DM_MISC, "Current message logging config:");          debugmsg(DM_MISC, "Current message logging config:");
         for (i = 0; msgfacility[i].mf_name; ++i) {          for (i = 0; msgfacility[i].mf_name; ++i) {
                 (void) sprintf(buf, "    %s=", msgfacility[i].mf_name);                  (void) snprintf(buf, sizeof(buf),
                                   "    %s=", msgfacility[i].mf_name);
                 for (x = 0; msgtypes[x].mt_name; ++x)                  for (x = 0; msgtypes[x].mt_name; ++x)
                         if (IS_ON(msgfacility[i].mf_msgtypes,                          if (IS_ON(msgfacility[i].mf_msgtypes,
                                   msgtypes[x].mt_type)) {                                    msgtypes[x].mt_type)) {
Line 180 
Line 181 
          */           */
         if (isserver && (msgfac->mf_msgfac != MF_SYSLOG &&          if (isserver && (msgfac->mf_msgfac != MF_SYSLOG &&
                          msgfac->mf_msgfac != MF_FILE)) {                           msgfac->mf_msgfac != MF_FILE)) {
                 (void) sprintf(ebuf,                  (void) snprintf(ebuf, sizeof(ebuf),
                 "The \"%s\" message facility cannot be used by the server.",                  "The \"%s\" message facility cannot be used by the server.",
                                msgfac->mf_name);                                 msgfac->mf_name);
                 return(ebuf);                  return(ebuf);
Line 247 
Line 248 
                             strcasecmp(word, "debug") == 0)                              strcasecmp(word, "debug") == 0)
                                 debug = DM_ALL;                                  debug = DM_ALL;
                 } else {                  } else {
                         (void) sprintf(ebuf, "Message type \"%s\" is invalid.",                          (void) snprintf(ebuf, sizeof(ebuf),
                                        word);                                          "Message type \"%s\" is invalid.",
                                           word);
                         return(ebuf);                          return(ebuf);
                 }                  }
         }          }
Line 291 
Line 293 
                         return("No message type specified");                          return("No message type specified");
   
                 if ((msgfac = getmsgfac(word)) == NULL) {                  if ((msgfac = getmsgfac(word)) == NULL) {
                         (void) sprintf(ebuf,                          (void) snprintf(ebuf, sizeof(ebuf),
                                        "%s is not a valid message facility",                                          "%s is not a valid message facility",
                                        word);                                          word);
                         return(ebuf);                          return(ebuf);
                 }                  }
   
Line 542 
Line 544 
         /*          /*
          * Special cases           * Special cases
          */           */
         if (isserver && IS_ON(flags, MT_REMOTE))          if (isserver && IS_ON(flags, MT_NOTICE)) {
                   msgsendstdout((MSGFACILITY *)NULL, MT_NOTICE, flags, mbuf);
                   return;
           } else if (isserver && IS_ON(flags, MT_REMOTE))
                 msgsendstdout((MSGFACILITY *)NULL, MT_REMOTE, flags, mbuf);                  msgsendstdout((MSGFACILITY *)NULL, MT_REMOTE, flags, mbuf);
         else if (isserver && IS_ON(flags, MT_NERROR))          else if (isserver && IS_ON(flags, MT_NERROR))
                 msgsendstdout((MSGFACILITY *)NULL, MT_NERROR, flags, mbuf);                  msgsendstdout((MSGFACILITY *)NULL, MT_NERROR, flags, mbuf);
         else if (isserver && IS_ON(flags, MT_FERROR))          else if (isserver && IS_ON(flags, MT_FERROR))
                 msgsendstdout((MSGFACILITY *)NULL, MT_FERROR, flags, mbuf);                  msgsendstdout((MSGFACILITY *)NULL, MT_FERROR, flags, mbuf);
         else if (isserver && IS_ON(flags, MT_NOTICE)) {  
                 msgsendstdout((MSGFACILITY *)NULL, MT_NOTICE, flags, mbuf);  
                 return;  
         }  
   
         /*          /*
          * For each Message Facility, check each Message Type to see           * For each Message Facility, check each Message Type to see

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5