static gboolean is_expected_msg(const struct ha_msg * msg, const char * field_name1, const char * field_content1, const char * field_name2, const char * field_content2, gboolean mandatory) { if ( msg == NULL ) { stdlib_log(LOG_ERR, "%s:%d: null message", __FUNCTION__, __LINE__); return FALSE; } return cmp_field(msg, field_name1, field_content1, mandatory) && cmp_field(msg, field_name2, field_content2, mandatory); }
void CMP_external_field( gpre_req* request, const gpre_fld* field) { switch (field->fld_dtype) { case dtype_cstring: request->add_byte(blr_text2); request->add_word(field->fld_ttype); request->add_word(field->fld_length - 1); break; case dtype_text: request->add_byte(blr_text2); request->add_word(field->fld_ttype); request->add_word(field->fld_length); break; case dtype_varying: request->add_byte(blr_varying2); request->add_word(field->fld_ttype); request->add_word(field->fld_length); break; default: cmp_field(request, field, 0); break; } }
static char *find_pn(char *key, CellMap *cellmap) { char *field; int i; int max = cellmap->ncells; Cells *cell = cellmap->cells; for (i = 0; i < max; i++) { field = cell[i].search_field; if (field != NULL) { if (cmp_field(key, field) == 0) goto out; } } return NULL; out: return cell[i].return_field; }