Update of /cvsroot/gaim/gaim/src/protocols/oscar
In directory sc8-pr-cvs1:/tmp/cvs-serv16906/src/protocols/oscar
Modified Files:
bstream.c oscar.c
Log Message:
I introduced a bug with my extended ICQ info that caused AIM unicode
messages to get dropped. This fixes that. I am such a clumsy
American. Oh, thanks a bunch to cool people for helping me test this.
Index: bstream.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/bstream.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- bstream.c 28 Feb 2003 04:26:36 -0000 1.2
+++ bstream.c 3 Mar 2003 07:43:55 -0000 1.3
@@ -231,15 +231,9 @@
return NULL;
}
- if (ob[0] == '\0') {
- free(ob);
- return NULL;
- }
-
ob[len] = '\0';
- return ob;
-}
+ return ob;}
faim_internal int aimbs_putraw(aim_bstream_t *bs, const fu8_t *v, int len)
{
Index: oscar.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- oscar.c 2 Mar 2003 18:48:01 -0000 1.252
+++ oscar.c 3 Mar 2003 07:43:55 -0000 1.253
@@ -2016,7 +2016,7 @@
if (!args->msg || !args->msglen)
return 1;
-
+
tmp = g_convert(args->msg, args->msglen, "UTF-8", "UCS-2BE", NULL, &convlen, &err);
if (err) {
debug_printf("Unicode IM conversion: %s\n", err->message);
@@ -3520,26 +3520,27 @@
g_snprintf(who, sizeof(who), "%lu", info->uin);
buf = g_strdup_printf("<b>UIN:</b> %s", who);
- if (info->nick) {
+ if (info->nick && info->nick[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Nick:</b> ", info->nick, NULL); g_free(tmp);
serv_got_alias(gc, who, info->nick);
}
- if (info->first) {
+ if (info->first && info->first[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>First Name:</b> ", info->first, NULL); g_free(tmp);
}
- if (info->last) {
+ if (info->last && info->last[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Last Name:</b> ", info->last, NULL); g_free(tmp);
}
- if (info->email) {
+ if (info->email && info->email[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Email Address:</b> <a href=\"mailto:", info->email, "\">", info->email, "</a>", NULL); g_free(tmp);
}
if (info->numaddresses && info->email2) {
int i;
for (i = 0; i < info->numaddresses; i++) {
+ if (info->email2[i] && info->email2[i][0])
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Email Address:</b> <a href=\"mailto:", info->email2[i], "\">", info->email2[i], "</a>", NULL); g_free(tmp);
}
}
- if (info->mobile) {
+ if (info->mobile && info->mobile[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Mobile Phone:</b> ", info->mobile, NULL); g_free(tmp);
}
if (info->gender) {
@@ -3559,57 +3560,57 @@
snprintf(age, sizeof(age), "%hhd", info->age);
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Age:</b> ", age, NULL); g_free(tmp);
}
- if (info->personalwebpage) {
+ if (info->personalwebpage && info->personalwebpage[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Personal Web Page:</b> <a href=\"", info->personalwebpage, "\">", info->personalwebpage, "</a>", NULL); g_free(tmp);
}
- if (info->info) {
+ if (info->info && info->info[0]) {
tmp = buf; buf = g_strconcat(tmp, "<hr><b>Additional Information:</b><br>", info->info, NULL); g_free(tmp);
}
tmp = buf; buf = g_strconcat(tmp, "<hr>\n", NULL); g_free(tmp);
- if (info->homeaddr || info->homecity || info->homestate || info->homezip) {
+ if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) {
tmp = buf; buf = g_strconcat(tmp, "<b>Home Address:</b>", NULL); g_free(tmp);
- if (info->homeaddr) {
+ if (info->homeaddr && info->homeaddr[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Address:</b> ", info->homeaddr, NULL); g_free(tmp);
}
- if (info->homecity) {
+ if (info->homecity && info->homecity[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>City:</b> ", info->homecity, NULL); g_free(tmp);
}
- if (info->homestate) {
+ if (info->homestate && info->homestate[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>State:</b> ", info->homestate, NULL); g_free(tmp);
}
- if (info->homezip) {
+ if (info->homezip && info->homezip[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Zip Code:</b> ", info->homezip, NULL); g_free(tmp);
}
tmp = buf; buf = g_strconcat(tmp, "\n<hr>\n", NULL); g_free(tmp);
}
- if (info->workaddr || info->workcity || info->workstate || info->workzip) {
+ if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) {
tmp = buf; buf = g_strconcat(tmp, "<b>Work Address:</b>", NULL); g_free(tmp);
- if (info->workaddr) {
+ if (info->workaddr && info->workaddr[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Address:</b> ", info->workaddr, NULL); g_free(tmp);
}
- if (info->workcity) {
+ if (info->workcity && info->workcity[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>City:</b> ", info->workcity, NULL); g_free(tmp);
}
- if (info->workstate) {
+ if (info->workstate && info->workstate[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>State:</b> ", info->workstate, NULL); g_free(tmp);
}
- if (info->workzip) {
+ if (info->workzip && info->workzip[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Zip Code:</b> ", info->workzip, NULL); g_free(tmp);
}
tmp = buf; buf = g_strconcat(tmp, "\n<hr>\n", NULL); g_free(tmp);
}
- if (info->workcompany || info->workdivision || info->workposition || info->workwebpage) {
+ if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) {
tmp = buf; buf = g_strconcat(tmp, "<b>Work Information:</b>", NULL); g_free(tmp);
- if (info->workcompany) {
+ if (info->workcompany && info->workcompany[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Company:</b> ", info->workcompany, NULL); g_free(tmp);
}
- if (info->workdivision) {
+ if (info->workdivision && info->workdivision[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Division:</b> ", info->workdivision, NULL); g_free(tmp);
}
- if (info->workposition) {
+ if (info->workposition && info->workposition[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Position:</b> ", info->workposition, NULL); g_free(tmp);
}
- if (info->workwebpage) {
+ if (info->workwebpage && info->workwebpage[0]) {
tmp = buf; buf = g_strconcat(tmp, "\n<br><b>Web Page:</b> <a href=\"", info->workwebpage, "\">", info->workwebpage, "</a>", NULL); g_free(tmp);
}
tmp = buf; buf = g_strconcat(tmp, "\n<hr>\n", NULL); g_free(tmp);
|