changed pollForMessages() impl
This commit is contained in:
@@ -28,7 +28,6 @@ print_r($mc->login($contact['pub_key'], readline('Please enter the password: '))
|
||||
|
||||
$result = $mc->statusRequest($contact['pub_key']);
|
||||
print_r($result);
|
||||
exit;
|
||||
|
||||
$msg = $mc->pollForMessage($result->tag);
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ $repeaters = ['Simpsonville 3810gvr1', 'Simpsonville im37r1'];
|
||||
$contacts = $mc->getContacts();
|
||||
|
||||
echo "Found " . count($contacts) . " contacts\n";
|
||||
|
||||
/*
|
||||
$idx = 1;
|
||||
foreach($contacts as $contact) {
|
||||
@@ -46,11 +47,13 @@ foreach($contacts as $contact) {
|
||||
|
||||
echo "Tag: {$result->tag}\n";
|
||||
|
||||
$msg = $mc->pollForMessage($result->tag);
|
||||
$msgs = $mc->pollForMessage($result->tag);
|
||||
|
||||
echo json_encode($msg->lpp) . "\n";
|
||||
|
||||
sleep(1);
|
||||
foreach($msgs as $msg) {
|
||||
if( $msg->tag == $result->tag) {
|
||||
echo json_encode($msg->lpp) . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "Complete\n";
|
||||
|
||||
Reference in New Issue
Block a user