if(ea_send(ssl_sd, fesl_sd, "fsys", 0xc0000001, "TXN=Hello\n" "clientString=%s\n" "sku=%d\n" "locale=en_US\n" "clientPlatform=PC\n" "clientVersion=1.18.207823.0\n" "SDKVersion=5.0.0.0.0\n" "protocolVersion=2.0\n" "fragmentSize=8096\n" "clientType=client\n", // client-noreg account_game, // allows the cross-queries, otherwise use gamestr sku) < 0) goto quit; buff = ea_recv(ssl_sd, fesl_sd, &len, NULL); if(!buff || (len < 0)) goto quit; p = get_ea_value(buff, len, "theaterIp"); if(!p) { fprintf(stderr, "\nError: no theaterIp, dump follows:\n---\n%.*s\n---\n", len, buff); exit(1); } strncpy(theater_host, p, sizeof(theater_host)); p = get_ea_value(buff, len, "theaterPort"); if(!p) { fprintf(stderr, "\nError: no theaterPort, dump follows:\n---\n%.*s\n---\n", len, buff); exit(1); } theater_port = atoi(p); if(!quiet) fprintf(stderr, "theater: %s : %hu\n", theater_host, theater_port); if(theater_only) exit(0); buff = ea_recv(ssl_sd, fesl_sd, &len, NULL); // MemCheck if(!buff || (len < 0)) goto quit; p = get_ea_value(buff, len, "TXN"); if(p && !stricmp(p, "MemCheck")) { if(ea_send(ssl_sd, fesl_sd, "fsys", 0x80000000, "TXN=MemCheck\n" "result=\n") < 0) goto quit; } buff = ea_recv(ssl_sd, fesl_sd, &len, NULL); // Hello if(!buff || (len < 0)) goto quit; p = get_ea_value(buff, len, "TXN"); if(p && !stricmp(p, "Hello")) { if(ea_send(ssl_sd, fesl_sd, "fsys", 0x80000000, "domainPartition\n" "domain=eagames\n" "messengerIp=messaging.ea.com\n" "messengerPort=13505\n" "domainPartition\n" "subDomain=BFBC2\n" "TXN=Hello\n" "activityTimeoutSecs=0\n" "curTime= "Jul-20-2010 0 5%3a50%3a43 UTC"\n" "theaterIp=bfbc2-pc-server.theater.ea.com\n", "theaterPort=18326\n" ) < 0) goto quit; }