Add API: set-wrappid-path.
[wrappi.git] / lib / connect.c
index e75ba53..bb28e19 100644 (file)
@@ -66,6 +66,18 @@ wrap_set_hostname (wrap_h *w, const char *hostname)
 }
 
 void
+wrap_set_wrappid_path (wrap_h *w, const char *wrappid)
+{
+  if (wrappid == NULL || strlen (wrappid) == 0 || wrappid[0] != '/') {
+    set_error ("invalid path");
+    return;
+  }
+  w->wrappid_path = strdup (wrappid);
+  if (!w->wrappid_path)
+    set_error_errno ("strdup");
+}
+
+void
 wrap_int_make_request (wrap_h *w, int proc_nr, const void *args, void *ret)
 {
   switch (w->scheme) {