#include "cond_eval.h" void *get_request_option(gaa_request_right_ptr right, gaa_string_data type, gaa_string_data authority) { gaaint_list_entry *pent; gaa_request_option_ptr option; for (pent=gaa_list_first(right->options); pent; pent=gaa_list_next(pent)) { if (option=(gaa_request_option_ptr)gaa_list_entry_value(pent)) { if (type==0 && authority==0) { return option->value; } else if (type==0 && authority!=0) { if (strcmp(authority, option->authority)==0) { return option->value; } } else if (authority==0 && type!=0) { if (strcmp(type, option->type)==0) { return option->value; } } else if (authority!=0 && type!=0) { if (strcmp(type, option->type)==0 && strcmp(authority, option->authority)==0) { return option->value; } } } } return 0; }