summaryrefslogtreecommitdiff
path: root/comm
diff options
context:
space:
mode:
authorchatty1993-07-19 11:28:03 +0000
committerchatty1993-07-19 11:28:03 +0000
commit97d910ab97da81e64c036e2096e82dbfa662a122 (patch)
treecf0d286af6b8b1c1d82e6f89ac2e68cd37665418 /comm
parentb26f2b08c9d550158e3e761fac38b42f37f53ca6 (diff)
downloadivy-league-97d910ab97da81e64c036e2096e82dbfa662a122.zip
ivy-league-97d910ab97da81e64c036e2096e82dbfa662a122.tar.gz
ivy-league-97d910ab97da81e64c036e2096e82dbfa662a122.tar.bz2
ivy-league-97d910ab97da81e64c036e2096e82dbfa662a122.tar.xz
Changed Fd into FilDes in read and write calls to avoid conversion problems
Diffstat (limited to 'comm')
-rw-r--r--comm/Channel.cc6
-rw-r--r--comm/Channel.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/comm/Channel.cc b/comm/Channel.cc
index b8178aa..9241fd7 100644
--- a/comm/Channel.cc
+++ b/comm/Channel.cc
@@ -334,7 +334,7 @@ UchChannel :: Read (UchMsgBuffer& b)
int l = b.FreeLength ();
if (! l)
return -2;
- int n = read (Fd, (char*) b.Free (), l);
+ int n = read (FilDes (), (char*) b.Free (), l);
if (n > 0)
b.More (n);
return n;
@@ -351,7 +351,7 @@ UchChannel :: Write (UchMsgBuffer& b)
int l = b.BufLength ();
if (! l)
return -2;
- int n = write (Fd, (const char*) b.Buffer (), l);
+ int n = write (FilDes (), (const char*) b.Buffer (), l);
if (n > 0)
b.Flush (n);
return n;
@@ -394,7 +394,7 @@ UchChannel :: Accept ()
if (Fd < 0)
return (UchChannel*) 0;
- if ((fd = accept (Fd, 0, 0)) < 0)
+ if ((fd = accept (FilDes (), 0, 0)) < 0)
return (UchChannel*) 0;
return new UchChannel (fd);
diff --git a/comm/Channel.h b/comm/Channel.h
index e59d3d5..24ea7e3 100644
--- a/comm/Channel.h
+++ b/comm/Channel.h
@@ -99,8 +99,8 @@ virtual void HandleRead ();
virtual bool HandleSelect ();
inline int FilDes () const { return Fd; }
-inline int Read (byte* b, int n) { return read (Fd, (char*) b, n); }
-inline int Write (byte* b, int n) { return write (Fd, (const char*) b, n); }
+inline int Read (byte* b, int n) { return read (FilDes (), (char*) b, n); }
+inline int Write (byte* b, int n) { return write (FilDes (), (const char*) b, n); }
inline operator int () { return Fd; }
inline char* StrRepr (char* s = StrReprBuf) { return Fd.StrRepr (s); }