Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Mono_Time an argument to current_time_monotonic #1100

Merged
merged 1 commit into from
Aug 19, 2018

Conversation

zugz
Copy link

@zugz zugz commented Aug 19, 2018

This change is Reviewable

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@iphydf iphydf added this to the v0.2.x milestone Aug 19, 2018
Copy link
Member

@iphydf iphydf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 12 of 12 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @zugz)


testing/av_test.c, line 568 at r1 (raw file):

    initialize_tox(&bootstrap, &AliceAV, &AliceCC, &BobAV, &BobCC);

    const Mono_Time *mono_time = (*(Messenger **)bootstrap)->mono_time;

// TODO(iphydf): Don't depend on toxcore internals


toxav/rtp.c, line 511 at r1 (raw file):

        return session->mcb(session->m->mono_time, session->cs, new_message(&header, length - RTP_HEADER_SIZE,
                            data + RTP_HEADER_SIZE,
                            length - RTP_HEADER_SIZE));

Maybe move this to the line above.


toxcore/mono_time.c, line 42 at r1 (raw file):

    monotime->time = 0;
    monotime->base_time = ((uint64_t)time(nullptr) - (current_time_monotonic(monotime) / 1000ULL));

Remove the outer set of parentheses.


toxcore/net_crypto.c, line 962 at r1 (raw file):

static int handle_request_packet(const Mono_Time *mono_time, const Logger *log, Packets_Array *send_array,
                                 const uint8_t *data, uint16_t length,
                                 uint64_t *latest_send_time, uint64_t rtt_time)

Move to line above.

Copy link
Member

@iphydf iphydf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewed 4 of 4 files at r2.
Reviewable status: 1 change requests, 0 of 1 approvals obtained

@iphydf iphydf merged commit 14484c6 into TokTok:master Aug 19, 2018
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.7 Aug 30, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants