[patch 07/20] SMS: implement SHA256-based message IDs [incomplete]
Denis Kenzior
denkenz at gmail.com
Tue Jul 27 10:03:02 PDT 2010
Hi Inaky,
> -unsigned int __ofono_sms_txq_submit(struct ofono_sms *sms, GSList *list,
> - unsigned int flags,
> +struct tx_queue_entry * __ofono_sms_txq_submit(struct ofono_sms *sms, GSList *list,
> + unsigned int flags, unsigned ref,
> ofono_sms_txq_submit_cb_t cb,
> void *data, ofono_destroy_func destroy);
I disagree with this, you're modifying an ofono internal API function to
return a structure which is opaque and cannot be manipulated. I'd
rather see you returning a struct sms_uuid...
> + /*
> + * Instead of using the telephone number/address we got from
> + * D-Bus, we do the reverse formatting, so we get something
> + * that has been normalized--this is used later and we do it
> + * here to simplify error handling.
> + */
> + sms_address_from_string(&receiver, to);
> + if (sms_address_to_hex_string(&receiver, receiver_str)
> + == FALSE)
> + return __ofono_error_failed(msg);
Please avoid mixing tabs and spaces for indentation. And in this case
it is more readale to break up the function than the equals line. E.g.
if (sms_address_to_hex_string(&receiver,
receiver_str == FALSE)
return __ofono_error_failed(msg);
Regards,
-Denis
More information about the ofono
mailing list