Add comment
[pazpar2-moved-to-github.git] / src / http_command.c
index 2809989..edaad36 100644 (file)
@@ -888,7 +888,8 @@ static void cmd_record(struct http_channel *c)
         int i;
         struct record*r = rec->records;
         int binary = 0;
-
+        const char *nativesyntax = http_argbyname(rq, "nativesyntax");
+        
         if (binarystr && *binarystr != '0')
             binary = 1;
 
@@ -903,13 +904,14 @@ static void cmd_record(struct http_channel *c)
             http_channel_observer_t obs =
                 http_add_observer(c, r->client, show_raw_reset);
             int ret = client_show_raw_begin(r->client, r->position,
-                                        syntax, esn, 
-                                        obs /* data */,
-                                        show_raw_record_error,
-                                        (binary ? 
-                                         show_raw_record_ok_binary : 
-                                         show_raw_record_ok),
-                                        (binary ? 1 : 0));
+                                            syntax, esn,
+                                            obs /* data */,
+                                            show_raw_record_error,
+                                            (binary ? 
+                                             show_raw_record_ok_binary : 
+                                             show_raw_record_ok),
+                                            (binary ? 1 : 0),
+                                            nativesyntax);
             if (ret == -1)
             {
                 http_remove_observer(obs);
@@ -1035,8 +1037,6 @@ static void show_records_ready(void *data)
     show_records(c, -1);
 }
 
-int show_count = 0;
-
 static void cmd_show(struct http_channel *c)
 {
     struct http_request  *rq = c->request;
@@ -1088,7 +1088,6 @@ static void cmd_show(struct http_channel *c)
             // if there is already a watch/block. we do not block this one
             if (session_set_watch(s->psession, SESSION_WATCH_SHOW,
                                   show_records_ready, c, c) != 0
-//                || (++show_count % 6 == 0)
                 )
             {
                 yaz_log(YLOG_WARN, "Attempt to block multiple times on show block. Not supported!");