[Swan-dev] xauth_send_request has a comment that confuses me

D. Hugh Redelmeier hugh at mimosa.com
Sun Oct 1 18:52:05 UTC 2017


At the end of xauth_send_request:

        /* RETRANSMIT if Main, SA_REPLACE if Aggressive */
 	/* ??? the actual code seems to force EVENT_v1_RETRANSMIT */
 	if (st->st_event->ev_type != EVENT_v1_RETRANSMIT) {
		delete_event(st);
                event_schedule_ms(EVENT_v1_RETRANSMIT,
                  		st->st_connection->r_interval, st);
        }

I don't understand how the comment matches the code.  Is the comment
correct?  Is the code?  If both are correct, I suggest the comment
needs expansion to make this clear.

Bonus issue:

- The same comment and code appear in modecfg_send_request.

- The same comment and almost the same code appear in
  modecfg_send_set.

Should this be turned into a function?

Is the difference in the code in modecfg_send_set important?



More information about the Swan-dev mailing list