Logo Search packages:      
Sourcecode: ldb version File versions  Download package

int int ldb_msg_element_compare ( struct ldb_message_element el1,
struct ldb_message_element el2 
)

compare two message elements - return 0 on match

Definition at line 290 of file ldb_msg.c.

References ldb_message_element::num_values, and ldb_message_element::values.

{
      unsigned int i;

      if (el1->num_values != el2->num_values) {
            return el1->num_values - el2->num_values;
      }

      for (i=0;i<el1->num_values;i++) {
            if (!ldb_msg_find_val(el2, &el1->values[i])) {
                  return -1;
            }
      }

      return 0;
}


Generated by  Doxygen 1.6.0   Back to index