Re: cvs head bb_boxc question

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi,

as this part was written by me, I hope to be able to comment ;)

fred wrote:

> in cvs head bb_boxc.c fn int route_incoming_to_boxc(Msg *msg)
> {
> 
> I commented two lines out
>     for(i = 0; i < list_len(smsbox_list); i++) {
>  bc = list_get(smsbox_list, (i+b) % len);
> 
>   //      if (bc->boxc_id != NULL || bc->routable == 0)
> ***
>   //          bc = NULL;
> ***

short: we don't want to route messages to so called "named" boxes or if
these did not sent identify admin command.
long: when smsbox connect to bearerbox then as first ident. admin cmd will
be send with boxc_id. This boxc_id will be used for a routing purposes
between smsboxes within bearerbox. So if this boxc_id is set then _only_
messages that have equal boxc_id will be routed to this box.
routable flag is used to avoid a race conditions between connect and sending
ident. admin cmd.
Your problem is just with a configuration. Make sure you don't have boxc-id
directive for smsbox or define a properly smsbox routing...

> 
>         if (bc != NULL && max_incoming_sms_qlength > 0 &&
>             list_len(bc->incoming) > max_incoming_sms_qlength) {
>             full_found = 1;
>             bc = NULL;
>         }
> 
>         if ((bc != NULL && best != NULL && bc->load < best->load) ||
>              (bc != NULL && best == NULL)) {
>      best = bc;
>         }
>     }
> 
> 
> I was getting smsbox_list empty!
> those two lines didn't make sense to me, can anyone explain this part of
> code ?
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.