comparison mcabber/mcabber/utils.c @ 1910:3695266e16c7

Fix error presence packet handling. This should also fix the segfault reported by pbd in issue #56.
author Mikael Berthe <mikael@lilotux.net>
date Thu, 13 May 2010 12:26:48 +0200
parents efd7c4c34ff2
children 0ba755e5dc48
comparison
equal deleted inserted replaced
1909:9c14153e2580 1910:3695266e16c7
63 char *jidtodisp(const char *fjid) 63 char *jidtodisp(const char *fjid)
64 { 64 {
65 char *ptr; 65 char *ptr;
66 char *alias; 66 char *alias;
67 67
68 if (!fjid) {
69 scr_LogPrint(LPRINT_LOGNORM, "** jidtodisp: NULL JID, "
70 "this is probably a bug, please report!");
71 return NULL;
72 }
73
68 alias = g_strdup(fjid); 74 alias = g_strdup(fjid);
69 75
70 if ((ptr = strchr(alias, JID_RESOURCE_SEPARATOR)) != NULL) { 76 if ((ptr = strchr(alias, JID_RESOURCE_SEPARATOR)) != NULL) {
71 *ptr = 0; 77 *ptr = 0;
72 } 78 }