/[hyperestraier]/upstream/0.5.2/estnode.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/0.5.2/estnode.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/0.5.1/estnode.c revision 2 by dpavlin, Fri Jul 29 21:56:53 2005 UTC upstream/0.5.2/estnode.c revision 9 by dpavlin, Wed Aug 3 15:21:15 2005 UTC
# Line 55  static int est_sock_close(int sock); Line 55  static int est_sock_close(int sock);
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    
# Line 566  int est_node_uri_to_id(ESTNODE *node, co Line 566  int est_node_uri_to_id(ESTNODE *node, co
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    
# Line 575  const char *est_node_name(ESTNODE *node) Line 575  const char *est_node_name(ESTNODE *node)
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    
# Line 584  const char *est_node_label(ESTNODE *node Line 584  const char *est_node_label(ESTNODE *node
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    
# Line 593  int est_node_doc_num(ESTNODE *node){ Line 593  int est_node_doc_num(ESTNODE *node){
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    
# Line 602  int est_node_word_num(ESTNODE *node){ Line 602  int est_node_word_num(ESTNODE *node){
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    
# Line 649  ESTNODERES *est_node_search(ESTNODE *nod Line 649  ESTNODERES *est_node_search(ESTNODE *nod
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,
# Line 1444  static void est_sockpt_down(void *sp){ Line 1446  static void est_sockpt_down(void *sp){
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;

Legend:
Removed from v.2  
changed lines
  Added in v.9

  ViewVC Help
Powered by ViewVC 1.1.26