mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 10:19:23 +00:00
handle expired client dialogs for p2p presence, and report them for LinphoneEvent.
remove deprecation of LinphoneChatMessageStateCb, since it is already marked as deprecated in all functions using it. fix a few warnings
This commit is contained in:
parent
60e70816d2
commit
0965d49f7a
6 changed files with 27 additions and 8 deletions
|
|
@ -414,7 +414,8 @@ linphonec_parse_command_line(LinphoneCore *lc, char *cl)
|
|||
{
|
||||
while ( isdigit(*cl) || *cl == '#' || *cl == '*' )
|
||||
{
|
||||
linphone_core_send_dtmf(lc, *cl);
|
||||
if (linphone_core_get_current_call(lc))
|
||||
linphone_call_send_dtmf(linphone_core_get_current_call(lc), *cl);
|
||||
linphone_core_play_dtmf (lc,*cl,100);
|
||||
ms_sleep(1); // be nice
|
||||
++cl;
|
||||
|
|
@ -2336,12 +2337,12 @@ static int lpc_cmd_echolimiter(LinphoneCore *lc, char *args){
|
|||
|
||||
static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args)
|
||||
{
|
||||
linphone_core_mute_mic(lc, 1);
|
||||
linphone_core_enable_mic(lc, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lpc_cmd_unmute_mic(LinphoneCore *lc, char *args){
|
||||
linphone_core_mute_mic(lc, 0);
|
||||
linphone_core_enable_mic(lc, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ static int linphonec_main_loop (LinphoneCore * opm);
|
|||
static int linphonec_idle_call (void);
|
||||
#ifdef HAVE_READLINE
|
||||
static int linphonec_initialize_readline(void);
|
||||
static int linphonec_finish_readline();
|
||||
static int linphonec_finish_readline(void);
|
||||
static char **linephonec_readline_completion(const char *text,
|
||||
int start, int end);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -61,10 +61,20 @@ static void subscribe_process_io_error(void *user_ctx, const belle_sip_io_error_
|
|||
}
|
||||
|
||||
static void subscribe_process_dialog_terminated(void *ctx, const belle_sip_dialog_terminated_event_t *event) {
|
||||
belle_sip_dialog_t *dialog = belle_sip_dialog_terminated_event_get_dialog(event);
|
||||
SalOp* op= (SalOp*)ctx;
|
||||
if (op->dialog) {
|
||||
op->dialog=NULL;
|
||||
if (!belle_sip_dialog_is_server(dialog) && belle_sip_dialog_terminated_event_is_expired(event)){
|
||||
/*notify the app that our subscription is dead*/
|
||||
const char *eventname = NULL;
|
||||
if (op->event){
|
||||
eventname = belle_sip_header_get_unparsed_value(op->event);
|
||||
}
|
||||
op->base.root->callbacks.notify(op, SalSubscribeTerminated, eventname, NULL);
|
||||
}
|
||||
sal_op_unref(op);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +208,6 @@ int sal_subscribe(SalOp *op, const char *from, const char *to, const char *event
|
|||
|
||||
if (!op->dialog){
|
||||
sal_op_subscribe_fill_cbs(op);
|
||||
/*???sal_exosip_fix_route(op); make sure to ha ;lr*/
|
||||
req=sal_op_build_request(op,"SUBSCRIBE");
|
||||
if( req == NULL ) {
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -58,8 +58,17 @@ static void presence_process_dialog_terminated(void *ctx, const belle_sip_dialog
|
|||
if (!op->op_released){
|
||||
op->base.root->callbacks.subscribe_presence_closed(op, sal_op_get_from(op));
|
||||
}
|
||||
set_or_update_dialog(op, NULL);
|
||||
}else{
|
||||
if (belle_sip_dialog_terminated_event_is_expired(event)){
|
||||
ms_warning("Outgoing presence subscription expired.");
|
||||
if (op->refresher){
|
||||
/*send a new SUBSCRIBE, that will attempt to establish a new dialog*/
|
||||
sal_subscribe_presence(op,NULL,NULL,-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
set_or_update_dialog(op, NULL);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,7 @@ typedef enum _LinphoneChatMessageState {
|
|||
* @param ud application user data
|
||||
* @deprecated
|
||||
*/
|
||||
typedef LINPHONE_DEPRECATED void (*LinphoneChatMessageStateChangedCb)(LinphoneChatMessage* msg,LinphoneChatMessageState state,void* ud);
|
||||
typedef void (*LinphoneChatMessageStateChangedCb)(LinphoneChatMessage* msg,LinphoneChatMessageState state,void* ud);
|
||||
|
||||
/**
|
||||
* Call back used to notify message delivery status
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit b49feebe9e76ea8605bee0ca4f5803083c119f01
|
||||
Subproject commit f3651d2c516ca74edd310e3868fa74d1149744c8
|
||||
Loading…
Add table
Reference in a new issue