Changeset - 0aeea9ae7665
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 16 years ago 2009-10-21 18:50:03
ohnobinki@ohnopublishing.net
update enum remoteio_method and funcmap
2 files changed with 9 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/common/libremoteio.h
Show inline comments
 
@@ -30,9 +30,12 @@
 
enum remoteio_method
 
  {
 
    REMOTEIO_METHOD_SSH = 0,
 
#ifndef WINDOWS
 
    REMOTEIO_METHOD_UNIX = 1,
 
#endif
 
    /*    REMOTEIO_METHOD_TCP */ /*< someday, maybe */
 
    /*    REMOETIO_METHOD_XMLRPC */ /*< again, maybe someday */
 
    REMOTEIO_METHOD_MAX = 1 /*< This is a number used to check the consitency of remoteio_server structs */
 
    REMOTEIO_METHOD_MAX = 2 /*< This is a number used to check the consitency of remoteio_server structs */
 
  };
 

	
 
struct remoteio_server
 
@@ -66,6 +69,8 @@ typedef int remoteio_close_func_t(struct
 

	
 
struct remoteio_method_funcmap
 
{
 
  enum remoteio_method method;
 

	
 
  remoteio_open_func_t *open_func;
 
  remoteio_read_func_t *read_func;
 
  remoteio_write_func_t *write_func;
src/common/remoteio.c
Show inline comments
 
@@ -51,11 +51,11 @@ int _remoteio_sock_close(struct remoteio
 
struct remoteio_method_funcmap funcmap[] = 
 
  {
 
    /* [REMOTEIO_METHOD_SSH] */
 
    {&_remoteio_ssh_open, &_remoteio_ssh_read, &_remoteio_ssh_write, &_remoteio_ssh_close, "ssh"},
 
    {REMOTEIO_METHOD_SSH, &_remoteio_ssh_open, &_remoteio_ssh_read, &_remoteio_ssh_write, &_remoteio_ssh_close, "ssh"},
 
#ifndef WINDOWS
 
    {&_remoteio_sock_open, &_remoteio_sock_read, &_remoteio_sock_write, &_remoteio_sock_close, "unix"},
 
    {REMOTEIO_METHOD_UNIX, &_remoteio_sock_open, &_remoteio_sock_read, &_remoteio_sock_write, &_remoteio_sock_close, "unix"},
 
#endif
 
    {NULL, NULL, NULL, NULL, NULL}
 
    {REMOTEIO_METHOD_MAX, NULL, NULL, NULL, NULL, NULL}
 
  };
 

	
 
struct remoteio_server *remoteio_getserver(const struct remoteio_opts *opts, const char *servername);
0 comments (0 inline, 0 general)