Add different 'registration' message

This commit is contained in:
Wilco Baan Hofman 2022-01-31 19:40:48 +01:00
parent cd7a1d4c75
commit 747ca71c92

View file

@ -227,7 +227,7 @@ int main(int argc, char **argv) {
pkt->device, pkt->prom, pkt->message, inet_ntoa(from.sin_addr), src_port); pkt->device, pkt->prom, pkt->message, inet_ntoa(from.sin_addr), src_port);
/* Handle registrations, reconnects and messages */ /* Handle registrations, reconnects and messages */
if (strcmp(pkt->message, "REGISTRATION REQUEST") == 0) { if (strcmp(pkt->message, "REGISTRATION REQUEST") == 0 || strcmp(pkt->message, "registration") == 0) {
/* XXX I'm sending this to this very same socket now. This should be used as a dispatcher */ /* XXX I'm sending this to this very same socket now. This should be used as a dispatcher */
reply_message = talloc_asprintf(pkt, "REGISTRATION RENEWAL AT PORT %05d", conf->siahs_port); reply_message = talloc_asprintf(pkt, "REGISTRATION RENEWAL AT PORT %05d", conf->siahs_port);