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,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,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 &
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。