Index: trunk/Ohana/src/opihi/pcontrol/IDops.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/IDops.c	(revision 8296)
+++ trunk/Ohana/src/opihi/pcontrol/IDops.c	(revision 18098)
@@ -1,11 +1,12 @@
 # include "pcontrol.h"
 
-static IDtype CurrentJobID  = 0;
-static IDtype CurrentHostID = 0;
+static IDtype CurrentJobID  = 1;
+static IDtype CurrentHostID = 1;
 
-/* for now, no persistence : we could use the date/time to seed the upper byte(s) if needed */
+/* for now, no persistence between sessions : we could use the date/time to seed the upper
+ * byte(s) if needed */
 void InitIDs () {
-  CurrentJobID = 0;
-  CurrentHostID = 0;
+  CurrentJobID = 1;
+  CurrentHostID = 1;
 }
 
@@ -41,2 +42,29 @@
 }
 
+IDtype GetID (char *IDword) {
+
+  int Nargs;
+  IDtype ID;
+  unsigned int word0, word1, word2, word3;
+  char *endptr;
+
+  Nargs = sscanf (IDword, "%x.%x.%x.%x", &word3, &word2, &word1, &word0);
+  if (Nargs == 4) {
+      IDtype tmp;
+    ID = 0;
+    ID |= (word0 << 0);
+    ID |= (word1 << 16);
+    tmp = word2;
+    ID |= (tmp << 32);
+    tmp = word3;
+    ID |= (tmp << 48);
+    return ID;
+  } 
+    
+  ID = strtoll (IDword, &endptr, 10);
+  if (*endptr == 0) {
+    return ID;
+  }
+
+  return 0;
+}
