My PC hung unexpectedly
deddi hp <[email protected]>
| Newsgroups | gmane.ietf.sigtran |
|---|---|
| Message-ID | <[email protected]> |
Hello master, I have some problems. when I try to implementing config for mtp, my pc become hang after i execute ioctl., it's like there's something wrong with the kernel.
Please give me some advice...
Thank you..
the code is like this one :
------------------------------------------------------------
RESULT mtpi_config(base_str_t *b)
{
struct {
mtp_config_t conf;
mtp_conf_na_t na;
} mc_na;
struct {
mtp_config_t conf;
mtp_conf_sp_t sp;
} mc_sp;
mc_na.conf.type = MTP_OBJ_TYPE_NA;
mc_na.conf.id = 1;
mc_na.conf.cmd = MTP_ADD;
mc_na.na.options.pvar = SS7_PVAR_ITUT_96;
mc_na.na.options.popt = SS7_POPT_HSL;
mc_na.na.mask.member = 0x11;
mc_na.na.mask.cluster = 0x22;
mc_na.na.mask.network = 0x33;
mc_na.na.sls_bits = 4;
struct strioctl ic;
ic.ic_cmd = MTP_IOCSCONFIG;
ic.ic_timout = 0;
ic.ic_len = sizeof(mc_na);
ic.ic_dp = (char*)&mc_na;
if ( ioctl(b->mtpi.fd, I_STR, &ic) < 0 )
perror("ioctl config");
mc_sp.conf.type = MTP_OBJ_TYPE_SP;
mc_sp.conf.id = 1;
mc_sp.conf.cmd = MTP_ADD;
mc_sp.sp.naid = 1;
mc_sp.sp.users = 1;
mc_sp.sp.pc = 0x00112233;
mc_sp.sp.flags = RSF_XFER_FUNC;
ic.ic_cmd = MTP_IOCSCONFIG;
ic.ic_timout = 0;
ic.ic_len = sizeof(mc_sp);
ic.ic_dp = (char*)&mc_sp;
if ( ioctl(b->mtpi.fd, I_STR, &ic) < 0 )
perror("ioctl config");
return __RESULT_SUCCESS;
}
--------------------------------------------------------------
_______________________________________________
Sigtran mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/sigtran