Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[mms-lib] mms_dispatcher_receive_message should write PDU to file if …
…running with -t

This way it will end up in the tarball generated by MMS Logger app,
and it's generally useful for debugging.
  • Loading branch information
monich committed Mar 7, 2016
1 parent 6a8d50d commit d518839
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mms-lib/src/mms_dispatcher.c
Expand Up @@ -543,10 +543,18 @@ mms_dispatcher_receive_message(
if (pdu) {
MMS_ASSERT(pdu->type == MMS_MESSAGE_TYPE_NOTIFICATION_IND);
if (pdu->type == MMS_MESSAGE_TYPE_NOTIFICATION_IND) {
const MMSConfig* config = disp->settings->config;
ok = mms_dispatcher_queue_and_unref_task(disp,
mms_task_retrieve_new(disp->settings, disp->handler,
id, imsi, pdu, automatic ? MMS_CONNECTION_TYPE_AUTO :
MMS_CONNECTION_TYPE_USER, error));
if (config->keep_temp_files) {
char* dir = mms_message_dir(config, id);
mms_write_bytes(dir, MMS_NOTIFICATION_IND_FILE, bytes, NULL);
g_free(dir);
}
} else {
MMS_ERROR(error, MMS_LIB_ERROR_DECODE, "Inexpected MMS PDU type");
}
mms_message_free(pdu);
} else {
Expand Down

0 comments on commit d518839

Please sign in to comment.