Implementation of ZOOM option extra args: Appeded to target request.
authorDennis Schafroth <dennis@indexdata.com>
Fri, 4 Mar 2011 13:21:18 +0000 (14:21 +0100)
committerDennis Schafroth <dennis@indexdata.com>
Fri, 4 Mar 2011 13:21:18 +0000 (14:21 +0100)
src/connection.c
src/settings.c
src/settings.h

index e0b809d..3ef5cf6 100644 (file)
@@ -393,6 +393,7 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man)
     const char *charset;
     const char *sru;
     const char *sru_version = 0;
+    const char *extra_args  = 0;
 
     struct session_database *sdb = client_get_database(con->client);
     const char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY);
@@ -423,6 +424,8 @@ static int connection_connect(struct connection *con, iochan_man_t iochan_man)
     if ((sru_version = session_setting_oneval(sdb, PZ_SRU_VERSION)) 
         && *sru_version)
         ZOOM_options_set(zoptions, "sru_version", sru_version);
+    if ((extra_args = session_setting_oneval(sdb, PZ_EXTRA_ARGS)) && *extra_args)
+        ZOOM_options_set(zoptions, "extraArgs", extra_args);
 
     if (!(link = ZOOM_connection_create(zoptions)))
     {
index 9145c22..8515161 100644 (file)
@@ -75,6 +75,7 @@ static char *hard_settings[] = {
     "pz:termlist_term_count",   /* PZ_TERMLIST_TERM_COUNT */
     "pz:termlist_term_factor",  /* PZ_TERMLIST_TERM_FACTOR*/
     "pz:preferred",             /* PZ_PREFERRED           */
+    "pz:extra_args",            /* PZ_EXTRA_ARGS          */
     0
 };
 
index 88bf8af..d7e61d3 100644 (file)
@@ -48,7 +48,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #define PZ_TERMLIST_TERM_COUNT  25
 #define PZ_TERMLIST_TERM_FACTOR 26
 #define PZ_PREFERRED            27
-#define PZ_MAX_EOF              28
+#define PZ_EXTRA_ARGS           28
+#define PZ_MAX_EOF              29
 
 struct setting
 {