Ticket #11: mod_disco_info_node.patch

File mod_disco_info_node.patch, 0.6 KB (added by nexus, 12 months ago)

patch that will copy node attribute from request into response

  • sm/mod_disco.c

     
    428428    /* they want to know about us */ 
    429429    if(pkt->ns == ns_DISCO_INFO) { 
    430430        result = pkt_dup(d->disco_info_result, jid_full(pkt->from), jid_full(pkt->to)); 
     431 
     432        node = nad_find_attr(pkt->nad, 2, -1, "node", NULL); 
     433        if(node >= 0) { 
     434            nad_set_attr(result->nad, 2, -1, "node", NAD_AVAL(pkt->nad, node), NAD_AVAL_L(pkt->nad, node)); 
     435        } 
     436 
    431437        pkt_id(pkt, result); 
    432438        pkt_free(pkt); 
    433439