Libgourou

Libgourou Commit Details

Date:2023-01-06 21:17:57 (5 months 2 days ago)
Author:Grégory Soutadé
Branch:master, turco
Commit:fc839e671aba819d217bd957575237dbf6a45b2c
Parents: ab5afa50038e987da7d92794564df45382b3d1a0
Message:Manage ACSM files that contains server internal error

Changes:
Minclude/libgourou_common.h (1 diff)
Msrc/libgourou.cpp (2 diffs)

File differences

include/libgourou_common.h
6464
6565
6666
67
67
68
6869
6970
7071
FF_INVALID_ACSM_FILE,
FF_NO_HMAC_IN_ACSM_FILE,
FF_NOT_ACTIVATED,
FF_NO_OPERATOR_URL
FF_NO_OPERATOR_URL,
FF_SERVER_INTERNAL_ERROR
};
enum DOWNLOAD_ERROR {
src/libgourou.cpp
505505
506506
507507
508
509
510
511
512
513
514
508515
509516
510517
......
512519
513520
514521
515
522
516523
517524
518525
if (!acsmDoc.load_file(ACSMFile.c_str(), pugi::parse_ws_pcdata_single|pugi::parse_escapes, pugi::encoding_utf8))
EXCEPTION(FF_INVALID_ACSM_FILE, "Invalid ACSM file " << ACSMFile);
// Could be an server internal error
pugi::xml_node rootNode = acsmDoc.first_child();
if (std::string(rootNode.name()) == "error")
{
EXCEPTION(FF_SERVER_INTERNAL_ERROR, rootNode.attribute("data").value());
}
GOUROU_LOG(INFO, "Fulfill " << ACSMFile);
// Build req file
buildFulfillRequest(acsmDoc, fulfillReq);
pugi::xpath_node root = fulfillReq.select_node("//adept:fulfill");
pugi::xml_node rootNode = root.node();
rootNode = root.node();
// Remove HMAC
pugi::xpath_node xpathRes = fulfillReq.select_node("//hmac");

Archive Download the corresponding diff file