shithub: purgatorio

Download patch

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

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

--- a/appl/collab/clients/whiteboard.b
+++ b/appl/collab/clients/whiteboard.b
@@ -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
+++ b/appl/collab/connect.b
@@ -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
+++ b/appl/collab/proxy.b
@@ -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
+++ b/appl/collab/srvmgr.b
@@ -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
+++ b/lib/emptydirs
@@ -86,3 +86,6 @@
 usr/inferno/charon
 usr/inferno/keyring
 usr/inferno/tmp
+services/collab/export/services
+services/collab/export/collab
+