Home | History | Annotate | Download | only in ServiceRegistration

Lines Matching defs:active_update

128     update_context_t *active_update;
775 if (client->active_update != NULL) {
776 update_finalize(client->active_update);
777 client->active_update = NULL;
782 if (client->active_update == NULL) {
792 if (client->active_update->interface_serial != interface_serial) {
793 client->active_update->next_retransmission_time = INITIAL_NEXT_RETRANSMISSION_TIME;
794 client->active_update->next_attempt_time = INITIAL_NEXT_ATTEMPT_TIME;
1045 // Remember the server we connected with. active_update and active_update->server should always be
1047 if (client->active_update != NULL) {
1048 if (client->active_update->server != NULL) {
1051 if (client->active_update->server->rr.type != client->stable_server.rr.type ||
1053 ? memcmp(&client->stable_server.rr.data, &client->active_update->server->rr.data, 4)
1055 ? memcmp(&client->stable_server.rr.data, &client->active_update->server->rr.data, 16)
1057 memcmp(client->stable_server.port, client->active_update->server->port, 2))
1059 memcpy(&client->stable_server, client->active_update->server, sizeof(client->stable_server));
1062 sync_to_stable_storage(client->active_update);
1064 client->active_update->interface_serial = interface_serial;
1185 if (client->active_update != NULL) {
1186 client->active_update->serial = client->registration_serial;
1514 if (client->active_update != NULL) {
1515 update_finalize(client->active_update);
1516 client->active_update = NULL;
1532 if (!definite && client->active_update != NULL && client->registration_serial == client->active_update->serial) {
1535 if (server == client->active_update->server) {
1539 if (client->active_update->interface_serial == interface_serial && !server_changed) {
1551 if (client->active_update != NULL) {
1552 update_finalize(client->active_update);
1553 client->active_update = NULL;
1557 update_context_t *active_update = calloc(1, sizeof(*active_update));
1558 if (active_update == NULL) {
1562 active_update->client = client;
1563 sync_from_stable_storage(active_update);
1564 if (active_update->server == NULL) {
1565 active_update->server = servers;
1567 active_update->serial = client->registration_serial;
1568 active_update->message = NULL;
1569 active_update->message_length = 0;
1570 active_update->lease_time = client->lease_time;
1571 active_update->key_lease_time = client->key_lease_time;
1572 err = srp_make_udp_context(client->os_context, &active_update->udp_context, udp_response, active_update);
1576 active_update->next_retransmission_time = INITIAL_NEXT_RETRANSMISSION_TIME;
1577 active_update->next_attempt_time = INITIAL_NEXT_ATTEMPT_TIME;
1578 err = srp_set_wakeup(client->os_context, active_update->udp_context, srp_random16() % 1023, udp_retransmit);
1581 client->active_update = active_update;
1602 if (client->active_update == NULL) {
1609 if (rp->serial <= client->active_update->serial && rp->succeeded) {
1616 if (client->active_update->message) {
1617 free(client->active_update->message);
1618 client->active_update->message = NULL;
1620 client->active_update->removing = true;
1621 client->active_update->next_retransmission_time = INITIAL_NEXT_RETRANSMISSION_TIME;
1622 client->active_update->next_attempt_time = INITIAL_NEXT_ATTEMPT_TIME;
1623 udp_retransmit(client->active_update);
1648 if (client->active_update != NULL) {
1649 if (client->active_update->message) {
1650 free(client->active_update->message);
1651 client->active_update->message = NULL;
1653 client->active_update->next_retransmission_time = INITIAL_NEXT_RETRANSMISSION_TIME;
1654 client->active_update->next_attempt_time = INITIAL_NEXT_ATTEMPT_TIME;
1655 udp_retransmit(client->active_update);