Skip to content
Permalink
Browse files
[mms_task_encode] Don't encode empty subject
org_nemomobile_mms_engine_call_send_message_sync doesn't like NULL subjects
so we have to pass an empty string instead.
  • Loading branch information
monich committed Apr 3, 2014
1 parent 341ec2d commit 35f8891cec4aede359a6b9fb185bb2074794e584
Showing with 4 additions and 2 deletions.
  1. +3 −1 mms-lib/src/mms_task_encode.c
  2. +1 −1 mms-send/mms-send.c
@@ -152,7 +152,9 @@ mms_encode_job_encode(
mms->sr.to = g_strdup(enc->to);
mms->sr.cc = g_strdup(enc->cc);
mms->sr.bcc = g_strdup(enc->bcc);
mms->sr.subject = g_strdup(enc->subject);
if (enc->subject && enc->subject[0]) {
mms->sr.subject = g_strdup(enc->subject);
}
mms->sr.dr = ((flags & MMS_SEND_FLAG_REQUEST_DELIVERY_REPORT) != 0);
mms->sr.rr = ((flags & MMS_SEND_FLAG_REQUEST_READ_REPORT) != 0);
mms->sr.content_type = mms_unparse_http_content_type((char**)ct);
@@ -105,7 +105,7 @@ int main(int argc, char* argv[])
int ret = RET_ERR_CMDLINE;
gboolean ok, verbose = FALSE, dr = FALSE, rr = FALSE;
GError* error = NULL;
char* subject = NULL;
char* subject = "";
GOptionEntry entries[] = {
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
"Enable verbose output", NULL },

0 comments on commit 35f8891

Please sign in to comment.