[BACK]Return to rumpclient.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / librumpclient

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/librumpclient/rumpclient.c between version 1.1 and 1.2

version 1.1, 2010/11/04 21:01:29 version 1.2, 2010/11/05 13:50:48
Line 186  rumpclient_init()
Line 186  rumpclient_init()
         unsigned idx;          unsigned idx;
         int error, s;          int error, s;
   
         if ((p = getenv("RUMP_SP_CLIENT")) == NULL)          if ((p = getenv("RUMP_SP_CLIENT")) == NULL) {
                 return ENOENT;                  errno = ENOENT;
                   return -1;
           }
   
         if ((error = parseurl(p, &sap, &idx, 0)) != 0)          if ((error = parseurl(p, &sap, &idx, 0)) != 0) {
                 return error;                  errno = error;
                   return -1;
           }
   
         s = socket(parsetab[idx].domain, SOCK_STREAM, 0);          s = socket(parsetab[idx].domain, SOCK_STREAM, 0);
         if (s == -1)          if (s == -1)
                 return errno;                  return -1;
   
         if (connect(s, sap, sap->sa_len) == -1) {          if (connect(s, sap, sap->sa_len) == -1) {
                   error = errno;
                 fprintf(stderr, "rump_sp: client connect failed\n");                  fprintf(stderr, "rump_sp: client connect failed\n");
                 return errno;                  errno = error;
                   return -1;
         }          }
         if ((error = parsetab[idx].connhook(s)) != 0) {          if ((error = parsetab[idx].connhook(s)) != 0) {
                   error = errno;
                 fprintf(stderr, "rump_sp: connect hook failed\n");                  fprintf(stderr, "rump_sp: connect hook failed\n");
                 return error;                  errno = error;
                   return -1;
         }          }
   
         clispc.spc_fd = s;          clispc.spc_fd = s;
   
         return 0;          return 0;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb <webmaster@jp.NetBSD.org>