Changeset - 21d10edcb5a2
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-12 22:19:29
ohnobinki@ohnopublishing.net
implemented mostt of remoteio_open()
1 file changed with 22 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/common/remoteio.c
Show inline comments
 
@@ -20,3 +20,25 @@
 

	
 
#include "remoteio.h"
 

	
 
#include <stdlib.h>
 
#include <stdio.h>
 

	
 
/**
 
   @todo there must be passage of a configuratoin struct to allow configuration of different ssh clients.
 
 */
 
int remoteio_open(struct remoteio **rem, const char *servername)
 
{
 
  const char *sshargs[] = {"ssh", servername, "distrend", "-d", (char *)NULL};
 
  int rtn;
 

	
 
  *rem = malloc(sizeof(struct remoteio));
 
  rtn = execio_open( &(*rem)->execio, "ssh", sshargs);
 
  if(rtn)
 
    {
 
      fprinf(stderr, "error opening remoteio channel to server ``%s''" , servername);
 
      free(*rem);
 
      return 1;
 
    }
 
  
 
  return 0;
 
}
0 comments (0 inline, 0 general)