Skip to content

fix(webserver): php_amule_lib_standalone various fixes - #151

Merged
got3nks merged 3 commits into
amule-org:masterfrom
RealGreenDragon:fix_php_amule_lib_standalone
Jun 14, 2026
Merged

fix(webserver): php_amule_lib_standalone various fixes#151
got3nks merged 3 commits into
amule-org:masterfrom
RealGreenDragon:fix_php_amule_lib_standalone

Conversation

@RealGreenDragon

Copy link
Copy Markdown

Fixes

  • Fixed printf in php_native_ed2k_download_cmd function (copy-paste issue)
  • Removed string check from php_native_search_download_cmd and php_native_ed2k_download_cmd functions (useless as the value is cast to int, so an int parameter value can be accepted, as happens in other functions such as php_native_server_cmd)
  • Removed duplicated #include <map>

Doubts and Suggestions

  • php_native_search_start_cmd argument 4 (search type) is parsed but not assigned to any variable → add int search_type = si->var->value.int_val; and replace type=%s with file_type=%s\nsearch_type=%d in printf

If you can help me clarify the doubts, I will apply the suggested changes in this PR.

@RealGreenDragon RealGreenDragon changed the title fi(webserver): php_amule_lib_standalone various fixes fix(webserver): php_amule_lib_standalone various fixes Jun 14, 2026

@got3nks got3nks left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Verified:

  • #include <map> duplication confirmed at lines 31 + 38.
  • printf copy-paste bug — clear fix.
  • String-check removal matches php_native_server_cmd pattern; the subsequent cast_value_dnum handles type conversion correctly.

On the doubt: yes, php_native_search_start_cmd argument 4 (search type) being parsed but unused is a real loose end. Suggested addition is reasonable. Would prefer it in a separate PR though — keep this one tight on the three fixes you've listed. Open a follow-up and link it here?

Approving.

@got3nks
got3nks merged commit 4087567 into amule-org:master Jun 14, 2026
10 checks passed
@RealGreenDragon
RealGreenDragon deleted the fix_php_amule_lib_standalone branch June 14, 2026 12:24
got3nks added a commit that referenced this pull request Jun 14, 2026
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.

2 participants