| 839 } |
839 } |
| 840 |
840 |
| 841 static void |
841 static void |
| 842 append_escaped_string(PurpleCipherContext *context, const gchar *str) |
842 append_escaped_string(PurpleCipherContext *context, const gchar *str) |
| 843 { |
843 { |
| 844 char *tmp = g_markup_escape_text(str, -1); |
844 if (str && *str) { |
| 845 purple_cipher_context_append(context, (const guchar *)tmp, strlen(tmp)); |
845 char *tmp = g_markup_escape_text(str, -1); |
| 846 g_free(tmp); |
846 purple_cipher_context_append(context, (const guchar *)tmp, strlen(tmp)); |
| |
847 g_free(tmp); |
| |
848 } |
| |
849 |
| 847 purple_cipher_context_append(context, (const guchar *)"<", 1); |
850 purple_cipher_context_append(context, (const guchar *)"<", 1); |
| 848 } |
851 } |
| 849 |
852 |
| 850 gchar *jabber_caps_calculate_hash(JabberCapsClientInfo *info, const char *hash) |
853 gchar *jabber_caps_calculate_hash(JabberCapsClientInfo *info, const char *hash) |
| 851 { |
854 { |