Fix wrong usage of glib API

Issue #65 resolved
Former user created an issue

[Original issue 65](https://code.google.com/p/mrim-prpl/issues/detail?id=65) created by vincent.untz on 2011-06-01T15:04:46.000Z:

See the patch I'm attaching, it's rather simple. <hr>

Comments (8)

  1. Николай Антонов

    Comment 1 originally posted by ostinru on 2011-06-01T17:19:35.000Z:

    Идея в освобождении памяти или в замене g_ascii_tolower на g_ascii_strdown ?

  2. Former user Account Deleted

    Comment 2 originally posted by vincent.untz on 2011-06-01T19:05:29.000Z:

    Sorry, I don't speak russian, so can't answer your question :-)

  3. Николай Антонов

    Comment 3 originally posted by ostinru on 2011-06-01T19:12:20.000Z:

    what's wrong with original code? memeory leaks or using g_ascii_tolower insted g_ascii_strdown? I am not so good in glib... and english =)

  4. Николай Антонов

    Comment 4 originally posted by ostinru on 2011-06-01T19:26:08.000Z:

    sory... I am so scattered today... Are you OpenSuse maintainer? What is wrong with building? I think, It fix warning... and original code may be very dangerous... so, if this patch applied we should remove line "encoding = g_ascii_tolower( *g_strstrip(encoding) ); TODO test".

  5. Николай Антонов

    Comment 5 originally posted by ostinru on 2011-06-01T19:26:58.000Z:

    sory... I am so scattered today... Are you OpenSuse maintainer? What is wrong with building? I think, It fix warning... and original code may be very dangerous... so, if this patch applied we should remove line "encoding = g_ascii_tolower( *g_strstrip(encoding) ); TODO test".

    all right?

  6. Former user Account Deleted

    Comment 6 originally posted by vincent.untz on 2011-06-02T13:25:25.000Z:

    g_ascii_tolower() doesn't work on a string, but on a character. So you possibly lose the whole string by calling it.

    This was creating a warning during the build, which made the build of a package impossible for openSUSE since this warning is considered critical for us.

    And yes, we should remove the line with the TODO -- the patch already does this :-)

  7. Николай Антонов

    Comment 7 originally posted by ostinru on 2011-06-02T16:41:29.000Z:

    Thanks! Patch accepted. It will include in the next release.

  8. Николай Антонов

    Comment 8 originally posted by ostinru on 2011-06-02T16:59:54.000Z:

    Patch in r302.

  9. Log in to comment