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

Do PROLOG and fallback to CONTACT if supported #852

Closed
wants to merge 3 commits into from

Conversation

eduardomozart
Copy link
Contributor

@eduardomozart eduardomozart commented Feb 6, 2025

Fix #851. I just flipped the "if" to do PROLOG first and fallback to CONTACT, this makes the Supported tasks be available on GLPI server before the inventory is made the first time.

@g-bougard
Copy link
Member

Hi @eduardomozart

thank you for the attempt, but I will implement myself a fix, and be sure I still have some though on the right way to do it.

Actually, as this problem concerns the core part of glpi-agent and there are too many sensible parts around, I really prefer to handle it myself. Just be patient.

@g-bougard g-bougard closed this Feb 6, 2025
@eduardomozart
Copy link
Contributor Author

No problem, just wanted to help. Not sure how to handle it properly if not this way because GLPI server seems to reject any first request attempt without proper PROLOG. I believe the solution you'll find will be similar to the one in this PR. Maybe create a variable to track last inventory date and if it doesn't exists do a PROLOG first, or as you said if it's a JSON do a PROLOG, but it could cause a PROLOG be sent twice with the code as it is today.

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.

GLPI-Agent do not send CONTACT on first inventory
2 participants