[JDEV] xdb_sql vcard problem with PSI
Cesar Garcia
cesargarcia at cantv.net
Sat Dec 13 08:32:21 CST 2003
Hi,
I found a problem using PSI and my test jabber server using xdb_sql.
I can't set the email and phone number in the vcard information.
I make the following modifications and work find.
> 176a177,178
> > /* Telphone information */
> > x = xmlnode_insert_tag(rc,"TEL");
> 178,179c180,182
> < if (sptr && *sptr)
> < xmlnode_insert_cdata(xmlnode_insert_tag(rc,"TEL" ),sptr,-1);
> ---
> > if (sptr && *sptr) {
> > xmlnode_insert_cdata(xmlnode_insert_tag(x,"NUMBER" ),sptr,-1);
> > };
> 180a184,185
> > /* Email linformation */
> > x = xmlnode_insert_tag(rc,"EMAIL");
> 183c188
> < xmlnode_insert_cdata(xmlnode_insert_tag(rc,"EMAIL" ),sptr,-1);
> ---
> > xmlnode_insert_cdata(xmlnode_insert_tag(x,"USERID" ),sptr,-1);
> 360,363c365,380
> < else if (j_strcmp(name,"TEL")==0)
> < data_telephone = GET_CHILD_DATA(x);
> < else if (j_strcmp(name,"EMAIL")==0)
> < data_email = GET_CHILD_DATA(x);
> ---
> > else if (j_strcmp(name,"TEL")==0) {
> > //data_telephone = GET_CHILD_DATA(x);
> > for
> (x2=xmlnode_get_firstchild(x);x2;x2=xmlnode_get_nextsibling(x2)){
> > name = xmlnode_get_name(x2);
> > if (j_strcmp(name,"NUMBER")==0)
> > data_telephone = GET_CHILD_DATA(x2);
> > }
> > }
> > else if (j_strcmp(name,"EMAIL")==0) {
> > //data_email = GET_CHILD_DATA(x);
> > for
> (x2=xmlnode_get_firstchild(x);x2;x2=xmlnode_get_nextsibling(x2)){
> > name = xmlnode_get_name(x2);
> > if (j_strcmp(name,"USERID")==0)
> > data_email = GET_CHILD_DATA(x2);
> > }
> > }
> 445d461
> <
More information about the JDev
mailing list