Added hostname lookup for server.
[yaz-moved-to-github.git] / client / client.c
index de3740f..b92f15e 100644 (file)
@@ -4,7 +4,16 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: client.c,v $
- * Revision 1.21  1995-09-29 17:01:47  quinn
+ * Revision 1.24  1995-10-30 12:41:13  quinn
+ * Added hostname lookup for server.
+ *
+ * Revision 1.23  1995/10/18  16:12:30  quinn
+ * Better diagnostics.
+ *
+ * Revision 1.22  1995/10/11  14:49:12  quinn
+ * Smallish.
+ *
+ * Revision 1.21  1995/09/29  17:01:47  quinn
  * More Windows work
  *
  * Revision 1.20  1995/08/29  14:24:13  quinn
@@ -317,7 +326,9 @@ void display_grs1(Z_GenericRecord *r, int level)
         }
         else if (t->content->which == Z_ElementData_string)
             printf("%s\n", t->content->u.string);
-        else
+        else if (t->content->which == Z_ElementData_numeric)
+           printf("%d\n", *t->content->u.numeric);
+       else
             printf("??????\n");
     }
 }
@@ -660,13 +671,13 @@ void process_close(Z_Close *req)
     {
         "finished",
         "shutdown",
-        "systemProblem",
-        "costLimit",
+        "system problem",
+        "cost limit reached",
         "resources",
-        "securityViolation",
+        "security violation",
         "protocolError",
-        "lackOfActivity",
-        "peerAbort",
+        "lack of activity",
+        "peer abort",
         "unspecified"
     };
 
@@ -997,6 +1008,7 @@ static int client(void)
                 if (!z_APDU(in, &apdu, 0))
                 {
                     odr_perror(in, "Decoding incoming APDU");
+                   fprintf(stderr, "[Near %d]\n", odr_offset(in));
                     fprintf(stderr, "Packet dump:\n---------\n");
                     odr_dumpBER(stderr, netbuffer, res);
                     fprintf(stderr, "---------\n");