2010년 10월 8일 금요일

oid MainWindow::Ctrlp_Start()
{
    unsigned short port =0;
    char *ip_address = NULL;
    int rc;

    QTextStream(&log)<<"init";
    LogRefresh();

    rc = UpnpInit(ip_address,port);
    if(UPNP_E_SUCCESS !=rc){
            QTextStream(&log)<<" UpnpInit() error:"<< rc;
            UpnpFinish();
            return ;
            }
    if(ip_address == NULL){
            ip_address = UpnpGetServerIpAddress();
            }
    if(port == 0){
            port = UpnpGetServerPort();
            }
    QTextStream(&log)<<"\n Ip :"<<ip_address;
    QTextStream(&log)<<"\n port:"<<port;


}
void MainWindow::LogRefresh()
{
    ui->plainTextEdit->appendPlainText(log);
    log.clear();
}

댓글 없음:

댓글 쓰기