New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
presence : add default_expires and use in the presence* modules #3003
Conversation
#include "../presence/event_list.h" | ||
#include "presence_conference.h" | ||
#include "notify_body.h" | ||
|
||
int conference_add_events(void) | ||
{ | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | |
{ |
@@ -43,7 +53,7 @@ int conference_add_events(void) | |||
event.content_type.s = "application/conference-info+xml"; | |||
event.content_type.len = 31; | |||
|
|||
event.default_expires= 3600; | |||
event.default_expires= pres_default_expires; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event.default_expires= pres_default_expires; | |
event.default_expires = pres_default_expires; |
@@ -43,7 +53,7 @@ int dlginfo_add_events(void) | |||
event.content_type.s = "application/dialog-info+xml"; | |||
event.content_type.len = 27; | |||
|
|||
event.default_expires= 3600; | |||
event.default_expires= pres_default_expires; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event.default_expires= pres_default_expires; | |
event.default_expires = pres_default_expires; |
@@ -124,7 +134,7 @@ int mwi_add_events(void) | |||
event.content_type.s = "application/simple-message-summary"; | |||
event.content_type.len = 34; | |||
|
|||
event.default_expires= 3600; | |||
event.default_expires= pres_default_expires; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event.default_expires= pres_default_expires; | |
event.default_expires = pres_default_expires; |
event.content_type.s = "text/xml"; | ||
event.content_type.len = 8; | ||
|
||
event.default_expires= 3600; | ||
event.default_expires= pres_default_expires; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event.default_expires= pres_default_expires; | |
event.default_expires = pres_default_expires; |
/* constructing message-summary event */ | ||
memset(&event, 0, sizeof(pres_ev_t)); | ||
event.name.s = "reg"; | ||
event.name.len = 3; | ||
|
||
event.content_type.s = "application/reginfo+xml"; | ||
event.content_type.len = 23; | ||
event.default_expires= 3600; | ||
event.default_expires= pres_default_expires; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event.default_expires= pres_default_expires; | |
event.default_expires = pres_default_expires; |
int pres_default_expires = 3600; | ||
modparam_t type = 0; | ||
int *param = find_param_export(find_module_by_name("presence"), "default_expires", INT_PARAM, &type); | ||
if ( param && (type == INT_PARAM) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( param && (type == INT_PARAM) ) | |
if(param && type == INT_PARAM) |
int pres_default_expires = 3600; | ||
modparam_t type = 0; | ||
int *param = find_param_export(find_module_by_name("presence"), "default_expires", INT_PARAM, &type); | ||
if ( param && (type == INT_PARAM) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( param && (type == INT_PARAM) ) | |
if(param && type == INT_PARAM) |
int pres_default_expires = 3600; | ||
modparam_t type = 0; | ||
int *param = find_param_export(find_module_by_name("presence"), "default_expires", INT_PARAM, &type); | ||
if ( param && (type == INT_PARAM) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( param && (type == INT_PARAM) ) | |
if(param && type == INT_PARAM) |
int pres_default_expires = 3600; | ||
modparam_t type = 0; | ||
int *param = find_param_export(find_module_by_name("presence"), "default_expires", INT_PARAM, &type); | ||
if ( param && (type == INT_PARAM) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( param && (type == INT_PARAM) ) | |
if(param && type == INT_PARAM) |
int pres_default_expires = 3600; | ||
modparam_t type = 0; | ||
int *param = find_param_export(find_module_by_name("presence"), "default_expires", INT_PARAM, &type); | ||
if ( param && (type == INT_PARAM) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( param && (type == INT_PARAM) ) | |
if(param && type == INT_PARAM) |
int pres_default_expires = 3600; | ||
modparam_t type = 0; | ||
int *param = find_param_export(find_module_by_name("presence"), "default_expires", INT_PARAM, &type); | ||
if ( param && (type == INT_PARAM) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( param && (type == INT_PARAM) ) | |
if(param && type == INT_PARAM) |
@adita76: every module (that needs it) has to get its own parameter, not to lookup the parameter from another module. That's not how usual is done and each module can do some internal optimization to its parameters, so in long term might create hidden issues. @lnicola: probably the modules' code just need to be run through clang-format. |
Being a parameter with very simple functionality, I thought it would be easier to use it once than having to configure one for each module. |
57927a2
to
ae4de06
Compare
ae4de06
to
e771b1e
Compare
Thanks! Modules are for different purposes and each event can be with its own expire settings. |
Pre-Submission Checklist
in
doc/
subfolder, the README file is autogenerated)Type Of Change
Checklist:
Description
closes #2996