diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-02-14 20:05:05 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-02-14 20:05:05 +0000 |
commit | 2bc7d89a16f2806dfc557c83cf0e9ecbf185e54f (patch) | |
tree | 4d0666863c3dea74e184864a22444f577647d1d6 /protocols | |
parent | e2b8caa4b81a8b7e60fb832f154b65eef6c5dec8 (diff) | |
download | ATCD-2bc7d89a16f2806dfc557c83cf0e9ecbf185e54f.tar.gz |
ChangeLogTag:Mon Feb 14 11:59:27 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/ace/RMCast/Link.cpp | 17 | ||||
-rw-r--r-- | protocols/ace/RMCast/Protocol.cpp | 7 | ||||
-rw-r--r-- | protocols/ace/RMCast/Protocol.h | 12 |
3 files changed, 18 insertions, 18 deletions
diff --git a/protocols/ace/RMCast/Link.cpp b/protocols/ace/RMCast/Link.cpp index dd3360889b8..1879b463e48 100644 --- a/protocols/ace/RMCast/Link.cpp +++ b/protocols/ace/RMCast/Link.cpp @@ -229,34 +229,27 @@ namespace ACE_RMCast Profile::Header hdr (id, size); - switch (hdr.id ()) - { - case SN::id: + if (id == SN::id) { m->add (Profile_ptr (new SN (hdr, is))); - break; } - case Data::id: + else if (id == Data::id) { m->add (Profile_ptr (new Data (hdr, is))); - break; } - case NAK::id: + else if (id == NAK::id) { m->add (Profile_ptr (new NAK (hdr, is))); - break; } - case NRTM::id: + else if (id == NRTM::id) { m->add (Profile_ptr (new NRTM (hdr, is))); - break; } - default: + else { //cerr << 0 << "unknown profile id " << hdr.id () << endl; abort (); } - } } in_->recv (m); diff --git a/protocols/ace/RMCast/Protocol.cpp b/protocols/ace/RMCast/Protocol.cpp index 4082d6bd139..8c62bef6c00 100644 --- a/protocols/ace/RMCast/Protocol.cpp +++ b/protocols/ace/RMCast/Protocol.cpp @@ -6,4 +6,11 @@ namespace ACE_RMCast { + + u16 const From::id = 0x0001; + u16 const To:: id = 0x0002; + u16 const Data::id = 0x0003; + u16 const SN:: id = 0x0004; + u16 const NAK:: id = 0x0005; + u16 const NRTM::id = 0x0006; } diff --git a/protocols/ace/RMCast/Protocol.h b/protocols/ace/RMCast/Protocol.h index 2dca1b958ba..6f74b3d16cf 100644 --- a/protocols/ace/RMCast/Protocol.h +++ b/protocols/ace/RMCast/Protocol.h @@ -292,7 +292,7 @@ namespace ACE_RMCast struct From : Profile { - static u16 const id = 0x0001; + static u16 const id; public: From (Header const& h, istream& is) @@ -348,7 +348,7 @@ namespace ACE_RMCast struct To : Profile { - static u16 const id = 0x0002; + static u16 const id; public: To (Header const& h, istream& is) @@ -403,7 +403,7 @@ namespace ACE_RMCast struct Data : Profile { - static u16 const id = 0x0003; + static u16 const id; public: Data (Header const& h, istream& is) @@ -463,7 +463,7 @@ namespace ACE_RMCast struct SN : Profile { - static u16 const id = 0x0004; + static u16 const id; public: SN (Header const& h, istream& is) @@ -509,7 +509,7 @@ namespace ACE_RMCast struct NAK : Profile { - static u16 const id = 0x0005; + static u16 const id; #if defined (__BORLANDC__) && (__BORLANDC__ <= 0x570) @@ -628,7 +628,7 @@ namespace ACE_RMCast struct NRTM : Profile { - static u16 const id = 0x0006; + static u16 const id; public: NRTM (Header const& h, istream& is) |