From 241f9f6d9135048578ad603485740b73402edd8a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 22 Aug 2010 14:31:53 +0100 Subject: Better handling of yahoo add responses: libyahoo2 seems to (IMHO) wrongly assume that a non-0 status means the contact is on the list already and on-line. This causes ugly "imcb_buddy_status() for unknown handle" msgs. --- protocols/yahoo/libyahoo2.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'protocols/yahoo') diff --git a/protocols/yahoo/libyahoo2.c b/protocols/yahoo/libyahoo2.c index b062e7f9..07689809 100644 --- a/protocols/yahoo/libyahoo2.c +++ b/protocols/yahoo/libyahoo2.c @@ -2168,6 +2168,18 @@ static void yahoo_process_buddyadd(struct yahoo_input_data *yid, yd->buddies = y_list_append(yd->buddies, bud); +#if 0 + /* BitlBee: This seems to be wrong in my experience. I think: + status = 0: Success + status = 2: Already on list + status = 3: Doesn't exist + status = 42: Invalid handle (possibly banned/reserved, I get it for + handles like joe or jjjjjj) + Haven't seen others yet. But whenever the add is successful, there + will be a separate "went online" packet when the auth. request is + accepted. Couldn't find any test account that doesn't require auth. + unfortunately (if there is even such a thing?) */ + /* A non-zero status (i've seen 2) seems to mean the buddy is already * added and is online */ if (status) { @@ -2176,6 +2188,13 @@ static void yahoo_process_buddyadd(struct yahoo_input_data *yid, YAHOO_CALLBACK(ext_yahoo_status_changed) (yd->client_id, who, YAHOO_STATUS_AVAILABLE, NULL, 0, 0, 0); } +#endif + /* BitlBee: Need ACK of added buddy, if it was successful. */ + if (status == 0) { + YList *tmp = y_list_append(NULL, bud); + YAHOO_CALLBACK(ext_yahoo_got_buddies) (yd->client_id, tmp); + y_list_free(tmp); + } } static void yahoo_process_buddydel(struct yahoo_input_data *yid, -- cgit v1.2.3 From b0a89cc6e5ffff050ddecd09e9af8eb6723f9ba6 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 27 Aug 2010 09:48:18 +0100 Subject: Use nifty gcc -MD feature to automatically track .h dependencies of all C files, this finally gives proper dependencies, which means the end of getting broken binaries around headerfile changes, etc. Sure, this may not work on obscurux with superawesomeincompatiblecc while autoconf does, but at least BitlBee's configure script still runs in <1s. :-) --- protocols/yahoo/Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'protocols/yahoo') diff --git a/protocols/yahoo/Makefile b/protocols/yahoo/Makefile index a8021ffb..7908b773 100644 --- a/protocols/yahoo/Makefile +++ b/protocols/yahoo/Makefile @@ -30,6 +30,7 @@ clean: rm -f *.o core distclean: clean + rm -rf .depend ### MAIN PROGRAM @@ -42,3 +43,5 @@ $(objects): %.o: $(SRCDIR)%.c yahoo_mod.o: $(objects) @echo '*' Linking yahoo_mod.o @$(LD) $(LFLAGS) $(objects) -o yahoo_mod.o + +-include .depend/*.d -- cgit v1.2.3