integer.
kes  Bug #874 resolved by documenting SQLite limitations.
kes  Bug #882 resolved by documenting mtx-changer script for new drive code.
kes  Bug #881 resolved by removing typo in mtx-changer script.
kes  Made Frank Sweetser's wiki the official Bacula wiki with his
     approval. Added a link to the wiki on the web page, and implemented
     a backup from http://paramount.ind.wpi.edu
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5002 
91ce42f0-d328-0410-95d8-
f526ca767f89
 
                     Kern's ToDo List
-                     29 May 2007
+                     087 June 2007
 
 
 Document:
 
     pCountNeed=$2
     if test $pCount -lt $pCountNeed; then
        echo "usage: mtx-changer ctl-device command [slot archive-device drive-index]"
-       echo "  Insufficient number of arguments arguments given."
+       echo "  Insufficient number of arguments given."
        if test $pCount -lt 2; then
            echo "  Mimimum usage is first two arguments ..."
        else
 
       LockRes();
       numdir = 0;
       foreach_res(dir, R_DIRECTOR) {
-         senditf( _("%d  %s at %s:%d\n"), 1+numdir++, dir->hdr.name, dir->address,
+         senditf( _("%2d:  %s at %s:%d\n"), 1+numdir++, dir->hdr.name, dir->address,
             dir->DIRport);
       }
       UnlockRes();
-      if (get_cmd(stdin, _("Select Director: "), UA_sock, 600) < 0) {
+      if (get_cmd(stdin, _("Select Director by entering a number: "), UA_sock, 600) < 0) {
          (void)WSACleanup();               /* Cleanup Windows sockets */
          return 1;
       }
+      if (!is_a_number(UA_sock->msg)) {
+         senditf(_("%s is not a number. You must enter a number between 1 and %d\n"), 
+                 UA_sock->msg, numdir);
+         goto try_again;
+      }
       item = atoi(UA_sock->msg);
       if (item < 0 || item > numdir) {
          senditf(_("You must enter a number between 1 and %d\n"), numdir);
 
        *   we can take note and act accordingly (probably redo the 
        *   search at least a few times).
        */
+      Dmsg1(dbglvl, "JobId=%u duplicate vol list\n", (int)rctx.jcr->JobId);
       temp_vol_list = New(dlist(vol, &vol->link));
       foreach_dlist(vol, vol_list) {
          VOLRES *nvol;
       vol_list = temp_vol_list;
       free_volume_list();                  /* release temp_vol_list */
       vol_list = save_vol_list;
+      Dmsg1(dbglvl, "JobId=%u deleted temp vol list\n", (int)rctx.jcr->JobId);
       unlock_volumes();
    }
    if (ok) {
+      Dmsg2(dbglvl, "JobId=%u got vol %s in reserved volums list\n", (int)rctx.jcr->JobId,
+            rctx.VolumeName);
       return true;
    }
 
    const int name_len = MAX_NAME_LENGTH;
 
    /* Make sure MediaType is OK */
-   Dmsg3(dbglvl, "JobId=%u MediaType device=%s request=%s\n",
+   Dmsg3(dbglvl, "JobId=%u chk MediaType device=%s request=%s\n",
          (int)rctx.jcr->JobId,
          rctx.device->media_type, rctx.store->media_type);
    if (strcmp(rctx.device->media_type, rctx.store->media_type) != 0) {
 
               Technical notes on version 2.1
 
 General:
+09Jun07
+kes  Unable to reproduce bug 872. However added additional testing for
+     integer.
+kes  Bug #874 resolved by documenting SQLite limitations.
+kes  Bug #882 resolved by documenting mtx-changer script for new drive code.
+kes  Bug #881 resolved by removing typo in mtx-changer script.
+kes  Made Frank Sweetser's wiki the official Bacula wiki with his
+     approval. Added a link to the wiki on the web page, and implemented
+     a backup from http://paramount.ind.wpi.edu                                          
 08Jun07
 kes  Fix update allfrompool to pass pool name.
 07Jun07