DEBUG(3,("wins_multihomed_register_query_success: name %s is not in the correct state to add \
a subsequent IP addess.\n", namestr(question_name) ));
send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet);
+
+ orig_reg_packet->locked = False;
+ free_packet(orig_reg_packet);
+
return;
}
update_name_ttl(namerec, ttl);
send_wins_name_registration_response(0, ttl, orig_reg_packet);
+ orig_reg_packet->locked = False;
+ free_packet(orig_reg_packet);
}
/***********************************************************************
DEBUG(3,("wins_multihomed_register_query_fail: Registering machine at IP %s failed to answer \
query successfully for name %s.\n", inet_ntoa(orig_reg_packet->ip), namestr(question_name) ));
send_wins_name_registration_response(RFS_ERR, 0, orig_reg_packet);
+
+ orig_reg_packet->locked = False;
+ free_packet(orig_reg_packet);
return;
}
userdata->userdata_len = sizeof(struct packet_struct *);
memcpy(userdata->data, (char *)&p, sizeof(struct packet_struct *) );
- /*
- * As query_name uses the subnet broadcast address as the destination
- * of the packet we temporarily change the subnet broadcast address to
- * be the IP address of the requesting machine and send the packet. This
- * is a *horrible* hack but the alternative is to add the destination
- * address parameter to all query_name() calls. I hate this code :-).
+ /*
+ * Use the new call to send a query directly to an IP address.
+ * This sends the query directly to the IP address, and ensures
+ * the recursion desired flag is not set (you were right Luke :-).
+ * This function should *only* be called from the WINS server
+ * code. JRA.
*/
- subrec->bcast_ip = p->ip;
- query_name( subrec, question->name, question->name_type,
- wins_multihomed_register_query_success,
- wins_multihomed_register_query_fail,
- userdata);
- subrec->bcast_ip = ipzero;
+ query_name_from_wins_server( p->ip,
+ question->name,
+ question->name_type,
+ wins_multihomed_register_query_success,
+ wins_multihomed_register_query_fail,
+ userdata );
+
return;
}