[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Delete message when write fails
From: |
Keith Packard |
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
- Fixes to avoid locking up 6131 phone and send more useful data, Keith Packard, 2007/07/09
- [PATCH] When processing incoming phone book messages, skip unrelated errors., Keith Packard, 2007/07/09
- [PATCH] Limit phonebook to 1000 entries (as on 6131), Keith Packard, 2007/07/09
- [PATCH] Account for phonebook blocks not sent due to limited packet space, Keith Packard, 2007/07/09
- [PATCH] Support termination of repeating events, Keith Packard, 2007/07/09
- [PATCH] Speed up calendar fetch by not restarting note fetch, Keith Packard, 2007/07/09
- [PATCH] Delete message when write fails,
Keith Packard <=
- [PATCH] Avoid duplicate phone and address entries, Keith Packard, 2007/07/09
- [PATCH] treat Postal entries as addresses, Keith Packard, 2007/07/09
- [PATCH] Set of address blocks counts as one data block., Keith Packard, 2007/07/09
- Re: [Opensync-users] [PATCH] treat Postal entries as addresses, Pawel Kot, 2007/07/09
- Re: [Opensync-users] [PATCH] Avoid duplicate phone and address entries, Pawel Kot, 2007/07/09
- Re: [Opensync-users] [PATCH] Avoid duplicate phone and address entries, Keith Packard, 2007/07/09
- Re: [Opensync-users] [PATCH] Avoid duplicate phone and address entries, Pawel Kot, 2007/07/09
- Re: [Opensync-users] [PATCH] Delete message when write fails, Pawel Kot, 2007/07/09
- Re: [Opensync-users] [PATCH] Delete message when write fails, Keith Packard, 2007/07/09
- Re: [Opensync-users] [PATCH] Speed up calendar fetch by not restarting note fetch, Pawel Kot, 2007/07/09