Phil Dibowitz wrote: > So what I'll probably do is if we're arch 9, I'll pass a flag in that says > "add CookieKeyVal"...
Bill, Please update to the latest CVS, and then apply the attached patch, and let me know if things work for you. -- Phil Dibowitz [EMAIL PROTECTED] Open Source software and tech docs Insanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Never write it in C if you can do it in 'awk'; Never do it in 'awk' if 'sed' can handle it; Never use 'sed' when 'tr' can do the job; Never invoke 'tr' when 'cat' is sufficient; Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming
? concordance/.deps ? concordance/.libs ? concordance/Makefile ? concordance/Makefile.in ? concordance/aclocal.m4 ? concordance/autom4te.cache ? concordance/concordance ? concordance/config.guess ? concordance/config.h ? concordance/config.h.in ? concordance/config.log ? concordance/config.status ? concordance/config.sub ? concordance/configure ? concordance/depcomp ? concordance/install-sh ? concordance/libtool ? concordance/ltmain.sh ? concordance/missing ? concordance/stamp-h1 ? consnoop/consnoop ? libconcord/.deps ? libconcord/.libs ? libconcord/Makefile ? libconcord/Makefile.in ? libconcord/aclocal.m4 ? libconcord/autom4te.cache ? libconcord/binaryfile.lo ? libconcord/config.guess ? libconcord/config.h ? libconcord/config.h.in ? libconcord/config.log ? libconcord/config.status ? libconcord/config.sub ? libconcord/configure ? libconcord/depcomp ? libconcord/install-sh ? libconcord/libconcord.la ? libconcord/libconcord.lo ? libconcord/libtool ? libconcord/libusbhid.lo ? libconcord/ltmain.sh ? libconcord/missing ? libconcord/remote.lo ? libconcord/remote_z.lo ? libconcord/stamp-h1 ? libconcord/usblan.lo ? libconcord/web.lo Index: libconcord/libconcord.cpp =================================================================== RCS file: /cvsroot/concordance/concordance/libconcord/libconcord.cpp,v retrieving revision 1.14 diff -u -r1.14 libconcord.cpp --- libconcord/libconcord.cpp 29 Mar 2008 21:53:26 -0000 1.14 +++ libconcord/libconcord.cpp 29 Mar 2008 22:06:32 -0000 @@ -459,7 +459,17 @@ uint8_t * const buf = new uint8_t[size]; file.read(buf, size); - Post(buf, size, "POSTOPTIONS", ri, true); + /* + * For some reason, on arch 9, the site sends a file missing + * one cookie value, so we need to tell Post() to add it in. + * Note that it ONLY does this for the connectivity test... + */ + bool add_cookiekeyval = false; + if (ri.architecture == 9) { + add_cookiekeyval = true; + } + + Post(buf, size, "POSTOPTIONS", ri, true, add_cookiekeyval); if (file.close() != 0) { return LC_ERROR_OS_FILE; @@ -1193,8 +1203,10 @@ rmt->LearnIR(&ls); //printf("%s\n",ls.c_str()); - if (post) - Post(x, size, "POSTOPTIONS", ri, true, &ls, &keyname); + if (post) { + Post(x, size, "POSTOPTIONS", ri, true, false, &ls, + &keyname); + } } else { rmt->LearnIR(); } Index: libconcord/web.cpp =================================================================== RCS file: /cvsroot/concordance/concordance/libconcord/web.cpp,v retrieving revision 1.18 diff -u -r1.18 web.cpp --- libconcord/web.cpp 29 Mar 2008 21:53:26 -0000 1.18 +++ libconcord/web.cpp 29 Mar 2008 22:06:32 -0000 @@ -222,7 +222,8 @@ } int Post(uint8_t *xml, uint32_t xml_size, const char *root, TRemoteInfo &ri, - bool has_userid, string *learn_seq = NULL, string *learn_key = NULL) + bool has_userid, bool add_cookiekeyval = false, string *learn_seq = NULL, + string *learn_key = NULL) { uint8_t *x = xml; @@ -244,6 +245,18 @@ return err; } + /* + * For some architectures the website leaves one required value out of + * the cookie. Who knows why, but we allow the user to tell us to add + * it. + */ + if (add_cookiekeyval) { + cookie += ";CookieKeyValue="; + cookie += ri.serial1; + cookie += ri.serial2; + cookie += ri.serial3; + } + #if _DEBUG printf("Connecting to: %s\n", server.c_str()); printf("Path: %s\n", path.c_str()); Index: libconcord/web.h =================================================================== RCS file: /cvsroot/concordance/concordance/libconcord/web.h,v retrieving revision 1.6 diff -u -r1.6 web.h --- libconcord/web.h 29 Mar 2008 21:53:26 -0000 1.6 +++ libconcord/web.h 29 Mar 2008 22:06:32 -0000 @@ -21,8 +21,9 @@ #define WEB_H int GetTag(const char *find, uint8_t* data, uint32_t data_size, - uint8_t *&found, string *s=NULL); + uint8_t *&found, string *s = NULL); int Post(uint8_t *xml, uint32_t xml_size, const char *root, TRemoteInfo &ri, - bool has_userid, string *learn_seq=NULL, string *learn_key=NULL); + bool has_userid, bool add_cookiekeyval = false, + string *learn_seq = NULL, string *learn_key = NULL); #endif
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel