~ubuntu-branches/ubuntu/precise/ceph/precise

« back to all changes in this revision

Viewing changes to src/msg/msg_types.h

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2011-02-25 15:17:26 UTC
  • mfrom: (0.1.3 sid) (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110225151726-i4fh9xvh88ufvaux
Tags: 0.24.3-2
* Make Ceph Linux only and build on all Linux archs (closes: #614890).
* Support parallel building via DEB_BUILD_OPTIONS .
* Add watch file, thanks to Clint Byrum (closes: #615021).
* Tune packaging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
    return a;
203
203
  }
204
204
 
 
205
  bool probably_equals(const entity_addr_t &o) const {
 
206
    if (get_port() != o.get_port())
 
207
      return false;
 
208
    if (get_nonce() != o.get_nonce())
 
209
      return false;
 
210
    if (is_blank_addr() || o.is_blank_addr())
 
211
      return true;
 
212
    if (memcmp(&addr, &o.addr, sizeof(addr)) == 0)
 
213
      return true;
 
214
    return false;
 
215
  }
 
216
  
205
217
  bool is_same_host(const entity_addr_t &o) const {
206
218
    if (addr.ss_family != o.addr.ss_family)
207
219
      return false;
214
226
    return false;
215
227
  }
216
228
 
217
 
  bool is_blank_addr() {
 
229
  bool is_blank_addr() const {
218
230
    switch (addr.ss_family) {
219
231
    case AF_INET:
220
232
      return addr4.sin_addr.s_addr == INADDR_ANY;