55 |
static int est_inet_aton(const char *cp, struct in_addr *inp); |
static int est_inet_aton(const char *cp, struct in_addr *inp); |
56 |
static void *est_url_shuttle_impl(void *targ); |
static void *est_url_shuttle_impl(void *targ); |
57 |
static void est_sockpt_down(void *sp); |
static void est_sockpt_down(void *sp); |
58 |
static int est_node_set_inform(ESTNODE *node); |
static int est_node_set_info(ESTNODE *node); |
59 |
static void est_parse_search_header(ESTNODERES *nres, const char *str); |
static void est_parse_search_header(ESTNODERES *nres, const char *str); |
60 |
static void est_parse_search_body(ESTNODERES *nres, char *str); |
static void est_parse_search_body(ESTNODERES *nres, char *str); |
61 |
|
|
566 |
const char *est_node_name(ESTNODE *node){ |
const char *est_node_name(ESTNODE *node){ |
567 |
assert(node); |
assert(node); |
568 |
if(node->name) return node->name; |
if(node->name) return node->name; |
569 |
est_node_set_inform(node); |
est_node_set_info(node); |
570 |
return node->name; |
return node->name; |
571 |
} |
} |
572 |
|
|
575 |
const char *est_node_label(ESTNODE *node){ |
const char *est_node_label(ESTNODE *node){ |
576 |
assert(node); |
assert(node); |
577 |
if(node->label) return node->label; |
if(node->label) return node->label; |
578 |
est_node_set_inform(node); |
est_node_set_info(node); |
579 |
return node->label; |
return node->label; |
580 |
} |
} |
581 |
|
|
584 |
int est_node_doc_num(ESTNODE *node){ |
int est_node_doc_num(ESTNODE *node){ |
585 |
assert(node); |
assert(node); |
586 |
if(node->dnum >= 0) return node->dnum; |
if(node->dnum >= 0) return node->dnum; |
587 |
est_node_set_inform(node); |
est_node_set_info(node); |
588 |
return node->dnum; |
return node->dnum; |
589 |
} |
} |
590 |
|
|
593 |
int est_node_word_num(ESTNODE *node){ |
int est_node_word_num(ESTNODE *node){ |
594 |
assert(node); |
assert(node); |
595 |
if(node->wnum >= 0) return node->wnum; |
if(node->wnum >= 0) return node->wnum; |
596 |
est_node_set_inform(node); |
est_node_set_info(node); |
597 |
return node->wnum; |
return node->wnum; |
598 |
} |
} |
599 |
|
|
602 |
double est_node_size(ESTNODE *node){ |
double est_node_size(ESTNODE *node){ |
603 |
assert(node); |
assert(node); |
604 |
if(node->size >= 0.0) return node->size; |
if(node->size >= 0.0) return node->size; |
605 |
est_node_set_inform(node); |
est_node_set_info(node); |
606 |
return node->size; |
return node->size; |
607 |
} |
} |
608 |
|
|
649 |
est_datum_printf(reqbody, "order=%?", order); |
est_datum_printf(reqbody, "order=%?", order); |
650 |
} |
} |
651 |
if(cbdatumsize(reqbody) > 0) cbdatumcat(reqbody, "&", 1); |
if(cbdatumsize(reqbody) > 0) cbdatumcat(reqbody, "&", 1); |
652 |
|
est_datum_printf(reqbody, "options=%d", est_cond_options(cond)); |
653 |
|
if(cbdatumsize(reqbody) > 0) cbdatumcat(reqbody, "&", 1); |
654 |
est_datum_printf(reqbody, "depth=%d", depth); |
est_datum_printf(reqbody, "depth=%d", depth); |
655 |
resbody = cbdatumopen("", 0); |
resbody = cbdatumopen("", 0); |
656 |
if(!est_url_shuttle(buf, node->pxhost, node->pxport, node->timeout, node->auth, reqheads, |
if(!est_url_shuttle(buf, node->pxhost, node->pxport, node->timeout, node->auth, reqheads, |
1446 |
/* Set meta informations of a node. |
/* Set meta informations of a node. |
1447 |
`node' specifies a node connection object. |
`node' specifies a node connection object. |
1448 |
The return value is true if success, else it is false. */ |
The return value is true if success, else it is false. */ |
1449 |
static int est_node_set_inform(ESTNODE *node){ |
static int est_node_set_info(ESTNODE *node){ |
1450 |
CBLIST *reqheads, *elems; |
CBLIST *reqheads, *elems; |
1451 |
CBDATUM *resbody; |
CBDATUM *resbody; |
1452 |
const char *kbuf, *ptr; |
const char *kbuf, *ptr; |