亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? syncmanager.cpp

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? CPP
?? 第 1 頁 / 共 5 頁
字號(hào):
        LOG.debug("devinfo: %s", devInfStr->c_str());
        // Add syncUrl to devInfHash, so hash changes if syncUrl has changed
        devInfStr->append("<SyncURL>");
        devInfStr->append(config.getAccessConfig().getSyncURL());
        devInfStr->append("</SyncURL>");
        calculateMD5(devInfStr->c_str(), devInfStr->length(), md5);
        devInfHash[b64_encode(devInfHash, md5, sizeof(md5))] = 0;
        LOG.debug("devinfo hash: %s", devInfHash);

        // compare against previous device info hash:
        // if different, then the local config has changed and
        // infos should be sent again
        if (strcmp(devInfHash, config.getDeviceConfig().getDevInfHash())) {
            putDevInf = TRUE;
        }
        LOG.debug("devinfo %s", putDevInf ? "changed, retransmit" : "unchanged, no need to send");
    } else {
        LOG.debug("no devinfo available");
    }

    if (isServerAuthRequired == FALSE) {
        isServerAuthenticated = TRUE;
    }

    // Authentication
    do {
        deleteCred(&cred);
        deleteAlert(&alert);
        deleteSyncML(&syncml);
        deleteArrayList(&alerts);

        bool addressChange = false;

        // credential of the client
        if (isClientAuthenticated == FALSE) {
            char anc[DIM_ANCHOR];
            timestamp = (unsigned long)time(NULL);
            for (count = 0; count < sourcesNumber; count ++) {
                if (!sources[count]->getReport()->checkState())
                    continue;
                sources[count]->setNextSync(timestamp);
                timestampToAnchor(sources[count]->getNextSync(), anc);
                sources[count]->setNextAnchor(anc);
                // Test if this source is for AddressChangeNotification
                int prefmode = sources[count]->getPreferredSyncMode();
                if( prefmode == SYNC_ADDR_CHANGE_NOTIFICATION ) {
                    alert = syncMLBuilder.prepareAddrChangeAlert(*sources[count]);
                    if(!alert) {
                        ret = lastErrorCode = 745; // FIXME
                        goto finally;
                    }
                    addressChange = true;   // remember that this sync is for
                                            // address change notification
                }
                else {
                    alert = syncMLBuilder.prepareInitAlert(*sources[count], maxObjSize);
                }
                alerts->add(*alert);
                deleteAlert(&alert);
            }
            cred = credentialHandler.getClientCredential();
            strcpy(credentialInfo, cred->getAuthentication()->getPassword());

        }

        // actively send out device infos?
        if (putDevInf) {
            AbstractCommand* put = syncMLBuilder.prepareDevInf(NULL, *devInf);
            if (put) {
                commands->add(*put);
                delete put;
            }
            putDevInf = FALSE;
        }

        // "cred" only contains an encoded strings as username, also
        // need the original username for LocName
        syncml = syncMLBuilder.prepareInitObject(cred, alerts, commands, maxMsgSize, maxObjSize);
        if (syncml == NULL) {
            ret = lastErrorCode;
            goto finally;
        }

        initMsg = syncMLBuilder.prepareMsg(syncml);
        if (initMsg == NULL) {
            ret = lastErrorCode;
            goto finally;
        }

        LOG.debug(MSG_INITIALIZATATION_MESSAGE);
        LOG.debug("%s", initMsg);

        currentState = STATE_PKG1_SENDING;

        if (transportAgent == NULL) {
            transportAgent = TransportAgentFactory::getTransportAgent(url, proxy, responseTimeout, maxMsgSize);
            transportAgent->setReadBufferSize(readBufferSize);
            // Here we also ensure that the user agent string is valid
            const char* ua = getUserAgent(config);
            LOG.debug("User Agent = %s", ua);
            transportAgent->setUserAgent(ua);
            transportAgent->setCompression(config.getAccessConfig().getCompression());
            delete [] ua; ua = NULL;
        }
        else {
            transportAgent->setURL(url);
        }
        if (lastErrorCode != 0) { // connection: lastErrorCode = 2005: Impossible to establish internet connection
            ret = lastErrorCode;
            goto finally;
        }

        deleteSyncML(&syncml);
        deleteChal(&serverChal);
        deleteArrayList(&commands);
        deleteCred(&cred);

        //Fire Initialization Event
        fireSyncEvent(NULL, SEND_INITIALIZATION);

        responseMsg = transportAgent->sendMessage(initMsg);
        // Non-existant or empty reply?
        // Synthesis server replies with empty message to
        // a message that it cannot parse.
        if (responseMsg == NULL || !responseMsg[0]) {
            if (responseMsg) {
                delete [] responseMsg;
                responseMsg = NULL;
            }

            if ( addressChange && lastErrorCode == ERR_READING_CONTENT ) {
                // This is not an error if it's an AddressChange
                ret = 0;
            }
            else {
                // use last error code if one has been set (might not be the case)
                ret = lastErrorCode;
                /*
                if (!ret) {
                    ret = ERR_READING_CONTENT;
                }
                */
            }
            goto finally;
        }

        // increment the msgRef after every send message
        syncMLBuilder.increaseMsgRef();
        syncMLBuilder.resetCommandID();

        syncml = syncMLProcessor.processMsg(responseMsg);
        safeDelete(&responseMsg);
        safeDelete(&initMsg);

        if (syncml == NULL) {
            ret = lastErrorCode;
            LOG.error("Error processing alert response.");
            goto finally;
        }

        // ret = syncMLProcessor.processInitResponse(*sources[0], syncml, alerts);

        ret = syncMLProcessor.processSyncHdrStatus(syncml);

        if (ret == -1) {
            ret = lastErrorCode;
            LOG.error("Error processing SyncHdr Status");
            goto finally;

        } else if (isErrorStatus(ret) && ! isAuthFailed(ret)) {
            lastErrorCode = ret;
            sprintf(lastErrorMsg, "Error from server: status = %d", ret);
            goto finally;
        }

        for (count = 0; count < sourcesNumber; count ++) {
            if (!sources[count]->getReport()->checkState())
                continue;

            int sourceRet = syncMLProcessor.processAlertStatus(*sources[count], syncml, alerts);
            if (isAuthFailed(ret) && sourceRet == -1) {
                // Synthesis server does not include SourceRefs if
                // authentication failed. Remember the authentication
                // failure in that case, otherwise we'll never get to the getChal() below.
            } else {
                ret = sourceRet;
            }

            if (ret == -1 || ret == 404 || ret == 415) {
                lastErrorCode = ret;
                sprintf(logmsg, "Alert Status from server = %d", ret);
                LOG.error(logmsg);
                setSourceStateAndError(count, SOURCE_ERROR, ret, logmsg);
            }
        }
        if (isToExit()) {
            // error. no source to sync
            ret = lastErrorCode;
            goto finally;
        }

        //
        // Set the uri with session
        //
        respURI = syncMLProcessor.getRespURI(syncml->getSyncHdr());
        if (respURI) {
            url = respURI;
            transportAgent->setURL(url);
        }
        //
        // Server Authentication
        //
        if (isServerAuthenticated == FALSE) {

            cred = syncml->getSyncHdr()->getCred();
            if (cred == NULL) {
                if (serverAuthRetries == 1) {
                    // create the serverNonce if needed and set into the CredentialHendler, serverNonce property
                    serverChal = credentialHandler.getServerChal(isServerAuthenticated);
                    authStatusCode = 407;
                    serverAuthRetries++;
                } else {
                     ret = -1;
                     goto finally;
                }

            } else {
                isServerAuthenticated = credentialHandler.performServerAuth(cred);
                if (isServerAuthenticated) {
                    serverChal   = credentialHandler.getServerChal(isServerAuthenticated);
                    authStatusCode = 212;
                }
                else {
                    if (strcmp(credentialHandler.getServerAuthType(), AUTH_TYPE_MD5) == 0 ||
                        serverAuthRetries == 1)
                    {
                        serverChal   = credentialHandler.getServerChal(isServerAuthenticated);
                        authStatusCode = 401;

                    } else {
                        ret = -1;   //XXX
                        LOG.error("Server not authenticated");
                        goto finally;
                    }
                    serverAuthRetries++;
                }
            }
            cred = NULL; // this cred is only a reference
        } else  {
            authStatusCode = 200;
        }
        status = syncMLBuilder.prepareSyncHdrStatus(serverChal, authStatusCode);
        commands->add(*status);
        deleteStatus(&status);
        list = syncMLProcessor.getCommands(syncml->getSyncBody(), ALERT);
        for (count = 0; count < sourcesNumber; count ++) {
            if (!sources[count]->getReport()->checkState())
                continue;

            status = syncMLBuilder.prepareAlertStatus(*sources[count], list, authStatusCode);
            if (status) {
                commands->add(*status);
                deleteStatus(&status);
            }
        }

        //
        // Process Put/Get commands
        //
        list = syncml->getSyncBody()->getCommands();
        int cmdindex;
        for (cmdindex = 0; cmdindex < list->size(); cmdindex++) {
            AbstractCommand* cmd = (AbstractCommand*)list->get(cmdindex);
            const char* name = cmd->getName();
            if (name) {
                BOOL isPut = !strcmp(name, PUT);
                BOOL isGet = !strcmp(name, GET);

                if (isGet || isPut) {
                    int statusCode = 200; // if set, then send it (on by default)

                    if (isGet) {
                        Get *get = (Get *)cmd;
                        ArrayList *items = get->getItems();
                        BOOL sendDevInf = FALSE;

                        Results results;
                        for (int i = 0; i < items->size(); i++) {
                            Item *item = (Item *)items->get(i);

                            // we are not very picky: as long as the Item is
                            // called "./devinf11" as required by the standard
                            // we return our device infos
                            Target *target = item->getTarget();
                            if (target && target->getLocURI() &&
                                !strcmp(target->getLocURI(),
                                         DEVINF_URI)) {
                                sendDevInf = TRUE;
                            } else {
                                LOG.debug("ignoring request to Get item #%d", i);
                            }
                        }

                        // cannot send if we have nothing, then simply acknowledge the request,
                        // but ignore it
                        if (sendDevInf && devInf) {
                            AbstractCommand *result = syncMLBuilder.prepareDevInf(cmd, *devInf);
                            if (result) {
                                commands->add(*result);
                                delete result;
                            }
                        }
                    } else {
                        // simply acknowledge Put
                    }

                    if (statusCode) {
                        status = syncMLBuilder.prepareCmdStatus(*cmd, statusCode);
                        if (status) {
		                    // Fire Sync Status Event: status from client
                            fireSyncStatusEvent(status->getCmd(), status->getStatusCode(), NULL, NULL, NULL , CLIENT_STATUS);

                            commands->add(*status);
                            deleteStatus(&status);
                        }
                    }
                }
            }
        }

        //
        // Client Authentication. The auth of the client on the server

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩精品一区| 亚洲免费观看视频| 在线观看日韩电影| 国产综合色产在线精品| 亚洲人妖av一区二区| 精品日韩一区二区三区| 欧美性xxxxxxxx| 成人久久久精品乱码一区二区三区| 午夜精品久久久久久久| 最新不卡av在线| 欧美国产精品一区| 欧美va亚洲va香蕉在线| 欧美日韩高清一区二区不卡| 91小视频免费观看| 国产福利一区二区三区视频在线| 日本强好片久久久久久aaa| 亚洲女同女同女同女同女同69| 久久亚洲一区二区三区四区| 在线电影院国产精品| 欧美在线免费观看亚洲| 99久久精品国产网站| 国产乱码精品一区二区三| 久久国产精品99精品国产| 热久久久久久久| 五月综合激情网| 亚洲尤物在线视频观看| 中文字幕一区视频| 国产精品入口麻豆九色| 欧美激情资源网| 国产欧美一区二区精品秋霞影院| 精品对白一区国产伦| 日韩美女主播在线视频一区二区三区| 欧美亚洲综合久久| 欧美亚洲自拍偷拍| 欧美精品少妇一区二区三区 | 黄色成人免费在线| 蜜臀久久99精品久久久久久9| 视频在线观看91| 三级欧美在线一区| 免费日本视频一区| 蜜臂av日日欢夜夜爽一区| 日韩成人一级片| 免费高清视频精品| 麻豆成人免费电影| 韩国av一区二区三区| 国产成人夜色高潮福利影视| 国产精品69久久久久水密桃| 国产成a人亚洲精品| 成人av电影在线网| 91丝袜国产在线播放| 97国产一区二区| 欧美亚洲动漫制服丝袜| 欧美日韩国产a| 欧美r级电影在线观看| 国产网站一区二区三区| 国产精品久久久久久妇女6080| 国产精品免费免费| 亚洲综合精品自拍| 日本欧美在线观看| 国产白丝网站精品污在线入口| 99久久精品国产麻豆演员表| 色婷婷综合久久久中文字幕| 91成人网在线| 日韩欧美一区在线| 国产精品久久久久桃色tv| 一区二区三区四区国产精品| 天堂蜜桃一区二区三区| 国产激情视频一区二区三区欧美 | 日本高清成人免费播放| 欧美肥妇bbw| 欧美国产精品中文字幕| 一区二区三区欧美激情| 蜜桃av一区二区三区| 成人在线综合网站| 欧美精品1区2区3区| 欧美国产日本韩| 天堂影院一区二区| 成人av在线电影| 欧美精品丝袜中出| 国产精品国产三级国产有无不卡 | 亚洲精品一区二区三区影院| 国产精品久久久久aaaa樱花| 亚洲成人动漫在线免费观看| 国产一区二区伦理片| 91国产成人在线| 精品国产91乱码一区二区三区| 亚洲日韩欧美一区二区在线| 麻豆精品在线观看| 色婷婷av一区二区三区软件| 日韩精品专区在线影院观看| 一区在线播放视频| 久草热8精品视频在线观看| 99久久99久久精品免费观看 | 欧美日韩视频第一区| 久久久99久久| 日日噜噜夜夜狠狠视频欧美人| 国产91精品在线观看| 欧美一区二区三区视频免费| 亚洲欧美在线另类| 韩国一区二区视频| 欧美二区在线观看| 一区二区三区免费在线观看| 国产成人h网站| 日韩欧美精品在线视频| 亚洲午夜久久久久中文字幕久| 国产九色sp调教91| 制服丝袜亚洲精品中文字幕| 亚洲女女做受ⅹxx高潮| 成人黄页在线观看| 欧美精品一区二区三| 亚洲.国产.中文慕字在线| 色综合天天狠狠| 日本一区二区免费在线观看视频 | 另类中文字幕网| 欧洲av一区二区嗯嗯嗯啊| 国产欧美视频一区二区三区| 免费在线观看精品| 欧洲一区二区三区免费视频| 1024亚洲合集| 91丝袜呻吟高潮美腿白嫩在线观看| 国产亚洲精品超碰| 国产精品996| 国产午夜精品一区二区三区嫩草 | 欧美三级三级三级爽爽爽| 亚洲免费av网站| 色综合久久综合网97色综合| 国产欧美精品一区二区色综合 | 国产一区欧美日韩| 久久综合九色综合欧美就去吻| 日本欧美加勒比视频| 欧美肥大bbwbbw高潮| 日韩精品91亚洲二区在线观看 | 国产成人亚洲综合a∨猫咪| 久久亚洲一级片| 国产精品亚洲视频| 国产亚洲欧美激情| 成人精品国产免费网站| 国产精品国产三级国产有无不卡| 成人av在线资源| 亚洲欧美乱综合| 欧美自拍丝袜亚洲| 午夜视频一区二区三区| 日韩欧美专区在线| 国产成人综合在线播放| 国产精品三级av| 91久久奴性调教| 午夜欧美电影在线观看| 欧美一区二区美女| 韩国av一区二区三区四区| 国产日韩av一区| caoporm超碰国产精品| 一区二区欧美在线观看| 欧美日韩和欧美的一区二区| 日本中文在线一区| 久久久亚洲精品石原莉奈| 福利91精品一区二区三区| 国产精品国模大尺度视频| 欧美伊人久久久久久午夜久久久久| 亚洲444eee在线观看| 精品久久国产97色综合| 99这里只有精品| 午夜精品在线看| 久久免费电影网| 日本乱人伦一区| 蜜桃av一区二区三区电影| 欧美激情中文字幕一区二区| 欧美亚洲综合久久| 久久99久久久欧美国产| 亚洲欧洲国产日韩| 在线观看91精品国产麻豆| 国产呦萝稀缺另类资源| 亚洲美女少妇撒尿| 欧美一区二区三区四区视频| 成人一级片网址| 日韩中文字幕一区二区三区| 久久精品一区二区| 欧美亚洲另类激情小说| 激情综合亚洲精品| |精品福利一区二区三区| 欧美日韩一本到| 国产成人无遮挡在线视频| 亚洲综合激情另类小说区| 2023国产精华国产精品| 色狠狠综合天天综合综合| 久久精品国产第一区二区三区 | 国产九九视频一区二区三区| 亚洲精品高清视频在线观看| 日韩午夜电影在线观看| 91在线观看一区二区| 毛片不卡一区二区| 亚洲影院久久精品| 欧美激情一区二区三区在线| 欧美另类高清zo欧美| av电影在线观看完整版一区二区| 爽爽淫人综合网网站| 亚洲色图欧美在线| 久久久久88色偷偷免费| 在线观看91av| 在线视频你懂得一区| 成人午夜伦理影院|