linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Disable chat history


From: Gennadii Kurabko
Subject: Re: [Linphone-developers] Disable chat history
Date: Tue, 19 Aug 2014 19:14:18 +0300

Hello again,
 
seems like that storage used only by UI, and not by linphonec. I changed linphonec in a way, so it prints time for each received message and I can skip messages older than start time of application:
 
static void
linphonec_message_received(LinphoneCore *lc, LinphoneChatRoom *cr,
  LinphoneChatMessage *message)
{
 if (message->message != NULL && message->content_type == NULL) { // skip file transfer and other messages
  char date[256];
  strftime(date, sizeof(date), "%Y-%m-%d %H:%M:%S", localtime(&(message->time)));
  linphonec_out("[%s] Message received from %s: %s\n", date, linphone_address_as_string(linphone_chat_message_get_from(message)), linphone_chat_message_get_text(message));
  // TODO: provide mechanism for answering.. ('say' command?)
 }
}
 
But I have another question. When using that new fresh linphonec after 'quit' command I can see error in output: "ortp-error-presence_process_io_error not implemented yet". Are there any way to fix it?
 
Here is -d 6 output:
 
ortp-message-Refresher [02AF5B88] stopped.
ortp-message-Destroying op [02AADC60] of type [SalOpRegister]
ortp-message-Refresher [02AF5B88] stopped.
ortp-message-Reseting transports
ortp-message-Listening point destroying [1] channels
ortp-message-channel 02A7E9F8: state DISCONNECTED
ortp-message-transaction [02B22818] channel state changed to [DISCONNECTED]
ortp-message-transaction [02AA9CC8] channel state changed to [DISCONNECTED]
ortp-message-transaction [02AA9DE8] channel state changed to [DISCONNECTED]
ortp-message-transaction [02AAA148] channel state changed to [DISCONNECTED]
ortp-message-transaction [02AA9AE8] channel state changed to [DISCONNECTED]
ortp-message-transaction [02AA9C68] channel state changed to [DISCONNECTED]
ortp-message-transaction [02AAA088] channel state changed to [DISCONNECTED]
ortp-error-presence_process_io_error not implemented yet
ortp-message-Changing [client] [NOTIFY] transaction [02AAA088], from state [TRYING] to [TERMINATED]
ortp-message-Client NOTIFY transaction [02AAA088] terminated
ortp-message-presence_process_transaction_terminated not implemented yet
ortp-message-Listening point [02A7BFB8] on [sip:0.0.0.0:10119;transport=TLS] destroyed
ortp-message-sal_unlisten_ports done
ortp-message-http provider destroyed.
ortp-message-stack [0134A940] destroyed.
 
Best regards,
Gennadii Kurabko
 


2014-08-18 12:14 GMT+03:00 BIENKOWSKI Guillaume <address@hidden>:
Hello Gennadii

You can set the storage path to ":memory:" and SQLite will open a memory-based storage which will not be retained on subsequent application restart.
linphone_core_set_chat_database_path()




On Sun, Aug 17, 2014 at 8:40 PM, Gennadii Kurabko <address@hidden> wrote:
Hello,

is it possible to disable loading of chat history in linphonec?

I'm using linphonec as a communication platform for one my Windows-targeted project, and chat history loaded at startup confuses me a lot, because I can't come up any solution how to detect and skip it. It looks exactly like fresh received messages.

I found c:\Users\<username>\AppData\Roaming\Linphone\.linphone-history.db file, and seems like it contains all the history. But deleting this file during startup is a dirty way...

Best regards,
Gennadii

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers



_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]