libweave: When XMPP channel created, poll the server for commands once

As soon as we get confirmation that XMPP channel is established, we will
rely on push notification for command delivery from then on. However we
need to make sure there have been no new commands queued since the last
time we polled the server and before XMPPP channel was created.

So, poll the server once more after we have established XMPP channel,
to make sure there is no command pending.

BUG=brillo:1244
TEST=`FEATURES=test emerge-link buffet`

Change-Id: If5801de9008bced3babbc91c9f7e8bec8fe075a6
Reviewed-on: https://chromium-review.googlesource.com/285776
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
2 files changed
tree: 52157621860381f609ec1e4fe169b2cbfb073122
  1. buffet/
  2. libweave/