diff --git a/coreapi/presence.c b/coreapi/presence.c index af4c5184d..08996329f 100644 --- a/coreapi/presence.c +++ b/coreapi/presence.c @@ -170,7 +170,7 @@ static time_t parse_timestamp(const char *timestamp) { return seconds - timezone; } -static char * timestamp_to_string(time_t timestamp) { +char * linphone_timestamp_to_rfc3339_string(time_t timestamp) { char timestamp_str[22]; struct tm *ret; #ifndef WIN32 @@ -1604,7 +1604,7 @@ static void write_xml_presence_note_obj(LinphonePresenceNote *note, struct _pres static int write_xml_presence_timestamp(xmlTextWriterPtr writer, time_t timestamp) { int err; - char *timestamp_str = timestamp_to_string(timestamp); + char *timestamp_str = linphone_timestamp_to_rfc3339_string(timestamp); err = xmlTextWriterWriteElement(writer, (const xmlChar *)"timestamp", (const xmlChar *)timestamp_str); if (timestamp_str) ms_free(timestamp_str); return err; diff --git a/coreapi/private.h b/coreapi/private.h index 45dc5f305..e2feef54a 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -854,11 +854,18 @@ char * linphone_get_xml_text_content(xmlparsing_context_t *xml_ctx, const char * void linphone_free_xml_text_content(const char *text); xmlXPathObjectPtr linphone_get_xml_xpath_object_for_node_list(xmlparsing_context_t *xml_ctx, const char *xpath_expression); +/***************************************************************************** + * OTHER UTILITY FUNCTIONS * + ****************************************************************************/ +char * linphone_timestamp_to_rfc3339_string(time_t timestamp); + + static inline const LinphoneErrorInfo *linphone_error_info_from_sal_op(const SalOp *op){ if (op==NULL) return (LinphoneErrorInfo*)sal_error_info_none(); return (const LinphoneErrorInfo*)sal_op_get_error_info(op); } + /** Belle Sip-based objects need unique ids */