Re :Re: Re :Re: dynamic rescan of SMSC configuration

"Manish Nema" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <1245410846.S.9533.46127.f4mail-234-211.rediffmail.com.bulk.old.1245412551.29036@webmail.rediffmail.com>
In normal restart SMSBox process gets killed it needs to be restarted, isnt it?I would like to understand, what happens when SMSBox gets closed, does it maintain any queue in itself for submitted message over http, prior to submitting bearerbox then if it has some message prior to submission to bearbox they will also be lost.Moreover without bringing down both bearbox and smsbox I cant add new SMSC on the fly. Altough deleting is just matter of stopping the SMSC on the fly.In situtations where SMSBox has to constantly accepting SMS over http restart would not be the ideal solution.Many thanks,Manish NemaOn Fri, 19 Jun 2009 13:28:58 +0200 Donald Jackson  wrote  I'm not quite sure I understand the point of this patch?    It is stopping all the SMSCs which is essentially a 95% of the Kannel r
 estart process.    What benefit is it providing over a normal restart?      2009/6/19 Manish Nema     Hi Alejandro,     &nbsp;Please find attached cvs diff -u taken on cvs HEAD.    Thanks,  Manish Nema      On Fri, 19 Jun 2009 10:35:44 +0200 Alejandro Guerrieri  wrote    Manish,    Please send a diff -u of what you've done and we'll take a look at it&nbsp;in&nbsp;context. Also please base it on the latest CVS HEAD.      Regards,     --Alejandro [email protected]        On 19/06/2009, at 10:03, Manish Nema wrote:&nbsp;Earlier I have posted the requirement for dynamic rescan of SMSC configuration at kannel users mail group,       &nbsp;    &nbsp;Thanks Alejandro for all help.         I thought to write few lines for the requirements, here is how I have done that        1) in b
 b_smscconn.c i have created a function int rescan_smsc(), please find the attached bb_smscconn.c          2) created one global Octstr* gCfgFilename in bearerbox.c and initialize it in main     if (argv[cf_index] == NULL)    &nbsp;&nbsp;&nbsp; {    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;gCfgFilename = octstr_create("kannel.conf");    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename = octstr_create("kannel.conf");      &nbsp;&nbsp;&nbsp; }    &nbsp;&nbsp;&nbsp; else    &nbsp;&nbsp;&nbsp; {    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;gCfgFilename = octstr_create(argv[cf_index]);    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename = octstr_create(argv[cf_index]);    &nbsp;&nbsp;&nbsp; }        &nbsp;This is to store configuration file name on bearbox startup      &nbsp;    3) added follow
 ing in bb_http.c         &nbsp; a) added     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { "reload-smsc",httpd_reload_smscs },    &nbsp;&nbsp; in httpd_commands        &nbsp;b)&nbsp; created function httpd_reload_smscs        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; static Octstr *httpd_reload_smscs(List *cgivars, int status_type)      &nbsp;&nbsp;&nbsp; {    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Octstr *reply;    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ((reply = httpd_check_authorization(cgivars, 0))!= NULL) return reply;    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ((reply = httpd_check_status())!= NULL) return reply;        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (rescan_smsc() == -1)      &nbsp;&nbsp;&nbsp; &nbs
 p;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return octstr_create("Could not re-load SMSC configuration");    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return octstr_create("Successfully rescanned SMSC configuration");              &nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;         &nbsp;I am not sure that if the implementation of rescan_smsc() is 100% correct/valid/safe, I request all the expert/developers&nbsp; to please give their suggestion/feedback.        It wish if this requirement can be implemented in future releases of the kannel.          Thanks,    Manish Nema                                       --   Donald Jackson  http://www.ddj.co.za/  donaldjster(a)gmail.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.