projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ca8cef2
)
Check for NULL in tny_header_get_message_id()
author
Alberto Garcia
<agarcia@igalia.com>
Tue, 4 Dec 2007 10:34:15 +0000
(10:34 +0000)
committer
Alberto Garcia
<agarcia@igalia.com>
Tue, 4 Dec 2007 10:34:15 +0000
(10:34 +0000)
pmo-trunk-r3860
src/modest-mail-operation.c
patch
|
blob
|
history
diff --git
a/src/modest-mail-operation.c
b/src/modest-mail-operation.c
index
547c959
..
45a5455
100644
(file)
--- a/
src/modest-mail-operation.c
+++ b/
src/modest-mail-operation.c
@@
-673,11
+673,15
@@
send_mail_msg_sent_handler (TnySendQueue *queue, TnyHeader *header, TnyMsg *msg,
{
SendMsgInfo *info = (SendMsgInfo *) userdata;
TnyHeader *hdr1, *hdr2;
{
SendMsgInfo *info = (SendMsgInfo *) userdata;
TnyHeader *hdr1, *hdr2;
+ const char *msgid1, *msgid2;
hdr1 = tny_msg_get_header(msg);
hdr2 = tny_msg_get_header(info->msg);
hdr1 = tny_msg_get_header(msg);
hdr2 = tny_msg_get_header(info->msg);
+ msgid1 = tny_header_get_message_id(hdr1);
+ msgid2 = tny_header_get_message_id(hdr2);
+ if (msgid1 == NULL) msgid1 = "(null)";
+ if (msgid2 == NULL) msgid2 = "(null)";
- if (!strcmp (tny_header_get_message_id(hdr1),
- tny_header_get_message_id(hdr2))) {
+ if (!strcmp (msgid1, msgid2)) {
ModestMailOperationPrivate *priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op);
priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS;
ModestMailOperationPrivate *priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op);
priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS;
@@
-695,9
+699,15
@@
send_mail_error_happened_handler (TnySendQueue *queue, TnyHeader *header, TnyMsg
TnyHeader *hdr1, *hdr2;
hdr1 = tny_msg_get_header(msg);
hdr2 = tny_msg_get_header(info->msg);
TnyHeader *hdr1, *hdr2;
hdr1 = tny_msg_get_header(msg);
hdr2 = tny_msg_get_header(info->msg);
+ const char *msgid1, *msgid2;
+ hdr1 = tny_msg_get_header(msg);
+ hdr2 = tny_msg_get_header(info->msg);
+ msgid1 = tny_header_get_message_id(hdr1);
+ msgid2 = tny_header_get_message_id(hdr2);
+ if (msgid1 == NULL) msgid1 = "(null)";
+ if (msgid2 == NULL) msgid2 = "(null)";
- if (!strcmp (tny_header_get_message_id(hdr1),
- tny_header_get_message_id(hdr2))) {
+ if (!strcmp (msgid1, msgid2)) {
ModestMailOperationPrivate *priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op);
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
ModestMailOperationPrivate *priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op);
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,