libmetalink-0.1.3-ns_uri.patch 997 B

12345678910111213141516171819202122
  1. diff -urp libmetalink-0.1.3.orig/lib/metalink_pstate.c libmetalink-0.1.3/lib/metalink_pstate.c
  2. --- libmetalink-0.1.3.orig/lib/metalink_pstate.c 2012-08-12 04:43:53.000000000 -0400
  3. +++ libmetalink-0.1.3/lib/metalink_pstate.c 2020-07-22 17:03:21.205852103 -0400
  4. @@ -100,7 +100,7 @@ void initial_state_start_fun(metalink_ps
  5. const char** attrs)
  6. {
  7. if(strcmp("metalink", name) == 0) {
  8. - if (strcmp(METALINK_V3_NS_URI, ns_uri) == 0) {
  9. + if (ns_uri && strcmp(METALINK_V3_NS_URI, ns_uri) == 0) {
  10. const char* type;
  11. const char* origin;
  12. metalink_pctrl_set_version(stm->ctrl, METALINK_VERSION_3);
  13. @@ -116,7 +116,7 @@ void initial_state_start_fun(metalink_ps
  14. metalink_pstm_enter_metalink_state(stm);
  15. }
  16. - else if (strcmp(METALINK_V4_NS_URI, ns_uri) == 0) {
  17. + else if (ns_uri && strcmp(METALINK_V4_NS_URI, ns_uri) == 0) {
  18. metalink_pctrl_set_version(stm->ctrl, METALINK_VERSION_4);
  19. metalink_pstm_enter_metalink_state_v4(stm);
  20. } else {