Re: [PATCH]ppg push - crashing bug trusted-pi/no user

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Wapme Systems AG
Message-ID <[email protected]>
I'd suggest this approach:

  retos = http_cgi_variable(cgivars, "smsc");
            if (retos == NULL) {
                /* if we have a valid username, get the user specific
routing */
                if (username && octstr_length(username) > 0)
                    smsc_id =
wap_push_ppg_pushuser_smsc_id_get(username);
                /* if there was no user specific or the user didn't
exist, 
                 * then set the ppg global */
                smsc_id = smsc_id ? 
                    smsc_id : (ppg_default_smsc ?
octstr_duplicate(ppg_default_smsc) : NULL);
            } else {
                smsc_id = octstr_duplicate(retos);
            }
          

which means smsc_id = NULL while init and then call wap_xxx_id_get()
only if username has something usefull in it.

Stipe

[email protected]
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: [email protected]
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are
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.