From 6c9b7d0dcaf5e0ad50ee65f7874fd83ca2d84c66 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 9 Jun 2004 12:44:37 +0000 Subject: [PATCH] Final changes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1401 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/ua_label.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bacula/src/dird/ua_label.c b/bacula/src/dird/ua_label.c index f69b64bf20..8c3cd474ff 100644 --- a/bacula/src/dird/ua_label.c +++ b/bacula/src/dird/ua_label.c @@ -583,6 +583,7 @@ static int send_label_request(UAContext *ua, MEDIA_DBR *mr, MEDIA_DBR *omr, ok = TRUE; } } + close_sd_bsock(ua); unbash_spaces(mr->VolumeName); unbash_spaces(mr->MediaType); unbash_spaces(pr->Name); @@ -646,6 +647,7 @@ static char *get_volume_name_from_SD(UAContext *ua, int Slot) int rtn_slot; if (!(sd=open_sd_bsock(ua))) { + bsendmsg(ua, _("Could not open SD socket.\n")); return NULL; } bstrncpy(dev_name, store->dev_name, sizeof(dev_name)); @@ -657,6 +659,7 @@ static char *get_volume_name_from_SD(UAContext *ua, int Slot) /* Get Volume name in this Slot */ while (bnet_recv(sd) >= 0) { bsendmsg(ua, "%s", sd->msg); + Dmsg1(100, "Got: %s", sd->msg); if (strncmp(sd->msg, "3001 Volume=", 12) == 0) { VolName = (char *)malloc(sd->msglen); if (sscanf(sd->msg, "3001 Volume=%s Slot=%d", VolName, &rtn_slot) == 2) { @@ -666,6 +669,7 @@ static char *get_volume_name_from_SD(UAContext *ua, int Slot) VolName = NULL; } } + close_sd_bsock(ua); Dmsg1(200, "get_vol_name=%s\n", NPRT(VolName)); return VolName; } -- 2.39.5