- blocksize recognition code.
 
 For 1.27 release:
+- Add ORDER BY JobId to list of Jobs in query.sql, and in
+  ua_list.c (list command).
+- Make gethostbyname() thread safe in bnet.c
 
 After 1.27
+- Check if both CatalogFiles and UseCatalog are set to SD.
 - Check if we can bump Bacula FD priorty in Win2000
 - Implement FileOptions.
 - Make bcopy read through bad tape records.
 
    }
 }
 
+static pthread_mutex_t ip_mutex = PTHREAD_MUTEX_INITIALIZER;
+
 /*
  * Convert a hostname or dotted IP address into   
  * a s_addr.  We handle only IPv4.
       addr_list[0] = inaddr.s_addr;
       addr_list[1] = (uint32_t) -1;
    } else {
-      /******FIXME***** use gethostbyname_r or mutex ****/
+      P(ip_mutex);
       if ((hp = gethostbyname(host)) == NULL) {
          Jmsg2(jcr, M_ERROR, 0, "gethostbyname() for %s failed: ERR=%s\n", 
               host, strerror(errno));
+        V(ip_mutex);
         return NULL;
       }
       if (hp->h_length != sizeof(inaddr.s_addr) || hp->h_addrtype != AF_INET) {
-          Jmsg2(jcr, M_ERROR, 0, _("gethostbyname() network address length error.\n\
+         Jmsg2(jcr, M_ERROR, 0, _("gethostbyname() network address length error.\n\
 Wanted %d got %d bytes for s_addr.\n"), sizeof(inaddr.s_addr), hp->h_length);
-         return NULL;
+        V(ip_mutex);
+        return NULL;
       }
       i = 0;
       for (p = hp->h_addr_list; *p != 0; p++) {
         addr_list[i++] = (*(struct in_addr **)p)->s_addr;
       }
       addr_list[i] = (uint32_t) -1;
+      V(ip_mutex);
    }
    return addr_list;
 }
 
 /* */
 #define VERSION "1.27"
 #define VSTRING "1"
-#define DATE    "14 November 2002"
-#define LSMDATE "14Nov02"
+#define DATE    "15 November 2002"
+#define LSMDATE "15Nov02"
 
 /* Debug flags */
 #define DEBUG 1