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, 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 in context. Also please base it on the latest CVS HEAD. Regards, --Alejandro [email protected] On 19/06/2009, at 10:03, Manish Nema wrote: Earlier I have posted the requirement for dynamic rescan of SMSC configuration at kannel users mail group, 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) { gCfgFilename = octstr_create("kannel.conf"); filename = octstr_create("kannel.conf"); } else { gCfgFilename = octstr_create(argv[cf_index]); filename = octstr_create(argv[cf_index]); } This is to store configuration file name on bearbox startup 3) added follow ing in bb_http.c a) added { "reload-smsc",httpd_reload_smscs }, in httpd_commands b) created function httpd_reload_smscs static Octstr *httpd_reload_smscs(List *cgivars, int status_type) { Octstr *reply; if ((reply = httpd_check_authorization(cgivars, 0))!= NULL) return reply; if ((reply = httpd_check_status())!= NULL) return reply; if (rescan_smsc() == -1) &nbs p; return octstr_create("Could not re-load SMSC configuration"); else return octstr_create("Successfully rescanned SMSC configuration"); } I am not sure that if the implementation of rescan_smsc() is 100% correct/valid/safe, I request all the expert/developers 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