shithub: purgatorio

Download patch

ref: 3866717cbb020199d58171c1c0cdd7382a74ee82
parent: 51bcc63cc6bce3f9dab27cf6bd7155512b82c8fa
author: henesy <devnull@localhost>
date: Tue Mar 26 14:42:34 EDT 2019

add infrastructure to make collab run ;; collab does not run yet

--- a/appl/collab/clients/whiteboard.b	Tue Mar 26 11:47:09 2019
+++ b/appl/collab/clients/whiteboard.b	Tue Mar 26 14:42:34 2019
@@ -108,8 +108,10 @@
 	(err, strokeimg, sfd, ctlfd) = <-cc =>
 		if (err == nil)
 			break Connect;
-		else
+		else {
 			showtext(cimage, "Error: " + err);
+			sys->fprint(sys->fildes(2), "Error: %s\n", err);
+		}
 
 	s := <-winctl or
 	s = <-win.wreq or
--- a/appl/collab/connect.b	Tue Mar 26 11:47:09 2019
+++ b/appl/collab/connect.b	Tue Mar 26 14:42:34 2019
@@ -14,7 +14,8 @@
 };
 
 remotedir := "/n/remote";
-localdir := "/n/ftree/collab";
+# localdir := "/n/ftree/collab";	# deprecated?
+localdir := "/n/remote/collab";
 COLLABPORT: con "9999";	# TO DO: needs symbolic name in services
 
 usage()
--- a/appl/collab/proxy.b	Tue Mar 26 11:47:09 2019
+++ b/appl/collab/proxy.b	Tue Mar 26 14:42:34 2019
@@ -12,11 +12,16 @@
 {
 	sys = load Sys Sys->PATH;
 
+	if(fd == nil)
+		raise "err: fd for export was nil";
+
 	sys->chdir(root);
 	sys->bind("export/services", "export/services", Sys->MCREATE);
 	sys->bind("#s", "export/services", Sys->MBEFORE);
 
 	ctlio := sys->file2chan("export/services", "ctl");
+	if(ctlio == nil)
+		raise "err: export/services file2chan failed -- " + root + "/export/services directory does not exist" ;
 
 	hangup := chan of int;
 	spawn export(fd, "export", hangup);
--- a/appl/collab/srvmgr.b	Tue Mar 26 11:47:09 2019
+++ b/appl/collab/srvmgr.b	Tue Mar 26 14:42:34 2019
@@ -107,7 +107,7 @@
 #
 startservice(name: string): (string, string, ref Sys->FD)
 {
-sys->print("startservice [%s]\n", name);
+	sys->print("startservice [%s]\n", name);
 	srv: ref Srvinfo;
 	for (sl := services; sl != nil; sl = tl sl) {
 		s := hd sl;
--- a/lib/emptydirs	Tue Mar 26 11:47:09 2019
+++ b/lib/emptydirs	Tue Mar 26 14:42:34 2019
@@ -86,3 +86,6 @@
 usr/inferno/charon
 usr/inferno/keyring
 usr/inferno/tmp
+services/collab/export/services
+services/collab/export/collab
+