Changeset - ce23bfb50229
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 16 years ago 2009-07-13 22:13:53
ohnobinki@ohnopublishing.net
fixed typos in remoteio, added missing #include, removed const
2 files changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/common/remoteio.c
Show inline comments
 
@@ -16,29 +16,30 @@
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
*/
 

	
 
#include "remoteio.h"
 
#include "execio.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)
 
int remoteio_open(struct remoteio **rem, char *servername)
 
{
 
  const char *sshargs[] = {"ssh", servername, "distrend", "-d", (char *)NULL};
 
  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);
 
      fprintf(stderr, "error opening remoteio channel to server ``%s''" , servername);
 
      free(*rem);
 
      return 1;
 
    }
 
  
 
  return 0;
 
}
src/common/remoteio.h
Show inline comments
 
@@ -32,13 +32,13 @@ struct remoteio {
 

	
 
/**
 
   Opens connection with remote distrend. Returns 1 on error.
 

	
 
   @todo should this be asynchronous?
 
 */
 
int remoteio_open(struct remoteio **rem, const char *servername);
 
int remoteio_open(struct remoteio **rem, char *servername);
 

	
 
/**
 
   non-blocking I/O.
 
   @return 0 on success, 1 on failure
 
 */
 
int remoteio_read(struct remoteio *rem, void *buf, size_t len, size_t *bytesread);
0 comments (0 inline, 0 general)