--- Begin Message ---
Subject: |
[PATCH] Delete message when write fails |
Date: |
Sun, 8 Jul 2007 21:33:00 -0700 |
---
common/phones/nk6510.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 59078f3..d48ea49 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -2328,6 +2328,7 @@ static gn_error NK6510_WritePhonebookLocation(gn_data
*data, struct gn_statemach
int block, i, j, defaultn, has_address = 0;
unsigned int count = 22;
gn_phonebook_entry *entry;
+ gn_error error;
if (data->phonebook_entry)
entry = data->phonebook_entry;
@@ -2468,7 +2469,11 @@ static gn_error NK6510_WritePhonebookLocation(gn_data
*data, struct gn_statemach
} else {
return NK6510_DeletePhonebookLocation(data, state);
}
- SEND_MESSAGE_BLOCK(NK6510_MSG_PHONEBOOK, count);
+ if (sm_message_send (count, NK6510_MSG_PHONEBOOK, req, state)) return
GN_ERR_NOTREADY;
+ error = sm_block (NK6510_MSG_PHONEBOOK, data, state);
+ if (error)
+ (void) NK6510_DeletePhonebookLocation(data, state);
+ return error;
}
--
1.5.2.2
--- End Message ---
--- Begin Message ---
Subject: |
confirm 8336aedd80685fcbd8123bd65f323a21ba5c75a1 |
If you reply to this message, keeping the Subject: header intact,
Mailman will discard the held message. Do this if the message is
spam. If you reply to this message and include an Approved: header
with the list password in it, the message will be approved for posting
to the list. The Approved: header can also appear in the first line
of the body of the reply.
--- End Message ---