void term_init() { tel_init(); telopt(1, WILL, TELOPT_SGA); telopt(1, DO, TELOPT_SGA); telopt(1, WILL, TELOPT_BINARY); telopt(1, DO, TELOPT_BINARY); telopt(1, WILL, TELOPT_ECHO); telopt(1, DO, TELOPT_WINCH); }
/* GCF test requirement */ static void __send_termination_event_to_tapi(void) { BROWSER_LOGD("**********************[%s]", __func__); int ret = TAPI_API_SUCCESS; int request_id = -1; TelSatEventDownloadReqInfo_t event_data; event_data.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION; event_data.u.browserTerminationEventReqInfo.browserTerminationCause = TAPI_SAT_BROWSER_TERMINATED_BY_USER; TapiHandle *handle = NULL; handle = tel_init(NULL); ret = tel_download_sat_event(handle, &event_data, NULL, NULL); if(ret != TAPI_API_SUCCESS && ret != TAPI_API_SAT_EVENT_NOT_REQUIRED_BY_USIM) BROWSER_LOGE("failed to tel_download_sat_event"); tel_deinit(handle); }
msg_error_t SmsPlgInitialize() { MSG_BEGIN(); MSG_DEBUG("set MSG_SIM_CHANGED to MSG_SIM_STATUS_NOT_FOUND."); MsgSettingSetInt(MSG_SIM_CHANGED, MSG_SIM_STATUS_NOT_FOUND); bool bReady; MsgSettingGetBool(VCONFKEY_TELEPHONY_READY, &bReady); MSG_DEBUG("Get VCONFKEY_TELEPHONY_READY [%d].", bReady); int ret = 0; if(!bReady) { MsgSettingRegVconfCBCommon(VCONFKEY_TELEPHONY_READY, MsgTapiInitCB); mx.lock(); ret = cv.timedwait(mx.pMutex(), 90); mx.unlock(); } try { if (ret != ETIMEDOUT) { pTapiHandle = tel_init(NULL); SmsPluginCallback::instance()->registerEvent(); } } catch (MsgException& e) { MSG_FATAL("%s", e.what()); return MSG_ERR_PLUGIN_REGEVENT; } catch (exception& e) { MSG_FATAL("%s", e.what()); return MSG_ERR_PLUGIN_REGEVENT; } MSG_END(); return MSG_SUCCESS; }
void netmain_init(void) { int e; int i; char * msg; #ifdef IP_V6 ip6_addr host; #endif printf("\n%s\n", name); printf("Copyright 1997-2006 by InterNiche Technologies. All rights reserved. \n"); #ifndef SUPERLOOP /* call this to do pre-task setup including intialization of port_prep */ msg = pre_task_setup(); if (msg) panic(msg); #endif #ifdef INCLUDE_NVPARMS /* system uses InterNiche NV system */ e = get_nv_params(); /* get flash parameters into data structs */ if (e) { printf("fatal error (%d) reading NV parameters.\n", e); panic("nv"); } /* set static iface IP info up from stored parameters. These may be overwritten from command line parms or DHCP later. */ for (i = 0; i < STATIC_NETS; i++) { netstatic[i].n_ipaddr = inet_nvparms.ifs[i].ipaddr; netstatic[i].snmask = inet_nvparms.ifs[i].subnet; netstatic[i].n_defgw = inet_nvparms.ifs[i].gateway; #ifdef IP_MULTICAST /* Create a dummy entry for the Ethernet interface mcastlist */ /* If this entry is set to NULL, multicast is not supported */ /* on this interface */ netstatic[i].n_mcastlist = mcastlist; #endif /* IP_MULTICAST */ #ifdef IP_V6 IP6CPY(&host, &inet_nvparms.ifs[i].ipv6addr); if ( (host.addr[0] == 0xFE) && (host.addr[1] == 0xC0)) { netstatic[i].v6addrs[IPA_SITE] = ip6_mkaddr(&netstatic[i], IPA_SITE, &host); } else if ( (host.addr[0] == 0xFE) && (host.addr[1] == 0x80) ) { printf ("[IPV6 init]error : bad IPV6 address\n"); } else if (host.addr[0] != 0) { netstatic[i].v6addrs[IPA_GLOBAL] = ip6_mkaddr(&netstatic[i], IPA_GLOBAL, &host ); } #endif } #ifdef DNS_CLIENT /* set DNS client's server list from nvparms information */ MEMCPY(dns_servers, inet_nvparms.dns_servers, sizeof(dns_servers)); #ifdef DNS_CLIENT_UPDT MEMCPY(soa_mname, inet_nvparms.dns_zone_name, sizeof(soa_mname)); #endif /* DNS_CLIENT_UPDT */ #endif /* DNS_CLIENT */ #ifdef USE_COMPORT comportcfg.comport = comport_nvparms.comport; comportcfg.LineProtocol = comport_nvparms.LineProtocol; #endif /* USE_COMPORT */ #endif /* INCLUDE_NVPARMS */ #ifndef INCLUDE_NVPARMS #ifdef USE_COMPORT comportcfg.comport = 0x01; comportcfg.LineProtocol = PPP; /* Default to PPP */ #endif /* USE_COMPORT */ #endif /* INCLUDE_NVPARMS */ msg = ip_startup(); if (msg) { printf("inet startup error: %s\n", msg); panic("IP"); } #if defined(MEMDEV_SIZE) && defined(VFS_FILES) init_memdev(); /* init the mem and null test devices */ #endif #ifdef IP_MULTICAST #ifdef INCLUDE_TCP /* call the IP multicast test program */ u_mctest_init(); #endif #endif /* clear debugging flags. Port can optionally turn them * back on in post_task_setup(); * NDEBUG = UPCTRACE | IPTRACE | TPTRACE ; */ NDEBUG = 0; /* print IP address of the first interface - for user's benefit */ printf("IP address of %s : %s\n" , ((NET)(netlist.q_head))->name, print_ipad(((NET)(netlist.q_head))->n_ipaddr)); #ifndef SUPERLOOP /* call this per-target routine after basic tasks & net are up */ msg = post_task_setup(); if (msg) panic(msg); #endif #ifdef PING_APP ping_init(); #endif /* PING_APP */ #ifdef RAWIPTEST raw_test_init(); #endif /* RAWIPTEST */ #if defined(TFTP_CLIENT) || defined(TFTP_SERVER) tftp_init(); #endif /* TFTP */ #ifdef TESTMENU install_menu(testmenu); #endif /* TESTMENU */ #ifdef USE_AUTOIP Upnp_init(); /* start Auto IP before DHCP client */ #endif /* USE_AUTOIP */ #ifdef DHCP_CLIENT if( POWERUP_CONFIG_DHCP_ENABLED ) dhc_setup(); /* kick off any DHCP clients */ #endif /* DHCP_CLIENT */ #ifdef DHCP_SERVER #ifdef INCLUDE_NVPARMS if(dhserve_nvparms.ServeDHCP) #endif { e = dhcp_init(); if(e) { dprintf("Error %d starting DHCP server.\n",e); } else { exit_hook(dhcpsrv_cleanup); dprintf("Started DHCP server\n"); } } #endif /* DHCP_SERVER */ #ifdef IN_MENUS printf(prompt); #endif #ifdef UDPSTEST e=udp_echo_init(); if ( e == SUCCESS ) { exit_hook(udp_echo_cleanup); } else dprintf("Error %d starting UDP Echo server.\n",e); #endif #ifdef RIP_SUPPORT e=rip_init(); if ( e == SUCCESS ) { exit_hook(rip_cleanup); } else dprintf("Error %d starting RIP server.\n",e); #endif #ifdef INICHE_SYSLOG e =syslog_init(); if (e == SUCCESS) exit_hook(closelog); else dprintf("Error %d initializing syslog client.\n",e); #endif #ifdef FTP_CLIENT fc_callback=ftpc_callback; #endif /* The following initializations take place when SUPERLOOP is enabled. * Otherwise they would be done in the respective task. */ #ifdef SUPERLOOP #ifdef INCLUDE_SNMP e = snmp_init(); if (e == SUCCESS) exit_hook(snmp_cleanup); else dprintf("Error %d initializing SNMP agent.\n",e); #endif /* INCLUDE_SNMP */ #ifdef WEBPORT e = http_init(); /* start up http server */ if (e) dprintf("Error %d starting HTTP server.\n",e); #endif /* WEBPORT */ #ifdef FTP_SERVER e = ftps_init(); if ( e == SUCCESS ) { exit_hook(ftps_cleanup); } else dprintf("Error %d starting FTP server.\n",e); #endif /* FTP_SERVER */ #ifdef TELNET_SVR e=tel_init(); if ( e == SUCCESS ) { exit_hook(tel_cleanup); } else dprintf("Error %d starting TELNET server.\n",e); #endif #ifdef TCP_ECHOTEST e=tcp_echo_init(); if ( e == SUCCESS ) { exit_hook(tcp_echo_cleanup); } else dprintf("Error %d starting TCP Echo server.\n",e); #endif #ifdef TCP_CIPHERTEST e=tcp_cipher_init(); if ( e == SUCCESS ) { exit_hook(tcp_cipher_cleanup); } else dprintf("Error %d starting TCP cipher server.\n",e); #endif #ifdef USE_CRYPTOENG e = ce_init(); if(e != 0) { dprintf("ce_init() failed\n"); panic("prep_modules"); } #endif #ifdef SMTP_ALERTS smtp_init (); #endif #endif /* SUPERLOOP */ USE_ARG(e); /* Avoid compiler warnings */ USE_ARG(i); } /* end of netmain_init() */