From: Ronald Tessier <ronald.tessier@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH 08/12] store: Define MMS_META_UUID_XXX len and suffix
Date: Fri, 17 Aug 2012 16:35:09 +0200 [thread overview]
Message-ID: <1345214113-25597-9-git-send-email-ronald.tessier@linux.intel.com> (raw)
In-Reply-To: <1345214113-25597-1-git-send-email-ronald.tessier@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1770 bytes --]
---
src/store.c | 8 +++-----
src/store.h | 5 +++++
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/store.c b/src/store.c
index b09c17b..f1c5714 100644
--- a/src/store.c
+++ b/src/store.c
@@ -42,8 +42,6 @@
#define TFR
#endif
-#define MMS_SHA1_UUID_LEN 20
-
static const char *digest_to_str(const unsigned char *digest)
{
static char buf[MMS_SHA1_UUID_LEN * 2 + 1];
@@ -293,7 +291,7 @@ void mms_store_remove(const char *service_id, const char *uuid)
unlink(pdu_path);
- meta_path = g_strdup_printf("%s%s", pdu_path, ".status");
+ meta_path = g_strdup_printf("%s%s", pdu_path, MMS_META_UUID_SUFFIX);
g_free(pdu_path);
@@ -312,7 +310,7 @@ GKeyFile *mms_store_meta_open(const char *service_id, const char *uuid)
if (pdu_path == NULL)
return NULL;
- meta_path = g_strdup_printf("%s%s", pdu_path, ".status");
+ meta_path = g_strdup_printf("%s%s", pdu_path, MMS_META_UUID_SUFFIX);
g_free(pdu_path);
@@ -337,7 +335,7 @@ static void meta_store_sync(const char *service_id, const char *uuid,
if (pdu_path == NULL)
return;
- meta_path = g_strdup_printf("%s%s", pdu_path, ".status");
+ meta_path = g_strdup_printf("%s%s", pdu_path, MMS_META_UUID_SUFFIX);
g_free(pdu_path);
diff --git a/src/store.h b/src/store.h
index ba2c080..fb2ca9f 100644
--- a/src/store.h
+++ b/src/store.h
@@ -19,6 +19,11 @@
*
*/
+#define MMS_SHA1_UUID_LEN 20
+#define MMS_META_UUID_SUFFIX ".status"
+#define MMS_META_UUID_SUFFIX_LEN 7
+#define MMS_META_UUID_LEN (MMS_SHA1_UUID_LEN * 2)
+
const char *mms_store(const char *service_id, unsigned char *pdu,
unsigned int len);
const char *mms_store_file(const char *service_id, const char *path);
--
1.7.9.5
next prev parent reply other threads:[~2012-08-17 14:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 14:35 [PATCH 00/12] mmsd: Support Delivery Report notification Ronald Tessier
2012-08-17 14:35 ` [PATCH 01/12] mmsutil: Define mms_delivery_ind struct Ronald Tessier
2012-08-17 14:35 ` [PATCH 02/12] mmsutil: Decode delivery_ind msg Ronald Tessier
2012-08-17 14:35 ` [PATCH 03/12] service: Store msg_id provided by M-Send.conf PDU Ronald Tessier
2012-08-17 14:35 ` [PATCH 04/12] service: Move mms_address_to_string() up Ronald Tessier
2012-08-17 14:35 ` [PATCH 05/12] service: Add a group [delivery_status] in the msg status Ronald Tessier
2012-08-17 14:35 ` [PATCH 06/12] service: Support M-Delivery.ind in mms_service_push_notify() Ronald Tessier
2012-08-17 14:35 ` [PATCH 07/12] service: Support delivery_ind notif on start Ronald Tessier
2012-08-17 14:35 ` Ronald Tessier [this message]
2012-08-17 14:35 ` [PATCH 09/12] service: Process delivery_ind notification Ronald Tessier
2012-08-17 14:35 ` [PATCH 10/12] service: Send a delivery changed signal Ronald Tessier
2012-08-17 14:35 ` [PATCH 11/12] test: Add ReportChanged to monitored signals Ronald Tessier
2012-08-17 14:35 ` [PATCH 12/12] doc: Add ReportChanged signal description Ronald Tessier
-- strict thread matches above, loose matches on Subject: below --
2012-08-24 13:05 [PATCH 00/12] mmsd: (resending) Support Delivery Report notification Ronald Tessier
2012-08-24 13:06 ` [PATCH 08/12] store: Define MMS_META_UUID_XXX len and suffix Ronald Tessier
2012-08-28 14:25 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345214113-25597-9-git-send-email-ronald.tessier@linux.intel.com \
--to=ronald.tessier@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox