]> git.sur5r.net Git - bacula/bacula/commitdiff
Make compatible with old FD
authorKern Sibbald <kern@sibbald.com>
Wed, 7 Aug 2002 13:19:50 +0000 (13:19 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 7 Aug 2002 13:19:50 +0000 (13:19 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@81 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/getmsg.c
bacula/src/lib/bnet.c
bacula/src/lib/bsock.h

index 7c1caf51185270c871ce72469a1cff2e20097221..d99b24bb4a3f6f44224fe09615863112faaa06bb 100644 (file)
@@ -80,16 +80,17 @@ int32_t bget_msg(BSOCK *bs, int rtn)
       if (n == 0) {                  /* handle signal */
         /* 0 return from bnet_recv() => network signal */
         switch (bs->msglen) {
-           case BNET_EOD:               /* end of data */
+           case BNET_NONO:           /* for compatibility */
+           case BNET_EOD:            /* end of data */
               return 0;
            case BNET_EOD_POLL:
-              bnet_fsend(bs, OK_msg);   /* send response */
-              return 0;                 /* end of data */
+              bnet_fsend(bs, OK_msg);/* send response */
+              return 0;              /* end of data */
            case BNET_TERMINATE:
               bs->terminated = 1;
               return 0;
            case BNET_POLL:
-              bnet_fsend(bs, OK_msg);   /* send response */
+              bnet_fsend(bs, OK_msg); /* send response */
               break;
            case BNET_HEARTBEAT:
               bnet_sig(bs, BNET_HB_RESPONSE);
index 1bf9863c940bb496639e615be7f273c80e5d7f56..12ec5730e261933bc4d22065062c4b97892b591d 100644 (file)
@@ -577,14 +577,15 @@ char *bnet_sig_to_ascii(BSOCK *bs)
 {
    static char buf[30];
    switch (bs->msglen) {
+      case BNET_NONO:                /* for compatibility */
       case BNET_EOD:
-         return "BNET_EOD";
+         return "BNET_EOD";           /* end of data stream */
       case BNET_EOD_POLL:
          return "BNET_EOD_POLL";
       case BNET_STATUS:
          return "BNET_STATUS";
       case BNET_TERMINATE:
-         return "BNET_TERMINATE";
+         return "BNET_TERMINATE";     /* terminate connection */
       case BNET_POLL:
          return "BNET_POLL";
       case BNET_HEARTBEAT:
index a507ad10bcfca9afb1e5a5ef2072535acbd1870b..d347a6bff015e8842cf32337d235549c8931fae9 100644 (file)
@@ -56,6 +56,7 @@ typedef struct s_bsock {
 } BSOCK;
 
 /* Signal definitions for use in bnet_sig() */
+#define BNET_NONO         0           /* DO NOT USE, remains for compatibility */
 #define BNET_EOD         -1           /* End of data stream, new data may follow */
 #define BNET_EOD_POLL    -2           /* End of data and poll all in one */
 #define BNET_STATUS      -3           /* Send full status */