Let kannel 1.4.3 support the bootstrap of the WiMAX

Let kannel 1.4.3 support the bootstrap of the WiMAX

1.If kannel is runing,stop it first.

wget http://localhost:13000/shutdown?password=bar

2.Modify the pack_accept() function for the Bootstrap of the WiMAX in the wsp_header.c.
  
static int pack_accept(Octstr *packed, Octstr *value)
{
    List *parms;
    long media;
    char *wi_bootstrap;
    char wb_buf[50];

    parms = wsp_strip_parameters(value);
    /* XXX we need to obey which WSP encoding-version to use */
    media = wsp_string_to_content_type(value);
    /* media = wsp_string_to_versioned_content_type(value, WSP_1_2);*/

    /* added by javen for wimax bootstrap */
    wi_bootstrap = "application/vnd.wmf.bootstrap";       
    octstr_get_many_chars(wb_buf, value, 0, strlen(wi_bootstrap)); 
    //printf("buf is:/n");
    //printf("%s/n",buf);            
    wb_buf[strlen(wi_bootstrap)] = '/0';
    if (strcmp(wb_buf, wi_bootstrap) == 0){
         media = 0x0318;
    }
    //printf("strcmp(a,b): %d/n", strcmp(wb_buf, wi_bootstrap));
    //printf("media is:/n");//=792
    //printf("%d/n",media); 
 
    /* See if we can fit this in a Constrained-media encoding */
    if (parms == NULL && media <= MAX_SHORT_INTEGER) {
        wsp_pack_constrained_value(packed, value, media);
        //printf("parms == NULL && media <= MAX_SHORT_INTEGER");
    } else {
        Octstr *encoding = octstr_create("");

        if (media >= 0)
            wsp_pack_integer_value(encoding, media);
        else
            wsp_pack_text(encoding, value);

        wsp_pack_parameters(encoding, parms);
        wsp_pack_value(packed, encoding);
        octstr_destroy(encoding);
    }

    gwlist_destroy(parms, parm_destroy_item);
    return 0;
}

3.Compile the kannel 1.4.3 again

make
make bindir=/OneMS/gateway-1.4.3/bin install

4.Run the the kannel 1.4.3 again


./bearerbox -v 1 pushkannel.conf &
./wapbox -v 1 pushkannel.conf &

©️2020 CSDN 皮肤主题: 酷酷鲨 设计师:CSDN官方博客 返回首页