Skip to content

Origin/local#3

Open
dulalsaurab wants to merge 3 commits into
localfrom
origin/local
Open

Origin/local#3
dulalsaurab wants to merge 3 commits into
localfrom
origin/local

Conversation

@dulalsaurab

Copy link
Copy Markdown
Owner

No description provided.

Comment thread examples/producer.cpp
#include <list>
#include <iostream>

// #include <list>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why not just remove?

auto timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(timeDiff);

int status = (timeToExpire > m_producerState.serviceLifetime) ? EXPIRED : ACTIVE;
m_serviceStatus = (timeToExpire > m_producerState.serviceLifetime) ? EXPIRED : ACTIVE;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Move lines 211-214 to wireEncode too.
And you need to still have a local variable serviceStatus
and then check with global variable. Otherwise no need to wireEncode again.

ServiceDiscovery::wireEncode(const std::string& info, int status)
ServiceDiscovery::wireEncode()
{
if (m_wire.hasWire())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If hasWire, you should simply resend. The below string should be saved in a class member and then reset wire when this string is modified/updated.


wire.parse();
m_wire = wire;
ndn::Block::element_const_iterator it = wire.elements_begin();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

auto

@agawande agawande left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

2 participants