#46 (Partial) Fix for Windows string issue

closed-accepted
None
5
2011-03-11
2011-03-08
No

UpnpGetIfInfo uses PIP_ADAPTER_ADDRESSES structure, which with VC uses wchar strings (no ANSI version seems to exist). This fix simply converts from the wchar string to a char string using wcstombs - which will work in some cases, but obviously not all.

Full fix would probably be to use typedef'd string types for related variables, but that would require a huge change.

Discussion

  • Marcelo Roberto Jimenez

    Patch seems ok, although I must warn you, I do not have a windows system here to compile it, so be careful or people will be whining all over you :)

    Please, remove the name tags and use git.

    Regards,
    Marcelo.

     
  • - 2011-03-11

    Hi Marcelo,

    Uploaded new patch.

    Thanks for the warning! It's something I'm aware of - but the bug here is something that will compile, but could never work (at least on some systems), so I'm prepared to take some flak if it means it gets fixed for everyone! I've done my best to ensure it works.

    Thanks,
    Iain

     
  • - 2011-03-11
    • summary: (Partial) Fix for VC++ string issue --> (Partial) Fix for Windows string issue
     
  • Marcelo Roberto Jimenez

    • assigned_to: nobody --> mroberto
    • status: open --> closed-accepted
     
  • Marcelo Roberto Jimenez

    Hi Iain,

    Ok, patch accepted, thanks!

    Please, watch out for trailing white spaces, git complains when adding a patch with them. It should be easy to configure your text editor to remove them.

    Regards,
    Marcelo.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks