From 8be85f9427a4f59f4f8f7d116d4803335bba1cdb Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 7 Aug 2002 13:19:50 +0000 Subject: [PATCH] Make compatible with old FD git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@81 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/getmsg.c | 9 +++++---- bacula/src/lib/bnet.c | 5 +++-- bacula/src/lib/bsock.h | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/bacula/src/dird/getmsg.c b/bacula/src/dird/getmsg.c index 7c1caf5118..d99b24bb4a 100644 --- a/bacula/src/dird/getmsg.c +++ b/bacula/src/dird/getmsg.c @@ -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); diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c index 1bf9863c94..12ec5730e2 100644 --- a/bacula/src/lib/bnet.c +++ b/bacula/src/lib/bnet.c @@ -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: diff --git a/bacula/src/lib/bsock.h b/bacula/src/lib/bsock.h index a507ad10bc..d347a6bff0 100644 --- a/bacula/src/lib/bsock.h +++ b/bacula/src/lib/bsock.h @@ -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 */ -- 2.39.5