www-cpp.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. diff -Nuar a/src/WWW.cpp b/src/WWW.cpp
  2. --- a/src/WWW.cpp 2017-11-19 06:12:23.000000000 +0300
  3. +++ b/src/WWW.cpp 2018-09-14 22:22:41.605721326 +0300
  4. @@ -206,7 +206,7 @@
  5. std::string v_www_agent = WWW_AGENT;
  6. /* open the file */
  7. - if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) {
  8. + if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == NULL) {
  9. throw Exception("error : unable to open output file "
  10. + v_local_file_tmp);
  11. }
  12. @@ -320,7 +320,7 @@
  13. LogInfo(std::string("Uploading replay " + p_replayFilename).c_str());
  14. /* open the file */
  15. - if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
  16. + if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
  17. throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR"));
  18. }
  19. @@ -478,7 +478,7 @@
  20. LogInfo("Sending vote");
  21. /* open the file */
  22. - if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
  23. + if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
  24. throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV"));
  25. }
  26. @@ -562,7 +562,7 @@
  27. LogInfo("Sending report");
  28. /* open the file */
  29. - if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
  30. + if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
  31. throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR"));
  32. }
  33. @@ -677,7 +677,7 @@
  34. LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str());
  35. /* open the file */
  36. - if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) {
  37. + if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == NULL) {
  38. throw Exception("error : unable to open output file " + p_answerFile);
  39. }