diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index bec90fafe3..e9dac77e2e 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -667,7 +667,7 @@ static void on_buddy_state(pjsua_buddy_id buddy_id) /* - * Handler on buddy blf state changed. + * Handler on buddy "busy lamp field" state changed. */ static void on_buddy_blf_state(pjsua_buddy_id buddy_id) { @@ -745,8 +745,8 @@ static void on_buddy_evsub_state(pjsua_buddy_id buddy_id, } static void on_buddy_evsub_blf_state(pjsua_buddy_id buddy_id, - pjsip_evsub *sub, - pjsip_event *event) + pjsip_evsub *sub, + pjsip_event *event) { char event_info[80]; diff --git a/pjsip-apps/src/pjsua/pjsua_app_legacy.c b/pjsip-apps/src/pjsua/pjsua_app_legacy.c index 4dfe69de5f..2831eecb6e 100644 --- a/pjsip-apps/src/pjsua/pjsua_app_legacy.c +++ b/pjsip-apps/src/pjsua/pjsua_app_legacy.c @@ -1004,7 +1004,8 @@ static void ui_add_buddy() static void ui_add_buddy_blf() { - char buf[128]; + const int buffer_size = 128; + char buf[buffer_size]; pjsua_buddy_config buddy_cfg; pjsua_buddy_id buddy_id; pj_status_t status; diff --git a/pjsip/include/pjsip-simple/blf.h b/pjsip/include/pjsip-simple/blf.h index 29a6ac8509..79d07beb62 100644 --- a/pjsip/include/pjsip-simple/blf.h +++ b/pjsip/include/pjsip-simple/blf.h @@ -20,7 +20,7 @@ /** * @file blf.h - * @brief SIP Extension for blf (RFC 4235) + * @brief SIP Extension for "busy lamp field" (blf) (RFC 4235) */ #include #include @@ -29,9 +29,9 @@ PJ_BEGIN_DECL /** - * @defgroup PJSIP_SIMPLE_BLF SIP Extension for BLF (RFC 4235) + * @defgroup PJSIP_SIMPLE_BLF SIP Extension for "busy lamp field" (blf) (RFC 4235) * @ingroup PJSIP_SIMPLE - * @brief Support for SIP Extension for BLF (RFC 4235) + * @brief Support for SIP Extension for "busy lamp field" (blf) (RFC 4235) * @{ * * This module contains the implementation of SIP Presence Extension as @@ -42,7 +42,7 @@ PJ_BEGIN_DECL /** - * Initialize the blf module and register it as endpoint module and + * Initialize the "busy lamp field" module and register it as endpoint module and * package to the event subscription module. * * @param endpt The endpoint instance. @@ -53,7 +53,7 @@ PJ_BEGIN_DECL * and the event subscription module. */ PJ_DECL(pj_status_t) pjsip_blf_init_module(pjsip_endpoint *endpt, - pjsip_module *mod_evsub); + pjsip_module *mod_evsub); /** @@ -65,13 +65,14 @@ PJ_DECL(pjsip_module*) pjsip_blf_instance(void); /** - * Maximum blf status info. + * Maximum "busy lamp field" status info items which can handled by application. + * */ #define PJSIP_BLF_STATUS_MAX_INFO 8 /** - * This structure describes blf status of a presentity. + * This structure describes "busy lamp field" status of a presentity. */ struct pjsip_blf_status { @@ -79,22 +80,22 @@ struct pjsip_blf_status struct { pj_str_t dialog_info_state; /**< Dialog-Info state */ - pj_str_t dialog_info_entity; /**< Dialog-Info entity */ - pj_str_t dialog_call_id; /**< Dialog's call_id */ - pj_str_t dialog_remote_tag; /**< Dialog's remote-tag */ - pj_str_t dialog_local_tag; /**< Dialog's local-tag */ - pj_str_t dialog_direction; /**< Dialog's direction */ - pj_str_t dialog_id; /**< Dialog's id */ - pj_str_t dialog_state; /**< Dialog state */ - pj_str_t dialog_duration; /**< Dialog duration */ - - pj_xml_node *dialog_node; /**< Pointer to tuple XML node of - parsed dialog-info body received from - remote agent. Only valid for - client subscription. If the - last received NOTIFY request - does not contain any dialog-info body, - this valud will be set to NULL */ + pj_str_t dialog_info_entity; /**< Dialog-Info entity */ + pj_str_t dialog_call_id; /**< Dialog's call_id */ + pj_str_t dialog_remote_tag; /**< Dialog's remote-tag */ + pj_str_t dialog_local_tag; /**< Dialog's local-tag */ + pj_str_t dialog_direction; /**< Dialog's direction */ + pj_str_t dialog_id; /**< Dialog's id */ + pj_str_t dialog_state; /**< Dialog state */ + pj_str_t dialog_duration; /**< Dialog duration */ + + pj_xml_node *dialog_node; /**< Pointer to tuple XML node of + parsed dialog-info body received from + remote agent. Only valid for + client subscription. If the + last received NOTIFY request + does not contain any dialog-info body, + this valid will be set to NULL */ pj_str_t local_identity; pj_str_t local_identity_display; pj_str_t local_target_uri; @@ -117,7 +118,7 @@ typedef struct pjsip_blf_status pjsip_blf_status; /** - * Create blf client subscription session. + * Create "busy lamp field" client subscription session. * * @param dlg The underlying dialog to use. * @param user_cb Pointer to callbacks to receive presence subscription @@ -129,10 +130,10 @@ typedef struct pjsip_blf_status pjsip_blf_status; * * @return PJ_SUCCESS on success. */ -PJ_DECL(pj_status_t) pjsip_blf_create_uac( pjsip_dialog *dlg, - const pjsip_evsub_blf_user *user_cb, - unsigned options, - pjsip_evsub **p_evsub ); +PJ_DECL(pj_status_t) pjsip_blf_create_uac(pjsip_dialog *dlg, + const pjsip_evsub_blf_user *user_cb, + unsigned options, + pjsip_evsub **p_evsub ); /** @@ -147,8 +148,8 @@ PJ_DECL(pj_status_t) pjsip_blf_create_uac( pjsip_dialog *dlg, * * @return PJ_SUCCESS if subscription session has been destroyed. */ -PJ_DECL(pj_status_t) pjsip_blf_terminate( pjsip_evsub *sub, - pj_bool_t notify ); +PJ_DECL(pj_status_t) pjsip_blf_terminate(pjsip_evsub *sub, + pj_bool_t notify ); @@ -163,9 +164,9 @@ PJ_DECL(pj_status_t) pjsip_blf_terminate( pjsip_evsub *sub, * * @return PJ_SUCCESS on success. */ -PJ_DECL(pj_status_t) pjsip_blf_initiate( pjsip_evsub *sub, - pj_int32_t expires, - pjsip_tx_data **p_tdata); +PJ_DECL(pj_status_t) pjsip_blf_initiate(pjsip_evsub *sub, + pj_int32_t expires, + pjsip_tx_data **p_tdata); /** @@ -177,8 +178,8 @@ PJ_DECL(pj_status_t) pjsip_blf_initiate( pjsip_evsub *sub, * * @return PJ_SUCCESS on success. */ -PJ_DECL(pj_status_t) pjsip_blf_add_header( pjsip_evsub *sub, - const pjsip_hdr *hdr_list ); +PJ_DECL(pj_status_t) pjsip_blf_add_header(pjsip_evsub *sub, + const pjsip_hdr *hdr_list); /** @@ -192,10 +193,10 @@ PJ_DECL(pj_status_t) pjsip_blf_add_header( pjsip_evsub *sub, * * @return PJ_SUCCESS on success. */ -PJ_DECL(pj_status_t) pjsip_blf_accept( pjsip_evsub *sub, - pjsip_rx_data *rdata, - int st_code, - const pjsip_hdr *hdr_list ); +PJ_DECL(pj_status_t) pjsip_blf_accept(pjsip_evsub *sub, + pjsip_rx_data *rdata, + int st_code, + const pjsip_hdr *hdr_list ); /** * Send request message that was previously created with initiate(), notify(), @@ -208,8 +209,8 @@ PJ_DECL(pj_status_t) pjsip_blf_accept( pjsip_evsub *sub, * * @return PJ_SUCCESS on success. */ -PJ_DECL(pj_status_t) pjsip_blf_send_request( pjsip_evsub *sub, - pjsip_tx_data *tdata ); +PJ_DECL(pj_status_t) pjsip_blf_send_request(pjsip_evsub *sub, + pjsip_tx_data *tdata); /** @@ -221,8 +222,8 @@ PJ_DECL(pj_status_t) pjsip_blf_send_request( pjsip_evsub *sub, * * @return PJ_SUCCESS on success. */ -PJ_DECL(pj_status_t) pjsip_blf_get_status( pjsip_evsub *sub, - pjsip_blf_status *status ); +PJ_DECL(pj_status_t) pjsip_blf_get_status(pjsip_evsub *sub, + pjsip_blf_status *status); /** @@ -238,9 +239,22 @@ PJ_DECL(pj_status_t) pjsip_blf_get_status( pjsip_evsub *sub, * @see pjsip_pres_parse_pidf2() */ PJ_DECL(pj_status_t) pjsip_blf_parse_dialog_info(pjsip_rx_data *rdata, - pj_pool_t *pool, - pjsip_blf_status *blf_status); + pj_pool_t *pool, + pjsip_blf_status *blf_status); + +/** + * This is a utility function to parse PIDF body into PJSIP presence status. + * + * @param rdata The incoming SIP message containing the PIDF body. + * @param pool Pool to allocate memory to copy the strings into + * the presence status structure. + * @param status The presence status to be initialized. + * + * @return PJ_SUCCESS on success. + * + * @see pjsip_pres_parse_pidf2() + */ PJ_DECL(pj_status_t) pjsip_blf_parse_dialog_info2(char *body, unsigned body_len, pj_pool_t *pool, pjsip_blf_status *blf_status); diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h index c90731ff3b..8dfc893bb5 100644 --- a/pjsip/include/pjsip-simple/evsub.h +++ b/pjsip/include/pjsip-simple/evsub.h @@ -270,11 +270,11 @@ struct pjsip_evsub_blf_user * the response. */ void (*on_rx_notify)(pjsip_evsub *sub, - pjsip_rx_data *rdata, - int *p_st_code, - pj_str_t **p_st_text, - pjsip_hdr *res_hdr, - pjsip_msg_body **p_body); + pjsip_rx_data *rdata, + int *p_st_code, + pj_str_t **p_st_text, + pjsip_hdr *res_hdr, + pjsip_msg_body **p_body); /** * This callback is called when it is time for the client to refresh diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 254049d86d..22ea6c8963 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -6556,50 +6556,50 @@ typedef struct pjsua_buddy_blf_info */ pj_str_t uri; - /* BLF Dialog-Info id */ + /* "busy lamp field" Dialog-Info id */ pj_str_t dialog_id; - /* BLF Dialog-Info state */ + /* "busy lamp field" Dialog-Info state */ pj_str_t dialog_info_state; - /* BLF Dialog-Info entity */ + /* "busy lamp field" Dialog-Info entity */ pj_str_t dialog_info_entity; - /* BLF Dialog call_id */ + /* "busy lamp field" Dialog call_id */ pj_str_t dialog_call_id; - /* BLF Dialog remote_tag */ + /* "busy lamp field" Dialog remote_tag */ pj_str_t dialog_remote_tag; - /* BLF Dialog local_tag */ + /* "busy lamp field" Dialog local_tag */ pj_str_t dialog_local_tag; - /* BLF Dialog direction */ + /* "busy lamp field" Dialog direction */ pj_str_t dialog_direction; - /* BLF dialog state */ + /* "busy lamp field" dialog state */ pj_str_t dialog_state; - /* BLF dialog duration */ + /* "busy lamp field" dialog duration */ pj_str_t dialog_duration; - /* BLF local identity */ + /* "busy lamp field" local identity */ pj_str_t local_identity; - /* BLF local identity_display */ + /* "busy lamp field" local identity_display */ pj_str_t local_identity_display; - /* BLF local target uri */ + /* "busy lamp field" local target uri */ pj_str_t local_target_uri; - /* BLF remote identity */ + /* "busy lamp field" remote identity */ pj_str_t remote_identity; - /* BLF remote identity_display */ + /* "busy lamp field" remote identity_display */ pj_str_t remote_identity_display; - /* BLF remote target uri */ + /* "busy lamp field" remote target uri */ pj_str_t remote_target_uri; @@ -6749,9 +6749,9 @@ PJ_DECL(pj_status_t) pjsua_buddy_add(const pjsua_buddy_config *buddy_cfg, /** - * Add new buddy to the buddy list. If "busy lamp field" subscription is - * enabled for this buddy, this function will also start the blf subscription - * session immediately. + * Add new buddy to the buddy list. If "busy lamp field" (blf) subscription is + * enabled for this buddy, this function will also start the "busy lamp field" + * subscription session immediately. * * @param buddy_cfg Buddy configuration. * @param p_buddy_id Pointer to receive buddy ID. @@ -6800,8 +6800,8 @@ PJ_DECL(pj_status_t) pjsua_buddy_subscribe_pres(pjsua_buddy_id buddy_id, /** - * Enable/disable buddy's "busy lamp field" monitoring. Once buddy's blf is - * subscribed, application will be informed about buddy's blf status + * Enable/disable buddy's "busy lamp field" monitoring. Once buddy's "busy lamp field" + * is subscribed, application will be informed about buddy's "busy lamp field" status * changed via \a on_buddy_blf_state() callback. * * @param buddy_id Buddy identification. @@ -6838,7 +6838,7 @@ PJ_DECL(pj_status_t) pjsua_buddy_update_pres(pjsua_buddy_id buddy_id); /** - * Update the "busy lamp field" information for the buddy. Although the library + * Update the "busy lamp field" (blf) information for the buddy. Although the library * periodically refreshes the blf subscription for all buddies, some * application may want to refresh the buddy's blf subscription * immediately, and in this case it can use this function to accomplish @@ -6850,7 +6850,7 @@ PJ_DECL(pj_status_t) pjsua_buddy_update_pres(pjsua_buddy_id buddy_id); * for the buddy is already active, this function will not do anything. * * Once the blf subscription is activated successfully for the buddy, - * application will be notified about the buddy's blf status in the + * application will be notified about the buddy's "busy lamp field" status in the * on_buddy_blf_state() callback. * * @param buddy_id Buddy identification. diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index fbd20af573..01f7d5775e 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -381,7 +381,7 @@ typedef struct pjsua_buddy unsigned term_code; /**< Subscription termination code */ pj_str_t term_reason;/**< Subscription termination reason */ pjsip_pres_status status; /**< Buddy presence status. */ - pjsip_blf_status blf_status;/**< Buddy blf status. */ + pjsip_blf_status blf_status;/**< Buddy "busy lamp field" status.*/ pj_timer_entry timer; /**< Resubscription timer */ } pjsua_buddy; diff --git a/pjsip/src/pjsip-simple/blf.c b/pjsip/src/pjsip-simple/blf.c index 4efb4ab7c9..1335491450 100644 --- a/pjsip/src/pjsip-simple/blf.c +++ b/pjsip/src/pjsip-simple/blf.c @@ -40,7 +40,7 @@ #endif /* - * BLF module (mod-blf) + * "busy lamp field" (blf) module (mod-blf) */ static struct pjsip_module mod_blf = { @@ -61,7 +61,7 @@ static struct pjsip_module mod_blf = /* - * BLF message body type. + * "busy lamp field" message body type. */ typedef enum content_type_e { @@ -74,11 +74,11 @@ typedef enum content_type_e */ struct pjsip_blf { - pjsip_evsub *sub; /**< Event subscribtion record. */ + pjsip_evsub *sub; /**< Event subscription record. */ pjsip_dialog *dlg; /**< The dialog. */ content_type_e content_type; /**< Content-Type. */ pj_pool_t *status_pool; /**< Pool for pres_status */ - pjsip_blf_status status; /**< BLF status. */ + pjsip_blf_status status; /**< "busy lamp field" status. */ pj_pool_t *tmp_pool; /**< Pool for tmp_status */ pjsip_blf_status tmp_status; /**< Temp, before NOTIFY is answered. */ pjsip_evsub_user user_cb; /**< The user callback. */ @@ -91,20 +91,20 @@ typedef struct pjsip_blf pjsip_blf; /* * Forward decl for evsub callback. */ -static void blf_on_evsub_state( pjsip_evsub *sub, pjsip_event *event); -static void blf_on_evsub_tsx_state( pjsip_evsub *sub, pjsip_transaction *tsx, - pjsip_event *event); -static void blf_on_evsub_rx_notify( pjsip_evsub *sub, - pjsip_rx_data *rdata, - int *p_st_code, - pj_str_t **p_st_text, - pjsip_hdr *res_hdr, - pjsip_msg_body **p_body); +static void blf_on_evsub_state(pjsip_evsub *sub, pjsip_event *event); +static void blf_on_evsub_tsx_state(pjsip_evsub *sub, pjsip_transaction *tsx, + pjsip_event *event); +static void blf_on_evsub_rx_notify(pjsip_evsub *sub, + pjsip_rx_data *rdata, + int *p_st_code, + pj_str_t **p_st_text, + pjsip_hdr *res_hdr, + pjsip_msg_body **p_body); static void blf_on_evsub_client_refresh(pjsip_evsub *sub); /* - * Event subscription callback for blf. + * Event subscription callback for "busy lamp field". */ static pjsip_evsub_blf_user blf_user = { @@ -120,18 +120,18 @@ static pjsip_evsub_blf_user blf_user = /* * Some static constants. */ -const pj_str_t STR_DIALOG_EVENT = { "Event", 5 }; -const pj_str_t STR_DIALOG = { "dialog", 6 }; -const pj_str_t STR_DIALOG_APPLICATION = { "application", 11 }; +const pj_str_t STR_DIALOG_EVENT = { "Event", 5 }; +const pj_str_t STR_DIALOG = { "dialog", 6 }; +const pj_str_t STR_DIALOG_APPLICATION = { "application", 11 }; const pj_str_t STR_DIALOG_INFO_XML = { "dialog-info+xml", 15 }; -const pj_str_t STR_APP_DIALOG_INFO_XML = { "application/dialog-info+xml", 27 }; +const pj_str_t STR_APP_DIALOG_INFO_XML = { "application/dialog-info+xml", 27 }; /* * Init presence module. */ -PJ_DEF(pj_status_t) pjsip_blf_init_module( pjsip_endpoint *endpt, - pjsip_module *mod_evsub) +PJ_DEF(pj_status_t) pjsip_blf_init_module(pjsip_endpoint *endpt, + pjsip_module *mod_evsub) { pj_status_t status; pj_str_t accept[1]; @@ -174,10 +174,10 @@ PJ_DEF(pjsip_module*) pjsip_blf_instance(void) /* * Create client subscription. */ -PJ_DEF(pj_status_t) pjsip_blf_create_uac( pjsip_dialog *dlg, - const pjsip_evsub_blf_user *user_cb, - unsigned options, - pjsip_evsub **p_evsub ) +PJ_DEF(pj_status_t) pjsip_blf_create_uac(pjsip_dialog *dlg, + const pjsip_evsub_blf_user *user_cb, + unsigned options, + pjsip_evsub **p_evsub) { pj_status_t status; pjsip_blf *pres; @@ -222,8 +222,8 @@ PJ_DEF(pj_status_t) pjsip_blf_create_uac( pjsip_dialog *dlg, /* * Forcefully terminate presence. */ -PJ_DEF(pj_status_t) pjsip_blf_terminate( pjsip_evsub *sub, - pj_bool_t notify ) +PJ_DEF(pj_status_t) pjsip_blf_terminate(pjsip_evsub *sub, + pj_bool_t notify) { return pjsip_evsub_terminate(sub, notify); } @@ -231,20 +231,20 @@ PJ_DEF(pj_status_t) pjsip_blf_terminate( pjsip_evsub *sub, /* * Create SUBSCRIBE */ -PJ_DEF(pj_status_t) pjsip_blf_initiate( pjsip_evsub *sub, - pj_int32_t expires, - pjsip_tx_data **p_tdata) +PJ_DEF(pj_status_t) pjsip_blf_initiate(pjsip_evsub *sub, + pj_int32_t expires, + pjsip_tx_data **p_tdata) { return pjsip_evsub_initiate(sub, &pjsip_subscribe_method, expires, - p_tdata); + p_tdata); } /* * Add custom headers. */ -PJ_DEF(pj_status_t) pjsip_blf_add_header( pjsip_evsub *sub, - const pjsip_hdr *hdr_list ) +PJ_DEF(pj_status_t) pjsip_blf_add_header(pjsip_evsub *sub, + const pjsip_hdr *hdr_list ) { return pjsip_evsub_add_header( sub, hdr_list ); } @@ -253,20 +253,20 @@ PJ_DEF(pj_status_t) pjsip_blf_add_header( pjsip_evsub *sub, /* * Accept incoming subscription. */ -PJ_DEF(pj_status_t) pjsip_blf_accept( pjsip_evsub *sub, - pjsip_rx_data *rdata, - int st_code, - const pjsip_hdr *hdr_list ) +PJ_DEF(pj_status_t) pjsip_blf_accept(pjsip_evsub *sub, + pjsip_rx_data *rdata, + int st_code, + const pjsip_hdr *hdr_list) { return pjsip_evsub_accept( sub, rdata, st_code, hdr_list ); } /* - * Get blf status. + * Get "busy lamp field" status. */ -PJ_DEF(pj_status_t) pjsip_blf_get_status( pjsip_evsub *sub, - pjsip_blf_status *status ) +PJ_DEF(pj_status_t) pjsip_blf_get_status(pjsip_evsub *sub, + pjsip_blf_status *status ) { pjsip_blf *blf; @@ -290,8 +290,8 @@ PJ_DEF(pj_status_t) pjsip_blf_get_status( pjsip_evsub *sub, /* * Send request. */ -PJ_DEF(pj_status_t) pjsip_blf_send_request( pjsip_evsub *sub, - pjsip_tx_data *tdata ) +PJ_DEF(pj_status_t) pjsip_blf_send_request(pjsip_evsub *sub, + pjsip_tx_data *tdata ) { return pjsip_evsub_send_request(sub, tdata); } @@ -326,8 +326,9 @@ static void blf_on_evsub_state( pjsip_evsub *sub, pjsip_event *event) /* * Called when transaction state has changed. */ -static void blf_on_evsub_tsx_state( pjsip_evsub *sub, pjsip_transaction *tsx, - pjsip_event *event) +static void blf_on_evsub_tsx_state(pjsip_evsub *sub, + pjsip_transaction *tsx, + pjsip_event *event) { pjsip_blf *pres; @@ -346,11 +347,11 @@ static void blf_on_evsub_tsx_state( pjsip_evsub *sub, pjsip_transaction *tsx, * return PJ_SUCCESS if incoming request is acceptable. If return value * is not PJ_SUCCESS, res_hdr may be added with Warning header. */ -static pj_status_t blf_process_rx_notify( pjsip_blf *blf, - pjsip_rx_data *rdata, - int *p_st_code, - pj_str_t **p_st_text, - pjsip_hdr *res_hdr) +static pj_status_t blf_process_rx_notify(pjsip_blf *blf, + pjsip_rx_data *rdata, + int *p_st_code, + pj_str_t **p_st_text, + pjsip_hdr *res_hdr) { pjsip_ctype_hdr *ctype_hdr; pj_status_t status = PJ_SUCCESS; @@ -432,12 +433,12 @@ static pj_status_t blf_process_rx_notify( pjsip_blf *blf, /* * Called when NOTIFY is received. */ -static void blf_on_evsub_rx_notify( pjsip_evsub *sub, - pjsip_rx_data *rdata, - int *p_st_code, - pj_str_t **p_st_text, - pjsip_hdr *res_hdr, - pjsip_msg_body **p_body) +static void blf_on_evsub_rx_notify(pjsip_evsub *sub, + pjsip_rx_data *rdata, + int *p_st_code, + pj_str_t **p_st_text, + pjsip_hdr *res_hdr, + pjsip_msg_body **p_body) { pjsip_blf *blf; pj_status_t status; diff --git a/pjsip/src/pjsip-simple/presence_body.c b/pjsip/src/pjsip-simple/presence_body.c index 660729f1bf..babfa790c6 100644 --- a/pjsip/src/pjsip-simple/presence_body.c +++ b/pjsip/src/pjsip-simple/presence_body.c @@ -259,18 +259,18 @@ PJ_DEF(pj_status_t) pjsip_pres_parse_pidf2(char *body, unsigned body_len, return PJ_SUCCESS; } -PJ_DEF(pj_status_t) pjsip_blf_parse_dialog_info( pjsip_rx_data *rdata, - pj_pool_t *pool, - pjsip_blf_status *blf_status) +PJ_DEF(pj_status_t) pjsip_blf_parse_dialog_info(pjsip_rx_data *rdata, + pj_pool_t *pool, + pjsip_blf_status *blf_status) { return pjsip_blf_parse_dialog_info2((char*)rdata->msg_info.msg->body->data, - rdata->msg_info.msg->body->len, - pool, blf_status); + rdata->msg_info.msg->body->len, + pool, blf_status); } PJ_DEF(pj_status_t) pjsip_blf_parse_dialog_info2(char *body, unsigned body_len, - pj_pool_t *pool, - pjsip_blf_status *blf_status) + pj_pool_t *pool, + pjsip_blf_status *blf_status) { pjdialog_info_dialog_info *dialog_info; pjdialog_info_dialog *dialog; diff --git a/pjsip/src/pjsua-lib/pjsua_pres.c b/pjsip/src/pjsua-lib/pjsua_pres.c index 43ba7d14c5..091be95df4 100644 --- a/pjsip/src/pjsua-lib/pjsua_pres.c +++ b/pjsip/src/pjsua-lib/pjsua_pres.c @@ -321,7 +321,7 @@ PJ_DEF(pj_status_t) pjsua_buddy_get_info( pjsua_buddy_id buddy_id, } /* - * Get detailed buddy blf info. + * Get detailed buddy "busy lamp field" info. */ PJ_DEF(pj_status_t) pjsua_buddy_get_blf_info( pjsua_buddy_id buddy_id, pjsua_buddy_blf_info *info) @@ -803,7 +803,7 @@ PJ_DEF(pj_status_t) pjsua_buddy_del(pjsua_buddy_id buddy_id) } /* - * Delete blf buddy. + * Delete "busy lamp field" buddy. */ PJ_DEF(pj_status_t) pjsua_buddy_del_blf(pjsua_buddy_id buddy_id) { @@ -825,7 +825,7 @@ PJ_DEF(pj_status_t) pjsua_buddy_del_blf(pjsua_buddy_id buddy_id) PJ_LOG(4,(THIS_FILE, "BLF buddy %d: deleting..", buddy_id)); pj_log_push_indent(); - /* Unsubscribe blf */ + /* Unsubscribe "busy lamp field" */ pjsua_buddy_subscribe_blf(buddy_id, PJ_FALSE); /* Not interested with further events for this buddy */ @@ -834,7 +834,7 @@ PJ_DEF(pj_status_t) pjsua_buddy_del_blf(pjsua_buddy_id buddy_id) pjsua_var.mod.id, NULL); } - /* Remove blf buddy */ + /* Remove "busy lamp field" buddy */ pjsua_var.buddy[buddy_id].uri.slen = 0; pjsua_var.buddy_cnt--; @@ -844,7 +844,7 @@ PJ_DEF(pj_status_t) pjsua_buddy_del_blf(pjsua_buddy_id buddy_id) pjsua_var.buddy[buddy_id].timer.id = PJ_FALSE; } - /* Reset blf buddy struct */ + /* Reset "busy lamp field" buddy struct */ reset_buddy(buddy_id); unlock_buddy(&lck); @@ -2295,13 +2295,13 @@ static void pjsua_evsub_on_rx_notify(pjsip_evsub *sub, PJ_UNUSED_ARG(p_body); } -/* Callback called when we receive blf NOTIFY */ +/* Callback called when we receive "busy lamp field" NOTIFY */ static void pjsua_evsub_on_rx_blf_notify(pjsip_evsub *sub, - pjsip_rx_data *rdata, - int *p_st_code, - pj_str_t **p_st_text, - pjsip_hdr *res_hdr, - pjsip_msg_body **p_body) + pjsip_rx_data *rdata, + int *p_st_code, + pj_str_t **p_st_text, + pjsip_hdr *res_hdr, + pjsip_msg_body **p_body) { pjsua_buddy *buddy;