Mercurial > pidgin.yaz
comparison src/conversation.c @ 1067:649199f4730e
[gaim-migrate @ 1077]
more attempts to prevent segfaults due to logging
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 04 Nov 2000 20:20:27 +0000 |
parents | e1408fb04c36 |
children | 81d19577285a |
comparison
equal
deleted
inserted
replaced
1066:d6c70d58a4b2 | 1067:649199f4730e |
---|---|
1221 if (c->is_chat) | 1221 if (c->is_chat) |
1222 g_snprintf(nm, 256, "%s.chat", c->name); | 1222 g_snprintf(nm, 256, "%s.chat", c->name); |
1223 else | 1223 else |
1224 g_snprintf(nm, 256, "%s", c->name); | 1224 g_snprintf(nm, 256, "%s", c->name); |
1225 fd = open_log_file(nm); | 1225 fd = open_log_file(nm); |
1226 if (general_options & OPT_GEN_STRIP_HTML) { | 1226 if (fd > 0) { |
1227 fprintf(fd, "%s\n", t1); | 1227 if (general_options & OPT_GEN_STRIP_HTML) { |
1228 } else { | 1228 fprintf(fd, "%s\n", t1); |
1229 fprintf(fd, "%s<BR>\n", t1); | 1229 } else { |
1230 fprintf(fd, "%s<BR>\n", t1); | |
1231 } | |
1232 fclose(fd); | |
1230 } | 1233 } |
1231 fclose(fd); | |
1232 if (general_options & OPT_GEN_STRIP_HTML) { | 1234 if (general_options & OPT_GEN_STRIP_HTML) { |
1233 g_free(t1); | 1235 g_free(t1); |
1234 } | 1236 } |
1235 } | 1237 } |
1236 | 1238 |
1316 } else { | 1318 } else { |
1317 t1 = buf; | 1319 t1 = buf; |
1318 t2 = what; | 1320 t2 = what; |
1319 } | 1321 } |
1320 fd = open_log_file(nm); | 1322 fd = open_log_file(nm); |
1321 if (general_options & OPT_GEN_STRIP_HTML) { | 1323 if (fd > 0) { |
1322 fprintf(fd, "%s%s\n", t1, t2); | 1324 if (general_options & OPT_GEN_STRIP_HTML) { |
1323 } else { | 1325 fprintf(fd, "%s%s\n", t1, t2); |
1324 fprintf(fd, "%s%s<BR>\n", t1, t2); | 1326 } else { |
1327 fprintf(fd, "%s%s<BR>\n", t1, t2); | |
1328 } | |
1329 fclose(fd); | |
1325 } | 1330 } |
1326 fclose(fd); | |
1327 if (general_options & OPT_GEN_STRIP_HTML) { | 1331 if (general_options & OPT_GEN_STRIP_HTML) { |
1328 g_free(t1); | 1332 g_free(t1); |
1329 g_free(t2); | 1333 g_free(t2); |
1330 } | 1334 } |
1331 g_free(nm); | 1335 g_free(nm); |