Not using the ip address directly in the url building code is standard practice for decent programming. If changes were to be made to the ip address, to add a specific port for instance or because exceptionally the loopback interface points to a different address, only one variable needs modified in the code, instead of having to search for all the occurrences through the whole project to change them.
Using sprintf should always give the right result here as long as the value of local_ip does not change (which is why it's recommended practice to define such values as constant, in this case 'const char' rather than 'char' to ensure that the value can never be modified (except in cases of corruption of course). With C/C++, there is also always the risk of memory corruption changing the value. I doubt it here but it is always in the realm of possibilities.
If you can recompile WMM however you can try & see if removing the local_ip replacement in sprintf makes a difference..
I cannot test anything until tonight so if someone wants to give it a shot, here is what you should do (for the launchpad only):
1. Open the file game_html.h in the include directory.
2. Change line 1300:
Code:
flen = sprintf(tempstr, "http://%s/mount_ps3%s%s/%s", local_ip, neth, param, enc_dir_name);
becomes
Code:
flen = sprintf(tempstr, "http://127.0.0.1/mount_ps3%s%s/%s", neth, param, enc_dir_name);
3. Change line 1405:
Code:
flen = sprintf(tempstr, "http://%s/mount_ps3%s/%s", local_ip, param, enc_dir_name);
becomes
Code:
flen = sprintf(tempstr, "http://127.0.0.1/mount_ps3%s/%s", param, enc_dir_name);
I think that is sufficient for the launchpad.
Recompile & run...
My guess is that the issue isn't there though but later during the url processing in the function
add_launchpad_entry(..) line 693.
Maybe the character replacement algorithm or whatever fails but modifies the string with an added forward slash...?
To see the evolution of the value of the url & xml strings during processing in add_launchpad_entry() without debugging, you could for example add a line of code to get a pop-up message with the value like this:
.
To see if the url is ok before it is added to the xml, the best is to check the value before further processing.
Insert the line of code above line 697 & recompile. When you run it, as soon as the launchpad file gets created, the pop-up will show you the url before xml is processed.
Eventually you could also insert
.
in line 741, just before the "return size;" instruction to get a second pop up with the xml fragments containing the url after processing...
Instead of displaying a pop-up we could write the info to a file or whatever...
Warning: test with only one or 2 games though otherwise you will have an avalanche of pop-ups.... Lol