| 131 | } |
| 132 | |
| 133 | void |
| 134 | SyncServer_i::unregister (::Sync::Id id) |
| 135 | { |
| 136 | //ACE_DEBUG ((LM_DEBUG, "(%P|%t) SyncServer_i::unregister\n")); |
| 137 | if (subs_.find (id) != subs_.end()) { |
| 138 | subs_.erase (id); |
| 139 | } |
| 140 | else if (pubs_.find (id) != pubs_.end()) { |
| 141 | pubs_.erase (id); |
| 142 | } |
| 143 | |
| 144 | size_t pub_count = pubs_.size (); |
| 145 | size_t sub_count = subs_.size (); |
| 146 | |
| 147 | if ((pub_count == 0) && (sub_count == 0)) { |
| 148 | try { |
| 149 | orb_->shutdown (0); |
| 150 | } |
| 151 | catch (CORBA::Exception& ex) { |
| 152 | ACE_ERROR ((LM_ERROR, "SyncServer> ORB shutdown failure: %C.\n" |
| 153 | , ex._info().c_str())); |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | void |
| 159 | SyncServer_i::way_point_reached (::Sync::Id id, |