Propagated hash fix (new management) to api

This commit is contained in:
xdrm-brackets 2017-01-28 19:00:50 +01:00
parent 542d7384d4
commit c8e0cf2108
1 changed files with 11 additions and 11 deletions

View File

@ -30,18 +30,10 @@
return 127;
}
/* (4) Decrement the hash */
$decr = syscall(SOURCE_DIR.'/lib/cyclic-hash/decr');
if( $decr === false ){
slog("cyclic-hash:decr returned $decr EXIT_STATUS", 'api:sync');
return 127;
}
/* (5) Generate the multipart boundary */
/* (4) Generate the multipart boundary */
$boundary = 'boundary--'.hash('sha512', uniqid()).'--boundary';
/* (6) Fetch data */
/* (5) Fetch data */
$data = json_decode(syscall(SOURCE_DIR.'/lib/api/fetch'));
if( is_null($data) ){
@ -114,7 +106,15 @@
/* [6] Decrement cyclic-hash so request has ran successfully
=========================================================*/
/* (1) Decrement the hash */
$decr = syscall(SOURCE_DIR.'/lib/cyclic-hash/decr');
if( $decr === false ){
slog("cyclic-hash:decr returned $decr EXIT_STATUS", 'api:sync');
return 127;
}